You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
303 B
Go
21 lines
303 B
Go
7 years ago
|
package main
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
"os"
|
||
|
)
|
||
|
|
||
|
var my_name = "Drew"
|
||
|
var program_name = os.Args[0]
|
||
|
|
||
|
func main() {
|
||
|
fmt.Println("Starting up program:", program_name)
|
||
|
change_name(&my_name)
|
||
|
fmt.Println("Ok so you name is:", my_name)
|
||
|
|
||
|
}
|
||
|
|
||
|
func change_name(name *string) {
|
||
|
*name = "Your name is no longer useful"
|
||
|
}
|