Skip to content

Commit

Permalink
forgot to remove cmd/ from gitignore (#15)
Browse files Browse the repository at this point in the history
* use nats micro package

* upgrade to go1.21 and use slog for the logger middleware

* move protoc-gen-stormrpc to cmd folder, fix passing of headers to handler function and context, fix endpoint name to pass micro endpoint name validation

* move protoc-gen-stormrpc to cmd folder, fix passing of headers to handler function and context, fix endpoint name to pass micro endpoint name validation

* cleaning up some of the codegen internals, adding some comments

* bump github actions test matrix to go1.21

* bump nats server version, bump protobuf go library version

* trying to track down this data race and determine if its my code or nats.go

* using my fork of nats.go with fix for race condition until it can get merged into upstream

* fix linting errors

* update nats.go dependency to my fork's main branch

* it works

* bring back codegen
  • Loading branch information
actatum authored Dec 7, 2023
1 parent e2506f7 commit 22eb6de
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
cmd
.idea
prototest/gen_out
19 changes: 19 additions & 0 deletions cmd/protoc-gen-stormrpc/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Package main provides the executable function for the protoc-gen-stormrpc binary.
package main

import (
stormrpcgen "github.com/actatum/stormrpc/internal/gen"
"google.golang.org/protobuf/compiler/protogen"
)

func main() {
protogen.Options{}.Run(func(gen *protogen.Plugin) error {
for _, f := range gen.Files {
if !f.Generate {
continue
}
stormrpcgen.GenerateFile(gen, f)
}
return nil
})
}

0 comments on commit 22eb6de

Please sign in to comment.