mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-03-30 15:08:33 +00:00

* Export DefaultPath + Add logging to kaspawallet daemon * Export purpose and CoinType instead of defaultPath * Move TODO to correct place
19 lines
342 B
Go
19 lines
342 B
Go
package utils
|
|
|
|
import (
|
|
"bufio"
|
|
"strings"
|
|
|
|
"github.com/pkg/errors"
|
|
)
|
|
|
|
// ReadLine reads one line from the given reader with trimmed white space.
|
|
func ReadLine(reader *bufio.Reader) (string, error) {
|
|
line, err := reader.ReadBytes('\n')
|
|
if err != nil {
|
|
return "", errors.WithStack(err)
|
|
}
|
|
|
|
return strings.TrimSpace(string(line)), nil
|
|
}
|