You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
219 B

package util
import (
"bufio"
"strings"
)
func ReadLine(r *bufio.Reader) (string, error) {
text, err := r.ReadString('\n')
if err != nil {
return text, err
}
text = strings.TrimSpace(text)
return text, err
}