jroimartin / gocui

Minimalist Go package aimed at creating Console User Interfaces.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Example is outdate

vit1251 opened this issue · comments

Main page example does not compile under last release v0.3.0

.\main.go:11:9: assignment mismatch: 2 variables but 1 values
.\main.go:11:24: too many arguments in call to gocui.NewGui
.\main.go:11:25: undefined: gocui.OutputNormal

That's not because the docs are outdated, that's because there hasn't been a new release since Oct 2016.

If you're using go dep you can just update Gopkg.toml with

[[constraint]]
  name = "github.com/jroimartin/gocui"
  # version = "0.3.0" <- one the maintainers will release a new version, revert to that, safer
  revision = "c055c87"

@boazj right now Go start using go.mod with new dependency syntax.

@vit1251 from the docs:

Pseudo-versions

The go.mod file and the go command more generally use semantic versions as
the standard form for describing module versions, so that versions can be
compared to determine which should be considered earlier or later than another.
A module version like v1.2.3 is introduced by tagging a revision in the
underlying source repository. Untagged revisions can be referred to
using a "pseudo-version" like v0.0.0-yyyymmddhhmmss-abcdefabcdef,
where the time is the commit time in UTC and the final suffix is the prefix
of the commit hash. The time portion ensures that two pseudo-versions can
be compared to determine which happened later, the commit hash identifes
the underlying commit, and the prefix (v0.0.0- in this example) is derived from
the most recent tagged version in the commit graph before this commit.

So simply:

require (
	github.com/jroimartin/gocui v0.0.0-20180411155010-c055c87ae801
)

Might be wrong about the timestamp, but it shouldn't matter much

@boazj create Gihub tag is simple way to report your users about version is release. How about create v1.0 and continue working under next version. I see that you doing it more than years. Each version may contain example and no more problem with examples.

Hey, preaching to the choir here. I'm not a maintainer of this project, just someone presently evaluating this project and trying to help out.
I would love @jroimartin to release a proper version so I won't have to do this very same hack myself.

If this is no longer maintained by the original owner then maybe this project should be open to additional maintainers or ownership transfer.

I tagged HEAD as v0.4.0. That should fix the problem.

Right now example work.
I close issue.
Thanks.