CanonicalLtd / UCWifiConnect

The code of this project has been moved to https://code.launchpad.net/~snappy-hwe-team/snappy-hwe-snaps/+git/wifi-connect
GNU General Public License v3.0
2 stars 2 forks source link

refactored folders #13

Closed rmescandon closed 7 years ago

rmescandon commented 7 years ago

Moved go code to the root of the project

Current folders structure doesn't let getting packages paths properly, as its complete path includes "src" currently, so that an import like "github.com/CanonicalLtd/UCWifiConnect/netman" would not get that package as it will be found at "github.com/CanonicalLtd/UCWifiConnect/src/netman". This is not a problem when building snap as "github.com/CanonicalLtd/UCWifiConnect" is taken as the local path to the sources, no matter where the sources are locally. But that's a problem if referring those packages from other go code, as they will be searched in that location in repository and not found. (go get will not find them)

knitzsche commented 7 years ago

Can you please say why you want to refactor the source tree?

rmescandon commented 7 years ago

done

knitzsche commented 7 years ago

So the purpose is to allow building/running the code locally in the source tree, in addition to building/running the code as a snap? (Excellent goal by the way)

rmescandon commented 7 years ago

Yes, exactly. The goal is allowing building the snap, launch go test scripts to verify them, run go code locally or even including packages in other go code out of this project

knitzsche commented 7 years ago

can you please show how to run go locally, for example: cmds/netman/cmd_netman.go

rmescandon commented 7 years ago

go run cmds/netman/cmd_netman.go should be enough

rmescandon commented 7 years ago

you need to have the project in $GOPATH/src/github.com/CanonicalLtd/UCWifiConnect for go run cmds/netman/cmd_netman.go to work ok