Skip to content

Instantly share code, notes, and snippets.

@javouhey
Created March 7, 2014 05:13
Show Gist options
  • Select an option

  • Save javouhey/9405636 to your computer and use it in GitHub Desktop.

Select an option

Save javouhey/9405636 to your computer and use it in GitHub Desktop.
#golang bufio.NewScanner
func parse(str string) map[string]string {
scanner := bufio.NewScanner(strings.NewReader(str))
for scanner.Scan() {
fmt.Println("=> ", scanner.Text())
}
return nil
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment