gobyexample/linefilter/linefilter.go
2024-05-03 17:02:30 +05:30

22 lines
248 B
Go

package linefilter
import (
"bufio"
"fmt"
"os"
"strings"
)
func LineFilter() {
sc := bufio.NewScanner(os.Stdin)
for sc.Scan() {
cap := strings.ToUpper(sc.Text())
fmt.Println(cap)
}
if err := sc.Err(); err != nil {
panic(err)
}
}