摘要:
import ( "io/ioutil" "github.com/gin-contrib/static" "github.com/gin-gonic/gin" ) app := gin.Default() //加载静态资源 app.Use(static.Serve("/", static.Local 阅读全文
摘要:
package main import ( "encoding/base64" "fmt" "log" ) func main() { input := []byte("hello world") // 演示base64编码 encodeString := base64.StdEncoding.En 阅读全文
摘要:
package main import ( "fmt" "github.com/gin-gonic/gin" ) func main() { r := gin.Default() // 设置全局跨域访问 r.Use(CrosHandler()) err :=r.Run(":8887") if err 阅读全文
摘要:
代码如下所示: package main import ( "github.com/thinkerou/favicon" "fmt" "github.com/gin-gonic/gin" ) func main() { r := gin.Default()//设置标签页的logo r.Use(fav 阅读全文