ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、视频、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
go.mod ``` module hello go 1.18 ``` hello.go ``` package main import (     m "hello/model"//m为别名,可以不加 ) func main() {     u1 := m.User{         Age:  100,         Name: "u1",     }     u1.ToString() } ``` model/user.go ``` package model import "fmt" type User struct {     Age  int     Name string } func (u User) ToString() {     fmt.Printf("Name=%s Age=%d\n", u.Name, u.Age) } ```