Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid adding newlines to output by default #15

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions ask.go
Expand Up @@ -62,7 +62,7 @@ func (i *UI) Ask(query string, opts *Options) (string, error) {
break
}

fmt.Fprintf(i.Writer, "Input must not be empty.\n\n")
fmt.Fprintf(i.Writer, "Input must not be empty.")
continue
}

Expand All @@ -74,7 +74,7 @@ func (i *UI) Ask(query string, opts *Options) (string, error) {
break
}

fmt.Fprintf(i.Writer, "Failed to validate input string: %s\n\n", err)
fmt.Fprintf(i.Writer, "Failed to validate input string: %s", err)
continue
}

Expand Down
8 changes: 4 additions & 4 deletions select.go
Expand Up @@ -87,7 +87,7 @@ func (i *UI) Select(query string, list []string, opts *Options) (string, error)
break
}

fmt.Fprintf(i.Writer, "Input must not be empty. Answer by a number.\n\n")
fmt.Fprintf(i.Writer, "Input must not be empty. Answer by a number.")
continue
}

Expand All @@ -100,7 +100,7 @@ func (i *UI) Select(query string, list []string, opts *Options) (string, error)
}

fmt.Fprintf(i.Writer,
"%q is not a valid input. Answer by a number.\n\n", line)
"%q is not a valid input. Answer by a number.", line)
continue
}

Expand All @@ -112,7 +112,7 @@ func (i *UI) Select(query string, list []string, opts *Options) (string, error)
}

fmt.Fprintf(i.Writer,
"%q is not a valid choice. Choose a number from 1 to %d.\n\n",
"%q is not a valid choice. Choose a number from 1 to %d.",
line, len(list))
continue
}
Expand All @@ -125,7 +125,7 @@ func (i *UI) Select(query string, list []string, opts *Options) (string, error)
break
}

fmt.Fprintf(i.Writer, "Failed to validate input string: %s\n\n", err)
fmt.Fprintf(i.Writer, "Failed to validate input string: %s", err)
continue
}

Expand Down