Skip to content

Commit

Permalink
fix: Trim whitespace before returning (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
kinbiko committed Dec 4, 2021
1 parent afe60bb commit c063958
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/kokodoko/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (

// Globals are used to enable Bugsnag.
// Must be updated per release.
const appVersion = "0.2.1"
const appVersion = "0.2.2"

//nolint:gochecknoglobals // The following are intended to be set via ldflags, for developers.
var (
Expand Down
3 changes: 2 additions & 1 deletion kokodoko.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ func (k *Kokodoko) Run(ctx context.Context, args []string) (string, error) {
url := fmt.Sprintf("%s/blob/%s%s%s", remoteURL, hash, filePathRelativeToGitRoot, lines)
k.o11y.WithMetadatum(ctx, "candidate", "url", url)

return url, nil
// Remove any whitespace that still exist in the string for whatever reason
return strings.Join(strings.Fields(url), ""), nil
}

func (k *Kokodoko) readArg(ctx context.Context, args []string) (string, string, error) {
Expand Down

0 comments on commit c063958

Please sign in to comment.