Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,2 @@
src := "Hello"
dst := src

View file

@ -0,0 +1,22 @@
package main
import "fmt"
func main() {
// creature string
var creature string = "shark"
// point to creature
var pointer *string = &creature
// creature string
fmt.Println("creature =", creature) // creature = shark
// creature location in memory
fmt.Println("pointer =", pointer) // pointer = 0xc000010210
// creature through the pointer
fmt.Println("*pointer =", *pointer) // *pointer = shark
// set creature through the pointer
*pointer = "jellyfish"
// creature through the pointer
fmt.Println("*pointer =", *pointer) // *pointer = jellyfish
// creature string
fmt.Println("creature =", creature) // creature = jellyfish
}