Skip to content

Commit

Permalink
update command
Browse files Browse the repository at this point in the history
  • Loading branch information
adierebel committed Aug 10, 2018
1 parent 3f88f88 commit fbdac2d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ Add goswitch executable to PATH variable, so you can access goswitch everywhere

- Copy `goswitch.exe` to `C:\Program Files\GoSwitch\goswitch.exe`
- Open `Control Panel` -> `System and Security` -> `System` -> `Advanced system settings` -> Click button `Environment Variables..`
- On tab User variables for %user%, edit `PATH` and add `;C:\Program Files\GoSwitch` on end of text
- On tab User variables for %user%, edit `PATH` and add `;C:\Program Files\GoSwitch` at the end
- Open new CMD, type `goswitch`
9 changes: 6 additions & 3 deletions goswitch.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,19 @@ import (

var (
// Define variable
new_cmd = kingpin.Command("new", "Create new GOPATH workdir.")
env_name = kingpin.Flag("name", "Name of new GOPATH workdir.").Short('n').Default("GOPATH").String()
target_path = kingpin.Flag("path", "Target path for script files.").Short('p').Default("scripts").String()
filemode = kingpin.Flag("filemode", "Filemode for creating file and directory.").Short('m').Default("0644").Int()
)

func main() {
// Parse arguments
kingpin.Version("1.0.0")
kingpin.Parse()
apply()
kingpin.Version("1.0.1")
switch kingpin.Parse() {
case "new":
apply()
}
}

func apply() {
Expand Down

0 comments on commit fbdac2d

Please sign in to comment.