Type Declaration
Contoh code
package main
import (
"fmt"
)
func main() {
type NoKTP string
var KTPNumber NoKTP = "43284234928347293"
fmt.Println(KTPNumber)
type IsValid bool
var isValid IsValid = true
fmt.Println(isValid)
type exp complex128
var num exp = 2 + 5i
fmt.Println(num)
}Type Alias dan Type Definition
Last updated