Skip to content

Commit

Permalink
Merge pull request #215 from infobloxopen/khous/remove-gogo
Browse files Browse the repository at this point in the history
remove gogo
  • Loading branch information
khous authored Sep 3, 2021
2 parents 5a299f1 + 1f2e84b commit 0a8498d
Show file tree
Hide file tree
Showing 29 changed files with 4,799 additions and 77 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/test-gorm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Go

on: [push]
# branches: [ main ]
# pull_request:
# branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Unit Tests
run: make test
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,19 @@ build: $(BUF)
test: lint build
go test -v ./...

clean:
@echo "WARNING: this kills test, override and custom files, fixme"
# rm -rf example/feature_demo/feature_demo example/user/user example/postgres_arrays/postgres_arrays example/**/*.go example/**/github.com example/github.com || true

regenerate: clean generate

generate: options/gorm.pb.go example/user/*.pb.go example/postgres_arrays/*.pb.go example/feature_demo/*.pb.go

options/gorm.pb.go: proto/options/gorm.proto
buf generate --template proto/options/buf.gen.yaml --path proto/options

options/types.pb.go: proto/types/types.proto
buf generate --template proto/types/buf.gen.yaml --path proto/types
# TODO: gorm files are not being built by buf generate yet, use docker for now

example/feature_demo/*.pb.go: example/feature_demo/*.proto
Expand Down
1 change: 0 additions & 1 deletion buf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ lint:
- protoc-gen-openapiv2
- github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options/openapiv2.proto
- google
- github.com/gogo
ignore_only:
PACKAGE_DIRECTORY_MATCH:
- options
Expand Down
2 changes: 1 addition & 1 deletion example/feature_demo/buf.gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ plugins:
- name: gorm
out: example
opt:
- engine=postgres,enums=string,gateway
- engine=postgres,enums=string,gateway:./example/feature_demo
- Mgoogle/protobuf/timestamp.proto=github.com/golang/protobuf/ptypes/timestamp
2 changes: 1 addition & 1 deletion example/feature_demo/demo_service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ func TestMultipleCrud(t *testing.T) {
}
}
})
}
}
2 changes: 1 addition & 1 deletion example/feature_demo/demo_types_gorm.custom.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ func (orm *TypeWithIDORM) AfterToPB(ctx context.Context, pb *TypeWithID) error {
pb.MultiaccountTypeIds = ids

return nil
}
}
2 changes: 1 addition & 1 deletion example/feature_demo/demo_types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,4 +108,4 @@ func TestTypeWithIDORM_ToPB(t *testing.T) {
}
}
})
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 0a8498d

Please sign in to comment.