Make gitignore client more portable, without relying on the shell, curl, wget or any other http client.
go get -u github.com/cuonglm/gogi
import (
"fmt"
"log"
"github.com/cuonglm/gogi"
)
func main() {
gogiClient, _ := gogi.NewHTTPClient()
data, err := gogiClient.List()
if err != nil {
log.Fatal(err)
}
fmt.Println(data)
}
$ go get github.com/cuonglm/gogi/cmd/gogi
$ gogi
Usage of gogi:
-create string
Create .gitignore content for given types
-list
List all defined types
-search string
Show all types match string
$ docker pull gnouc/gogi
$ docker run --rm gnouc/gogi -search python
ipythonnotebook
python
Building builder image
docker build -t gogi-builder -f Dockerfile.build .
Building binary image
docker run --rm gogi-builder | docker build -t gogi -f Dockerfile.run -
GOGI_API_URL
to change your gitignore server, default to https://www.gitignore.io
Cuong Manh Le cuong.manhle.vn@gmail.com
See LICENSE