Skip to content

Commit ed456d8

Browse files
committed
readd goimport installation
1 parent 29ae575 commit ed456d8

File tree

2 files changed

+21
-19
lines changed

2 files changed

+21
-19
lines changed

.github/workflows/lint.yml

+19-19
Original file line numberDiff line numberDiff line change
@@ -23,25 +23,25 @@ jobs:
2323
- run: npx swagger-cli bundle -t json -w 300 main.yaml > doc/compiled_new.json
2424
- run: diff doc/compiled.json doc/compiled_new.json
2525

26-
# compile-go:
27-
# runs-on: ubuntu-latest
28-
# steps:
29-
# - name: Checkout 🛎️
30-
# uses: actions/checkout@v3
31-
# with:
32-
# persist-credentials: false
33-
# - name: Set up Go
34-
# uses: actions/setup-go@v2
35-
# with:
36-
# go-version: 1.19.6
37-
# - name: Build
38-
# env:
39-
# API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
40-
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41-
# run: |
42-
# npm install
43-
# npm run generate.go
44-
# cd clients/go && go build
26+
compile-go:
27+
runs-on: ubuntu-latest
28+
steps:
29+
- name: Checkout 🛎️
30+
uses: actions/checkout@v3
31+
with:
32+
persist-credentials: false
33+
- name: Set up Go
34+
uses: actions/setup-go@v2
35+
with:
36+
go-version: 1.19.6
37+
- name: Build
38+
env:
39+
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
40+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41+
run: |
42+
npm install
43+
npm run generate.go
44+
cd clients/go && go build
4545
4646
# compile-cli:
4747
# runs-on: ubuntu-latest

Makefile

+2
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ ruby:
3333
openapi-generator-cli generate -i tmp/compiled.yaml -g ruby -o clients/ruby -c ./openapi-generator/ruby_lang.yaml
3434
go:
3535
openapi-generator-cli generate -i tmp/compiled.yaml -g go -o clients/go -c ./openapi-generator/go_lang.yaml
36+
go install golang.org/x/tools/cmd/goimports@latest
37+
goimports -w clients/go
3638
cd clients/go && go mod tidy
3739
typescript:
3840
openapi-generator-cli generate -i tmp/compiled.yaml -g typescript-fetch -o clients/typescript -c ./openapi-generator/typescript_lang.yaml

0 commit comments

Comments
 (0)