Browse Source

naming

main
David Haukeness 2 years ago
parent
commit
e251b3e927
  1. 14
      keybase.go

14
keybase.go

@ -32,9 +32,9 @@ func NewOptions() *Options { @@ -32,9 +32,9 @@ func NewOptions() *Options {
// 1. What the user has specified as the location [user specified]
// 2. Looks up the binary location using exec.LookPath [default]
// 3. Returns "keybase" and hopes its pathed on the users system [fallback]
func (r *Options) locateKeybase() string {
if r.KeybaseLoction != "" {
return r.KeybaseLoction
func (opt *Options) locateKeybase() string {
if opt.KeybaseLoction != "" {
return opt.KeybaseLoction
}
path, err := exec.LookPath("keybase")
if err != nil {
@ -45,12 +45,12 @@ func (r *Options) locateKeybase() string { @@ -45,12 +45,12 @@ func (r *Options) locateKeybase() string {
}
// buildBaseCommand adds the homedirectory before the args, when required
func (r *Options) buildBaseCommand(args ...string) []string {
func (opt *Options) buildBaseCommand(args ...string) []string {
var cmd []string
if r.HomeDir != "" {
cmd = append(cmd, "--home", r.HomeDir)
if opt.HomeDir != "" {
cmd = append(cmd, "--home", opt.HomeDir)
}
if r.BotLiteMode {
if opt.BotLiteMode {
cmd = append(cmd, "--enable-bot-lite-mode")
}
cmd = append(cmd, args...)

Loading…
Cancel
Save