Guest User

Untitled

a guest
Dec 3rd, 2018
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. package main
  2.  
  3. import (
  4. "fmt"
  5. "strings"
  6. )
  7.  
  8. const emailList = "bob@gmail.com tom@gmail.com bob@gmail.com"
  9. func main() {
  10.  
  11. // create a new slice by calling the Fields function
  12. emails := strings.Fields(emailList)
  13.  
  14. // loop over the slice and print out the words
  15. for _, email := range emails {
  16. fmt.Println(email)
  17. }
  18. }
Add Comment
Please, Sign In to add comment