Created
October 28, 2019 08:03
-
-
Save c1982/91f592533c044128da22f4272ee3136c to your computer and use it in GitHub Desktop.
no-global-var
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
var levels = []string{"LVL1","LVL2","LVL3"} | |
func main(){ | |
fmt.Println(levels) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
func levels() []string{ | |
return []string{"LVL1","LVL2","LVL3"} | |
} | |
func main(){ | |
fmt.Println(levels()) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment