摘要:
package main import ( "fmt" ) type People struct { Name string Country string } func (p People)Print(){ fmt.Printf("name=%s country=%s\n",p.Name,p.Cou 阅读全文
posted @ 2022-03-18 23:55
ty1539
阅读(118)
评论(0)
推荐(0)
摘要:
package main import ( "encoding/json" "fmt" ) type Student struct{ Id string Name string Sex string } type Class struct{ Count int Name string Student 阅读全文
posted @ 2022-03-18 23:37
ty1539
阅读(128)
评论(0)
推荐(0)
摘要:
package main import ( "fmt" ) type Integer int func (i Integer) Print() { fmt.Println(i) } func main() { var a Integer a =100 a.Print() var b int=200 阅读全文
posted @ 2022-03-18 23:19
ty1539
阅读(49)
评论(0)
推荐(0)
摘要:
package main import ( "fmt" ) type Animal struct { Name string Sex string } func (a *Animal)Talk(){ fmt.Printf("Animal is talk, i'm %s\n", a.Name) } f 阅读全文
posted @ 2022-03-18 23:16
ty1539
阅读(67)
评论(0)
推荐(0)
摘要:
package main import ( "fmt" "os" //"MyProject/pingguoxueyuan/gostudy/listen13/homework/student_mgr" ) // 把下面这个结构体和函数注释了就不能单独go run 运行了,要go build才能把2个文 阅读全文
posted @ 2022-03-18 23:02
ty1539
阅读(49)
评论(0)
推荐(0)
摘要:
package main import ( "fmt" ) type Address struct { Province string City string CreateTime string } type Email struct { Account string CreateTime stri 阅读全文
posted @ 2022-03-18 22:18
ty1539
阅读(928)
评论(0)
推荐(0)
摘要:
package main import ( "fmt" ) type User struct { Username string Sex string Age int int string } type Address struct { Province string City string } t 阅读全文
posted @ 2022-03-18 21:38
ty1539
阅读(39)
评论(0)
推荐(0)
摘要:
package main import "fmt" func test1() { var a interface{} // 空接口可以实现任何类型的变量 var b int =100 a = b fmt.Printf("test1 00> %T %v \n",a,a) var c string = 阅读全文
posted @ 2022-03-18 19:24
ty1539
阅读(56)
评论(0)
推荐(0)
摘要:
package main import("fmt") type Programer struct { name string base float32 extra float32 } func (p Programer) CalcSalary() float32 { return p.base } 阅读全文
posted @ 2022-03-18 19:17
ty1539
阅读(54)
评论(0)
推荐(0)
摘要:
package main import ( "fmt" "io" "net/http" ) func main(){ //获取服务器应答包内容 resp,err := http.Get( "http://www.baidu.com") if err != nil { fmt.Println( "ht 阅读全文
posted @ 2022-03-18 18:51
ty1539
阅读(72)
评论(0)
推荐(0)
摘要:
package main import ( "fmt" "net/http" "os" ) func OpenSendFile(fName string, w http.ResponseWriter) { //pathFileName := "C:/itcast/test" + fNmae path 阅读全文
posted @ 2022-03-18 18:49
ty1539
阅读(40)
评论(0)
推荐(0)
摘要:
https://blog.csdn.net/flyfreelyit/article/details/80281467 https://blog.csdn.net/qq_27295403/article/details/110469972 https://blog.csdn.net/qq_290611 阅读全文
posted @ 2022-03-18 18:28
ty1539
阅读(58)
评论(0)
推荐(0)

浙公网安备 33010602011771号