git2go | Git to Go; bindings for libgit2 Like McDonald's but tastier
kandi X-RAY | git2go Summary
kandi X-RAY | git2go Summary
Git to Go; bindings for libgit2. Like McDonald's but tastier.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of git2go
git2go Key Features
git2go Examples and Code Snippets
Community Discussions
Trending Discussions on git2go
QUESTION
I'm trying run generate
on CGO project https://github.com/libgit2/git2go locally. I have successfully installed libgit2
system library and can build and test the project with go build -tags static,system_libgit2
and go test -tags static,system_libgit2
.
The problem occurs when I try to generate additional files with stringer
. The code I'm showing is located in master branch, so I suppose it should work correctly and the problem is on my side.
The file diff.go has stringer annotation (removed unimportant parts):
...ANSWER
Answered 2021-Oct-14 at 15:49stringer
works by simply parsing Go source with go.ast
to extract the needed constant values. The values must be integer literals specified at the definition site (see source).
CGo works by generating Go shims for C code. For example, C constants go into the _cgo_gotypes.go
file as const _Ciconst_... = ...
shims.
Normally CGo deletes generated files when done, but you can keep them by invoking it explicitly, e.g. go tool cgo main.go
.
So you should be able to do something like this:
QUESTION
https://github.com/splitsh/lite/issues/58
Hello,
I am trying to install splitsh-lite in windows 10. I read #18 and followed the manual instructions until the last step when an error is thrown:
In cmd:
go get github.com/splitsh/lite
github.com/libgit2/git2go C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lgit2 collect2.exe: error: ld returned 1 exit status
In MINGW64: $ go build -o splitsh-lite github.com/splitsh/lite
github.com/libgit2/git2go C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lgit2 collect2.exe: error: ld returned 1 exit status
Could you help me or give me some guidelines in order to build splitsh-lite?
Thank you!
...ANSWER
Answered 2020-Jul-08 at 08:09Since I had issues on Windows, too, I used the Windows Linux Subsystem. There is no need to get that running in the native Windows command line anymore. https://docs.microsoft.com/en-us/windows/wsl/install-win10
Install GOCommunity Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install git2go
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page