Skip to content
forked from newtorn/newgo

Easily using golang in your different projects with newgo

License

Notifications You must be signed in to change notification settings

hokuhouhi/newgo

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

En | 中文

NewGO

Easily use golang in your different projects with newgo

GitHub release Github repository Github license

About

newgo is a GOPATH solution tool. Officially to build and run go packages, your must have global or temporary GOPATH and GOBIN enviroment variables, it's a annoying and not enough freedom. Now newgo solved it, so you can easily use golang in your different projects with newgo. And in different projects, it will automatically create temporary GOPATH and GOBIN to system shell enviroment variable.

QuickStart

quickstart

Installation

It's easy to be installed.

MacOS

You can use homebrew to install it.

brew tap newtorn/tap && brew install newgo

Linux

You should download or copy newgo shell script.

# First by method 1
# copy newgo shell script to newgo file

# First by method 2
# or git clone newgo repo
git clone https://github.com/newtorn/newgo.git
cd newgo

# Second
mv newgo /usr/local/bin/newgo

# Test
newgo help

Usage

# first go to your projects
mkdir go-demo
cd go-demo

# initialize newgo
# it will create three floders src, pkg and bin
newgo init

# edit program
mkdir src/hello-app
cd src/hello-app
vim hello.go

# then you can use newgo instead of default go
# exmaple for command go run
newgo run hello.go

# exmaple for command go build
newgo build hello.go

# exmaple for command go install
newgo install hello.go

# Get help
newgo help

Notice

Once you leave current project and initialize newgo in another project, when you enter this project you must reinitialize again to use newgo.

Contributing

I'd love you to contribute to newgo, please read my Contribution Guide

License

Code license with MIT

About

Easily using golang in your different projects with newgo

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 100.0%