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 | |
import ( | |
"sync/atomic" | |
"time" | |
) | |
var sharedIntForAtomic int64 = 0 | |
var unusedValueForAtomic int = 0 |
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 | |
import "fmt" | |
func main() { | |
var pointerToInt *int = ReturnStackVariable() | |
fmt.Printf("Here is the number! %v\n", *pointerToInt) | |
} | |
func ReturnStackVariable() *int { |