摘要: https://blog.csdn.net/skh2015java/article/details/83583516 点击查看代码 //http请求 func httpHandle(method, urlVal,data string) { client := &http.Client{} var 阅读全文
posted @ 2022-03-07 23:56 ty1539 阅读(1534) 评论(0) 推荐(0) 编辑
摘要: https://blog.csdn.net/qq_21852449/article/details/88093941 点击查看代码 package hsession import ( "crypto/rand" "encoding/base64" "io" "net/http" "net/url" 阅读全文
posted @ 2022-03-07 23:47 ty1539 阅读(407) 评论(0) 推荐(0) 编辑
摘要: 点击查看代码 package main import "fmt" type Animal interface{ Talk() Eat() Name() string } type Dog struct{} func (d *Dog) Talk(){ fmt.Println("汪汪汪") } func 阅读全文
posted @ 2022-03-07 23:44 ty1539 阅读(34) 评论(0) 推荐(0) 编辑
摘要: 点击查看代码 package main import "fmt" func test(a interface{}){ fmt.Printf("你好啊%#v==%v==%T==%p\n",a,a,a,&a) // 将接口类型的变量转化为具体类型 加个OK 判断, 可以避免程序直接崩溃, ok=fals 阅读全文
posted @ 2022-03-07 23:22 ty1539 阅读(26) 评论(0) 推荐(0) 编辑
摘要: 点击查看代码 package main import "fmt" type Animal interface{ Talk() Eat() Name() string } type Dog struct{} func (d Dog) Talk(){ fmt.Println("汪汪汪") } func 阅读全文
posted @ 2022-03-07 23:09 ty1539 阅读(22) 评论(0) 推荐(0) 编辑
摘要: 点击查看代码 package main import "fmt" type Animal interface{ Talk() Eat() Name() string //string 是方法返回的类型 } type Describle interface{ Describle() } type Av 阅读全文
posted @ 2022-03-07 22:08 ty1539 阅读(23) 评论(0) 推荐(0) 编辑
摘要: https://github.com/markusleevip/go-shici https://github.com/joizhang/learn-golang 阅读全文
posted @ 2022-03-07 21:41 ty1539 阅读(34) 评论(0) 推荐(0) 编辑