Advertisement
cwchen

[Go] Array demo.

Sep 20th, 2017
943
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 0.21 KB | None | 0 0
  1. package main
  2.  
  3. import "log"
  4.  
  5. func main() {
  6.     var langs [4]string
  7.  
  8.     langs[0] = "Go"
  9.     langs[1] = "Python"
  10.     langs[2] = "Ruby"
  11.     langs[3] = "PHP"
  12.  
  13.     if !(langs[0] == "Go") {
  14.         log.Fatal("Wrong string")
  15.     }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement