Web Development With Golang Echo Part 1

Echo High performance, minimalist Go web framework github: Echo Features Optimized HTTP router which smartly prioritize routes Build robust and scalable RESTful APIs Group APIs Extensible middleware framework Define middleware at root, group or route level Data binding for JSON, XML and form payload Handy functions to send variety of HTTP responses Centralized HTTP error handling Template rendering with any template engine Define your format for the logger Highly customizable Automatic TLS via Let’s Encrypt HTTP/2 support Example package main import ( "fmt" "log" "math/rand" "net/http" "strconv" "time" "github.

Golang Slice Tricks

Append Slice package main import ( "fmt" ) func main() { var s1 = []int{1,2,3} var s2 = []int{4,5,6} s1 = append(s1, s2...) fmt.Println(s1) // [1 2 3 4 5 6] } Copy package main import ( "fmt" ) func main() { a := []int{1,2,3,4} b := make([]int, len(a)) copy(b, a) fmt.Println("b: ", b) c := append([]int(nil), a...) fmt.Println("c: ", c) // or d := append(a[:0:0], a...) fmt.Println("d: ", d)

Learn Postgresql Part 1

PostgreSQL PostgreSQL是自由的对象-关系型数据库服务器(数据库管理系统),在BSD许可证下发行。 – (wikipedia)[https://zh.wikipedia.org/zh-cn/PostgreSQL] Features

Effective Go

高效的 go Effective Go 学习如何写出高效,地道的 Go 代码 格式化 Golang 用 gofmt 格式化代码。 使用tabs进行缩进 Go没有行长度限制 Go 相比 C 和 Java 只需要很少的括号,if,