mirror of
https://github.com/fiatjaf/nak.git
synced 2024-11-22 00:09:08 -05:00
trim spaces from stdin.
This commit is contained in:
parent
50dde2117c
commit
c6e9fdd053
|
@ -6,6 +6,7 @@ import (
|
|||
"io"
|
||||
"net/url"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
@ -16,7 +17,7 @@ func getStdin() string {
|
|||
read := bytes.NewBuffer(make([]byte, 0, 1000))
|
||||
_, err := io.Copy(read, os.Stdin)
|
||||
if err == nil {
|
||||
return read.String()
|
||||
return strings.TrimSpace(read.String())
|
||||
}
|
||||
}
|
||||
return ""
|
||||
|
|
Loading…
Reference in New Issue
Block a user