• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

yitsushi / totp-cli / 6585551217
27%
master: 20%

Build:
Build:
LAST BUILD BRANCH: dependabot/go_modules/golang.org/x/crypto-0.45.0
DEFAULT BRANCH: master
Ran 20 Oct 2023 08:53AM UTC
Jobs 1
Files 8
Run time 2s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

20 Oct 2023 08:53AM UTC coverage: 39.583%. Remained the same
6585551217

push

github

web-flow
fix: empty string when new newline at the end of stdin (#96)

The code reads the token from `stdin` until newline. If there is no
newline, it counts the content as empty string.

We use `bufio.NewReader` with `reader.ReadString('\n')` which "reads
until the first occurrence of delim in the input". When it can't find a
newline character before the stream ends we return with an error and an
empty string.

Fix: As `reader.ReadString` returns with the content before the error in
all cases, we can return with the content even if we meet an error.

Note: We should check if the error was EOF on caller side everywhere.

Fixes #95

References:
* https://github.com/yitsushi/totp-cli/issues/95

Signed-off-by: Efertone <efertone@pm.me>

1 of 1 new or added line in 1 file covered. (100.0%)

152 of 384 relevant lines covered (39.58%)

3.78 hits per line

Jobs
ID Job ID Ran Files Coverage
1 6585551217.1 20 Oct 2023 08:53AM UTC 8
39.58
GitHub Action Run
Source Files on build 6585551217
  • Tree
  • List 8
  • Changed 1
  • Source Changed 1
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #6585551217
  • ac5543a9 on github
  • Prev Build on v1.8.1 (#6410664679)
  • Next Build on main (#6762405119)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc