github.com/graybobo/golang.org-package-offline-cache@v0.0.0-20200626051047-6608995c132f/x/talks/2014/taste/idents.go (about) 1 // +build OMIT 2 3 package main // idents.go 4 5 import ( 6 "fmt" 7 "os" 8 "text/scanner" 9 ) 10 11 func main() { 12 var s scanner.Scanner 13 s.Init(os.Stdin) 14 for { 15 switch s.Scan() { 16 case scanner.EOF: 17 return // all done 18 case scanner.Ident: 19 fmt.Println(s.TokenText()) 20 } 21 } 22 }