Skip to content

how do you run it? #33

Description

@CouldBeThis

Hi, Sorry for the stupid question. But how does one run this? I have not worked with go applications much and not at all on this machine so I installed golang from synaptic; I don't know if it's like python or ruby where you have to massage the environment sometimes; maybe I am just missing a component.

Below is what I did if it's of any interest (may not be) but what I am really hoping for is to learn:

  1. what are the dependencies, environment requirements etc? I have go version go1.10.4 linux/amd64; is it sufficient?
  2. how are you supposed to invoke it? presumably something needs to get put on the path..? I'm missing the step.

Any hints appreciated! :) Thank you for making and sharing a program to deal with this very tenacious problem in git.


Anyway first I tried installing via Go:

$ go get github.com/prydonius/karn/cmd/karn

# github.com/prydonius/karn/cmd/karn
go/src/github.com/prydonius/karn/cmd/karn/karn.go:16:5: app.Author undefined (type *cli.App has no field or method Author)
go/src/github.com/prydonius/karn/cmd/karn/karn.go:17:5: app.Email undefined (type *cli.App has no field or method Email)
go/src/github.com/prydonius/karn/cmd/karn/karn.go:19:15: cannot use commands() (type []cli.Command) as type []*cli.Command in assignment
go/src/github.com/prydonius/karn/cmd/karn/karn.go:28:10: cannot use func literal (type func(*cli.Context)) as type cli.ActionFunc in field value
go/src/github.com/prydonius/karn/cmd/karn/karn.go:35:10: cannot use func literal (type func(*cli.Context)) as type cli.ActionFunc in field value
go/src/github.com/prydonius/karn/cmd/karn/karn.go:42:10: cannot use func literal (type func(*cli.Context)) as type cli.ActionFunc in field value

so I downloaded the binary but not sure what to do with any of these files. looked online for how to run golang programs and this was suggested:

$ go run karn.go
go run: cannot run non-main package

Looked into that error code and couldn't find anything that made sense.

Tried running it like anything else,

$ ./karn.go 
zsh: permission denied: ./karn.go

so gave some permissions:

$ chmod +x karn.go 
./karn.go       
./karn.go: package: not found
./karn.go: Syntax error: newline unexpected (expecting ")")

And I gave up. :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions