go 结构体、方法、接口
2020-12-18 本文已影响0人
老鼠慎言
package main
import "fmt"
func main() {
type Books struct {
title string
author string
subject string
book_id int
}
s := Books{"ask", "jane", "math", 123}
fmt.Print(s)
}
输出
{ask jane math 123}