|
|
- package Helper
-
- import (
- "bufio"
- "os"
- "strings"
- )
-
- var (
- reader *bufio.Reader = bufio.NewReader(os.Stdin)
- )
-
- func Input() string {
- var (
- text string
- e error
- )
- text, e = reader.ReadString('\n')
- if e != nil {
- panic(e)
- }
- // convert CRLF to LF
- return strings.Replace(text, "\n", "", -1)
- }
|