rakelkar / gonetsh

GO wrapper for the windows NETSH tool
Apache License 2.0
11 stars 11 forks source link

Replace gorillalabs/go-powershell with bhendo/go-powershell #10

Closed professor closed 5 years ago

professor commented 5 years ago

It appears that the repository at https://github.com/gorillalabs/go-powershell/ no longer exists and has been moved to https://github.com/bhendo/go-powershell

I did a diff of the two repos and they are the same

Authored-by: Todd Sedano tsedano@pivotal.io

rakelkar commented 5 years ago

They are indeed the same, can you update the vendored folder as well?

professor commented 5 years ago

@rakelkar --- I made the change you suggested. Thanks in advance for merging this PR.

rakelkar commented 5 years ago

whoops mv is not enough... you have to clone the new repo into vendor...

e:\go\src\github.com\rakelkar\gonetsh (replace-go-powershell)
λ go build -v ./...
vendor\bhendo\go-powershell\shell.go:11:2: cannot find package "github.com/gorillalabs/go-powershell/backend" in any of:
        C:\Go\src\github.com\gorillalabs\go-powershell\backend (from $GOROOT)
        C:\Users\rakelkar\go\src\github.com\gorillalabs\go-powershell\backend (from $GOPATH)
vendor\bhendo\go-powershell\shell.go:12:2: cannot find package "github.com/gorillalabs/go-powershell/utils" in any of:
        C:\Go\src\github.com\gorillalabs\go-powershell\utils (from $GOROOT)
        C:\Users\rakelkar\go\src\github.com\gorillalabs\go-powershell\utils (from $GOPATH)
professor commented 5 years ago

Thanks. There's a new commit that updates the references.

BTW, you need to run the build.ps1 file which downloads the dependencies.

go get ./...
go build -v ./...

For example, on master, when I do a go build -v ./... there are many packages that I need to go get... netroute/netroute.go:10:2: cannot find package "github.com/gorillalabs/go-powershell" in any of: /usr/local/Cellar/go/1.12.1/libexec/src/github.com/gorillalabs/go-powershell (from $GOROOT) /Users/pivotal/go/src/github.com/gorillalabs/go-powershell (from $GOPATH) netroute/netroute.go:11:2: cannot find package "github.com/gorillalabs/go-powershell/backend" in any of: /usr/local/Cellar/go/1.12.1/libexec/src/github.com/gorillalabs/go-powershell/backend (from $GOROOT) /Users/pivotal/go/src/github.com/gorillalabs/go-powershell/backend (from $GOPATH) netsh/netsh.go:12:2: cannot find package "k8s.io/utils/exec" in any of: /usr/local/Cellar/go/1.12.1/libexec/src/k8s.io/utils/exec (from $GOROOT) /Users/pivotal/go/src/k8s.io/utils/exec (from $GOPATH) netsh/testing/fake_netsh.go:20:2: cannot find package "github.com/rakelkar/gonetsh/netsh" in any of: /usr/local/Cellar/go/1.12.1/libexec/src/github.com/rakelkar/gonetsh/netsh (from $GOROOT) /Users/pivotal/go/src/github.com/rakelkar/gonetsh/netsh (from $GOPATH)

On this branch, if I execute these commands, this works fine:

go get ./...
go build -v ./...