Quick actions

cmd+k|ctrl+k

Navigation

Languages

Prove Pointer in Struct is More Safety

Snippet info

Language

Go

Visibility

public

Author

ubaidillah.hf

Created

2022-08-31T02:16:50.393231Z

Updated

2022-08-31T02:17:02.051402Z

package main

import (
    "fmt"
)

func main() {
    
    type coba struct{
        tes *string
    }
    
    var okee coba
    var tesPointer *string
    okee.tes = tesPointer
    
    fmt.Println("Hello World! ==>", okee.tes)
}
INFO