This file contains hidden or 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 | |
| import ( | |
| "fmt" | |
| "unicode/utf8" | |
| ) | |
| func main() { | |
| // empty string | |
| var str string |
This file contains hidden or 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 | |
| import "fmt" | |
| func main() { | |
| a := 2 | |
| b := &a | |
| *b = 3 // a = 3 | |
| c := &a // new variable pointer A | |
| fmt.Println(a, b, c) |
This file contains hidden or 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 | |
| import "fmt" | |
| const pi = 3.14 | |
| const ( | |
| hello = "Hello" | |
| e = 2.718 | |
| ) |
NewerOlder