Skip to content

Fedihosting-Foundation-Forks/go-lemmy

 
 

Repository files navigation

Go-Lemmy

Go Reference

Go bindings to the Lemmy API, automatically generated from Lemmy's source code using the generator in cmd/gen.

Examples

Examples can be found in the examples directory.

How to generate

First, update the lemmy-js-client submodule :

git submodule update --init

For generating from another version, simply check out another version in the submodule folder.

Inside it, build the JSON docs file:

pnpm install
pnpm run docs --json ../docs.json

Back in the root folder, remove all the existing generated code:

find . -type f -name '*.gen.go' -print -delete

Execute the generator:

go run cmd/gen/main.go -json-file docs.json -out-dir .

And that's it! Your generated code should be ready for use.

About

Go API bindings for Lemmy

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Go 100.0%