gobuch/golang-language-samples/type-alias-definition/type-definition.go

14 lines
196 B
Go
Raw Permalink Normal View History

2020-08-21 04:26:40 +00:00
package main
import "fmt"
type (
A1 = string // A1 und string bezeichen identische Typen
A2 = A1 // A2 und A1 bezeichen identische Typen
)
func main() {
var text A2
fmt.Println(text)
}