read eval print loop - How to load local go file by using gore -
i installed gore
use repl.
and want check behavior of parsefulltimespec
function in file.
https://github.com/dshearer/jobber/blob/master/jobfile/time_spec.go#l79
i tried :import github.com/dshearer/jobber/jobfile/time_spec.go
, returned error error: import: can't find import:
i tried relative path after git clone
, couldn't import anyway.
what right way load go file gore
?
installing package workplace
to install package workplace did this:
mkdir $gopath/src/github.com/dshearer cd $gopath/src/github.com/dshearer git clone git@github.com:dshearer/jobber.git go install github.com/dshearer/jobber/jobfile
it returns error:
# github.com/dshearer/jobber/common src/github.com/dshearer/jobber/common/sudo.go:15: undefined: sudo_cmd
and couldn't install common
package error undefined: sudo_cmd
.
go install github.com/dshearer/jobber/common # github.com/dshearer/jobber/common src/github.com/dshearer/jobber/common/sudo.go:15: undefined: sudo_cmd
you need import package itself, that file part of. can't import files separately in go.
:import github.com/dshearer/jobber/jobfile
Comments
Post a Comment