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

yitsushi / totp-cli
40%
master: 20%

Build:
Build:
LAST BUILD BRANCH: dependabot/go_modules/golang.org/x/crypto-0.45.0
DEFAULT BRANCH: master
Repo Added 22 Jun 2020 10:41AM UTC
Files 26
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

LAST BUILD ON BRANCH v1.8.2
branch: v1.8.2
CHANGE BRANCH
x
Reset
  • v1.8.2
  • 125-vendor-package-for-gentoo
  • 133-add-sha2
  • 136-add-time-period
  • 38-auto-versioning
  • 47-clear-prefix
  • 74-fix-update-error-handling
  • 88-remaining-time
  • 95-fix-no-newline-input
  • add-prefix
  • add-release-signing
  • add-signing-keys-to-readme
  • add-update-command
  • dependabot/go_modules/filippo.io/age-1.2.1
  • dependabot/go_modules/github.com/go-viper/mapstructure/v2-2.3.0
  • dependabot/go_modules/github.com/go-viper/mapstructure/v2-2.4.0
  • dependabot/go_modules/golang.org/x/crypto-0.17.0
  • dependabot/go_modules/golang.org/x/crypto-0.31.0
  • dependabot/go_modules/golang.org/x/crypto-0.45.0
  • document-default-cred-path
  • fix-release-build
  • import-command
  • improve-kdf-test-pr-check
  • main
  • master
  • pass-with-env
  • put-windows-back
  • refactor-storage
  • refs/tags/v1.2.0
  • refs/tags/v1.2.1
  • refs/tags/v1.2.2
  • refs/tags/v1.2.3
  • refs/tags/v1.2.4
  • refs/tags/v1.2.5
  • refs/tags/v1.2.6
  • refs/tags/v1.2.7
  • refs/tags/v1.3.0
  • refs/tags/v1.3.1
  • refs/tags/v1.3.2
  • refs/tags/v1.3.3
  • refs/tags/v1.4.0
  • refs/tags/v1.5.0
  • refs/tags/v1.5.1
  • refs/tags/v1.5.2
  • refs/tags/v1.5.3
  • refs/tags/v1.6.0
  • refs/tags/v1.7.0
  • remove-panic
  • remove-update-command
  • remove-util
  • rename-account
  • return-nil
  • small-changes
  • some-cleanup
  • some-random-fixes
  • try-to-fix-autocomplete
  • update-checkout-action
  • update-deps
  • update-deps-20240619
  • update-go-cleanup
  • update-some-comments
  • update-workflow-versions
  • use-urfave
  • v1.1.10
  • v1.1.11
  • v1.1.12
  • v1.1.13
  • v1.8.0
  • v1.8.1
  • v1.8.3
  • v1.8.4
  • v1.8.5
  • v1.8.6
  • v1.8.7
  • v1.8.8
  • v1.9.0
  • v1.9.1
  • v1.9.2

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

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

Relevant lines Covered
Build:
Build:
384 RELEVANT LINES 152 COVERED LINES
3.78 HITS PER LINE
Source Files on v1.8.2
Detailed source file information is not available for this build.

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
6585561362 v1.8.2 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 "re... push 20 Oct 2023 08:54AM UTC web-flow github
39.58
See All Builds (253)
  • Repo on GitHub
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

© 2026 Coveralls, Inc