Golang project directory structure

This article by Ben Johnson has guided me on this when I was starting with Go. It’s generally good to start with something like this (assuming you are inside your project directory like $GOPATH/src/myproject: ├──cmd/ — this is where you compose several packages in to main package | ├──foo — an example would be `foo` … Read more

What should be the values of GOPATH and GOROOT?

GOPATH is discussed in the cmd/go documentation: The GOPATH environment variable lists places to look for Go code. On Unix, the value is a colon-separated string. On Windows, the value is a semicolon-separated string. On Plan 9, the value is a list. GOPATH must be set to get, build and install packages outside the standard … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)