This commit is contained in:
Mark McGranaghan
2013-12-19 11:31:08 -08:00
parent e5ff8baebb
commit 7a06385ccf
3 changed files with 24 additions and 38 deletions

View File

@@ -22,16 +22,16 @@ func main() {
// advances the scanner to the next token; which is
// the next line in the default scanner.
scanner := bufio.NewScanner(os.Stdin)
for scanner.Scan() {
// `Text` returns the current token, here the next line,
// from the input.
// from the input.
ucl := strings.ToUpper(scanner.Text())
// Write out the uppercased line.
fmt.Println(ucl)
}
// Check for errors during `Scan`. End of file is
// expected and not reported by `Scan` as an error.
if err := scanner.Err(); err != nil {

View File

@@ -1,2 +1,2 @@
fe6d70a3115bd0974aa6f3f8444bb539d17fc027
OSS71nSpkV
87f4a67edf741979f8ff6da85947aa177547f9ef
mpYwOHj2ma