Home > Article > Backend Development > How to use golang gf
GF (Go Frame) is a modular, loosely coupled, lightweight, high-performance Go language web development framework. (Recommended learning: go)
Supports hot restart, hot update, multiple domain names, multiple ports, multiple services, HTTP/HTTPS, dynamic routing and other features, and provides Web A series of core components for service development.
Such as: Router, Cookie, Session, service registration, configuration management, template engine, data verification, paging management, database ORM, etc., and provides dozens of practical development module sets.
Such as: cache, log, time, command line, binary, file lock, object pool, connection pool, data encoding, process management, process communication, TCP/UDP components, concurrent security container, Goroutine pool, etc. Etc., etc.
Installation
go get -u gitee.com/johng/gf
Restrictions
golang版本 >= 1.9.2
Usage
Hello World
package main import ( "gitee.com/johng/gf/g" "gitee.com/johng/gf/g/net/ghttp" ) func main() { s := g.Server() s.BindHandler("/", func(r *ghttp.Request) { r.Response.Write("Hello World") }) s.Run() }
The above is the detailed content of How to use golang gf. For more information, please follow other related articles on the PHP Chinese website!