Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: RussellLuo/kun
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.4.1
Choose a base ref
...
head repository: RussellLuo/kun
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
Showing with 3,373 additions and 7,023 deletions.
  1. +6 −6 .github/workflows/go.yml
  2. +177 −362 README.md
  3. +53 −7 cmd/kungen/main.go
  4. BIN docs/grpc-generation.png
  5. BIN docs/http-generation.png
  6. +19 −0 examples/cronsvc/README.md
  7. +38 −0 examples/cronsvc/cmd/main.go
  8. +18 −0 examples/cronsvc/cron.go
  9. +31 −0 examples/cronsvc/endpoint.go
  10. +21 −0 examples/cronsvc/service.go
  11. +17 −0 examples/eventsvc/README.md
  12. +46 −0 examples/eventsvc/cmd/main.go
  13. +47 −0 examples/eventsvc/endpoint.go
  14. +69 −0 examples/eventsvc/event.go
  15. +21 −0 examples/eventsvc/service.go
  16. +1 −1 examples/fileupload/endpoint.go
  17. +1 −5 examples/fileupload/http.go
  18. +1 −1 examples/fileupload/http_client.go
  19. +1 −1 examples/helloworld/cmd/main.go
  20. +1 −1 examples/helloworld/endpoint.go
  21. +1 −5 examples/helloworld/http.go
  22. +1 −1 examples/helloworld/http_client.go
  23. +4 −4 examples/helloworld/validator.go
  24. +1 −1 examples/helloworldgrpc/endpoint.go
  25. +2 −2 examples/helloworldgrpc/pb/helloworldgrpc.pb.go
  26. +33 −0 examples/messaging/README.md
  27. +35 −0 examples/messaging/cmd/main.go
  28. +51 −0 examples/messaging/endpoint.go
  29. +95 −0 examples/messaging/http.go
  30. +76 −0 examples/messaging/http_client.go
  31. +85 −0 examples/messaging/oas2.go
  32. +20 −0 examples/messaging/service.go
  33. +0 −5 examples/profilesvc/README.md
  34. +1 −1 examples/profilesvc/cmd/server/main.go
  35. +1 −1 examples/profilesvc/endpoint.go
  36. +1 −5 examples/profilesvc/http.go
  37. +0 −295 examples/profilesvc/http.test.yaml
  38. +9 −9 examples/profilesvc/http_client.go
  39. +0 −969 examples/profilesvc/http_test.go
  40. +1 −1 examples/profilesvcgrpc/endpoint.go
  41. +2 −2 examples/profilesvcgrpc/pb/profilesvcgrpc.pb.go
  42. +1 −1 examples/usersvc/README.md
  43. +3 −3 examples/usersvc/endpoint.go
  44. +1 −5 examples/usersvc/http.go
  45. +1 −1 examples/usersvc/http_client.go
  46. +80 −0 gen/cron/generator/generator.go
  47. +96 −0 gen/cron/parser/parser.go
  48. +5 −5 gen/endpoint/generator.go
  49. +241 −0 gen/event/generator/generator.go
  50. +78 −0 gen/event/parser/parser.go
  51. +94 −58 gen/gen.go
  52. +3 −3 gen/grpc/grpc/generator.go
  53. +8 −7 gen/grpc/parser/parser.go
  54. +3 −3 gen/grpc/proto/generator.go
  55. +29 −19 gen/http/chi/generator.go
  56. +53 −28 gen/http/httpclient/generator.go
  57. +69 −0 gen/http/httpclient/generator_test.go
  58. +0 −327 gen/http/httptest/generator.go
  59. +0 −93 gen/http/httptest/testcase.go
  60. +35 −12 gen/http/oas2/generator.go
  61. +9 −8 gen/http/parser/annotation/annotation.go
  62. +65 −0 gen/http/parser/annotation/annotation_test.go
  63. +4 −6 gen/http/parser/annotation/body.go
  64. +3 −7 gen/http/parser/annotation/body_test.go
  65. +2 −2 gen/http/parser/annotation/oas.go
  66. +19 −21 gen/http/parser/annotation/param.go
  67. +9 −4 gen/http/parser/annotation/param_test.go
  68. +189 −48 gen/http/parser/parser.go
  69. +290 −1 gen/http/parser/parser_test.go
  70. +19 −8 gen/http/spec/spec.go
  71. +14 −2 gen/util/annotation/annotation.go
  72. +14 −5 gen/util/docutil/docutil.go
  73. +0 −60 gen/util/openapi/alias.go
  74. +0 −359 gen/util/openapi/doc.go
  75. +0 −14 gen/util/openapi/doc_test.go
  76. +0 −241 gen/util/openapi/parser.go
  77. +0 −207 gen/util/openapi/parser_test.go
  78. +1 −195 gen/util/openapi/spec.go
  79. +0 −97 gen/util/openapi/util.go
  80. +39 −0 gen/util/parser/parser.go
  81. +26 −7 go.mod
  82. +26 −28 go.sum
  83. +8 −32 pkg/appx/cronapp/app.go
  84. +3 −5 pkg/appx/cronapp/example_test.go
  85. +43 −2 pkg/appx/cronapp/instance.go
  86. +11 −9 pkg/appx/cronapp/instance_test.go
  87. +29 −0 pkg/appx/cronapp2/app.go
  88. +162 −0 pkg/appx/cronapp2/example_test.go
  89. +79 −0 pkg/appx/cronapp2/instance.go
  90. +110 −0 pkg/appx/cronapp2/instance_test.go
  91. +8 −32 pkg/appx/httpapp/app.go
  92. +3 −4 pkg/appx/httpapp/example_test.go
  93. +35 −5 pkg/appx/httpapp/instance.go
  94. +1 −1 pkg/appx/httpapp/instance_test.go
  95. +37 −0 pkg/appx/mixedapp/app.go
  96. +0 −67 pkg/appx/wrapper/wrapper.go
  97. +1 −1 pkg/caseconv/caseconv.go
  98. +0 −39 pkg/codec/httpcodec/codec.go
  99. +0 −264 pkg/codec/httpcodec/form.go
  100. +0 −69 pkg/codec/httpcodec/form_test.go
  101. +0 −100 pkg/codec/httpcodec/json.go
  102. +0 −39 pkg/codec/httpcodec/kit.go
  103. +0 −504 pkg/codec/httpcodec/param.go
  104. +0 −585 pkg/codec/httpcodec/param_test.go
  105. +0 −115 pkg/codec/httpcodec/patcher.go
  106. +0 −201 pkg/codec/httpcodec/patcher_test.go
  107. +14 −0 pkg/eventcodec/codec.go
  108. +43 −0 pkg/eventcodec/default.go
  109. +32 −0 pkg/eventcodec/json.go
  110. +9 −0 pkg/eventpubsub/publisher.go
  111. +75 −0 pkg/eventpubsub/subscriber.go
  112. +2 −2 pkg/httpcodec/form.go
  113. +9 −9 pkg/httpcodec/param.go
  114. +1 −1 pkg/httpcodec/param_test.go
  115. +5 −5 pkg/httpoption/option.go
  116. +1 −1 pkg/httpoption/validator.go
  117. +0 −77 pkg/httpoption2/option.go
  118. +0 −29 pkg/httpoption2/validator.go
  119. +1 −1 pkg/ifacetool/moq/README.md
  120. +28 −3 pkg/oas2/oas2.go
  121. +54 −27 pkg/oas2/parser.go
  122. +21 −9 pkg/oas2/parser_test.go
  123. +0 −215 pkg/oasv2/oasv2.go
  124. +0 −368 pkg/oasv2/parser.go
  125. +0 −436 pkg/oasv2/parser_test.go
  126. +0 −64 pkg/oasv2/registry.go
  127. +0 −108 pkg/oasv2/schema.go
  128. +32 −24 pkg/pkgtool/pkgtool.go
12 changes: 6 additions & 6 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -5,17 +5,17 @@ jobs:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.14
- name: Set up Go 1.18
uses: actions/setup-go@v1
with:
go-version: 1.14
go-version: 1.18
id: go

- name: Check out code
uses: actions/checkout@v1

- name: Intsall GolangCI-Lint
run: curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b . latest
run: curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b . v1.49.0

- name: Run lint
run: ./golangci-lint run ./... --skip-dirs benchmarks
@@ -27,10 +27,10 @@ jobs:
matrix:
os: [macOS-latest,ubuntu-latest]
steps:
- name: Set up Go 1.14
- name: Set up Go 1.18
uses: actions/setup-go@v1
with:
go-version: 1.14
go-version: 1.18
id: go

- name: Check out code
@@ -40,4 +40,4 @@ jobs:
run: go get -v -t -d ./...

- name: Run tests
run: go test -v -race ./...
run: go test -v -race ./...
Loading