akamensky / argparse

Argparse for golang. Just because `flag` sucks
MIT License
604 stars 62 forks source link

Flag ignores default value #99

Closed alecbakholdin closed 2 years ago

alecbakholdin commented 2 years ago

Resolves #98 Adds one new field to the arg interface "noDefault" that Flag uses

alecbakholdin commented 2 years ago

Not really sure why this is failing. Seems Travis CI can't find goveralls but it was definitely installed earlier in the build

$ $GOPATH/bin/goveralls -service=travis-ci
/home/travis/.travis/functions: line 109: /home/travis/gopath/bin/goveralls: No such file or directory
The command "$GOPATH/bin/goveralls -service=travis-ci" exited with 127.

Earlier in the build:

$ go get github.com/mattn/goveralls
go: downloading github.com/mattn/goveralls v0.0.11
go: downloading golang.org/x/mod v0.4.2
go: downloading golang.org/x/tools v0.1.1
go: downloading golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1
go: added github.com/mattn/goveralls v0.0.11
akamensky commented 2 years ago

@Alec-Bakholdin thank you for contribution!

I think these build failures have to do with Go command line usage changes, let me have a look.

Edit:

Right, trying this on my desktop with same 1.18.3 installed:

(base) [akamenskiy@hostname ~]$ go install github.com/mattn/goveralls
go: 'go install' requires a version when current directory is not in a module
    Try 'go install github.com/mattn/goveralls@latest' to install the latest version
(base) [akamenskiy@hostname ~]$ go version
go version go1.18.3 linux/amd64
akamensky commented 2 years ago

Looks like the service is having issues. I created a PR to fix the original problem, but it appears the service is currently down and responding with 405 errors. I will check in on it later once they fixed issues on their side (and meantime I think it is worth changing to Github actions perhaps and see if they have coverage reporting within Github service). https://status.coveralls.io/

akamensky commented 2 years ago

@Alec-Bakholdin Please rebase the change onto master to fix coverage reporting

akamensky commented 2 years ago

@Alec-Bakholdin I am sorry to be pedantic about this, can you please avoid cross merging master branch and use rebase instead?

alecbakholdin commented 2 years ago

Not at all! I'm sorry, I'm not familiar with this process, as this is my first contribution ever. I tried to rebase once more, but I think I may have screwed things up again...

I thought I was doing it right. Is the process not to just type git rebase upstream/master from my own branch?

akamensky commented 2 years ago

Merged to master in #103