evolbioinfo / gotree

Gotree is a set of command line tools and an API to manipulate phylogenetic trees. It is implemented in Go language.
GNU General Public License v2.0
120 stars 15 forks source link

nexus_parser.go:169:15: cannot use func literal (type func(string, string)) as type func(string, string) bool in argument to al.seqbag.Iterate #8

Closed bjoernkjoshanssen closed 4 years ago

bjoernkjoshanssen commented 4 years ago

Got the above error when running go get github.com/evolbioinfo/gotree/

fredericlemoine commented 4 years ago

Which version of go is installed? (go version)

bjoernkjoshanssen commented 4 years ago

1.13

fredericlemoine commented 4 years ago

Thanks for pointing out this issue. When using go get, the latest version of goalign dependency is retrieved. In that version, the iterators have changed. It should work now.

bjoernkjoshanssen commented 4 years ago

Thanks for the quick response, but I got the same error again just now...

fredericlemoine commented 4 years ago

I can't reproduce the issue, It may be due to a sync issue with go get, can you try with the -uoption?

go get -u github.com/evolbioinfo/gotree

or

rm -rf $GOPATH/github.com/evolbioinfo/gotree
go get github.com/evolbioinfo/gotree
bjoernkjoshanssen commented 4 years ago

I tried that and now I get:

error: cannot open .git/FETCH_HEAD: Permission denied
package github.com/fatih/color: exit status 1
fredericlemoine commented 4 years ago

It seems something went wrong with permissions during the first go get... You can try to remove problematic dependencies, for example:

rm -rf $GOPATH/github.com/fatih/color

and try again:

go get -u github.com/evolbioinfo/gotree

Or solve the permission issue, for example:

chown -R youruser:yourgroup $GOPATH/github.com/fatih/color/.git/
bjoernkjoshanssen commented 4 years ago

Now I get permission denied for go get -u github.com/fatih/color It seems that package is no longer maintained.

fredericlemoine commented 4 years ago

Indeed the package is no longer maintained, but it should not prevent a go get. There seems to be a permission problem with your go directory structure. Is $GOPATH in your home? Also: Do you need to use the go library or the command line tool? Because you can also download the binaries.

bjoernkjoshanssen commented 4 years ago

Thanks, got it to work now by switching to using a local machine rather than virtual machine.