File tree Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change 1
1
# api-to-go
2
2
3
- Convert Rest API's JSON payload to Golang struct.
3
+ Convert REST API's JSON payload to Golang struct.
4
4
using [ json-to-go] ( https://github.com/mholt/json-to-go )
5
5
6
6
# Install
7
7
``` sh
8
8
git clone https://github.com/nkmr-jp/api-to-go.git
9
9
cd api-to-go
10
- yarn install
11
- yarn fetch # fetch json-to-go code
12
- npm link # make the command available
10
+ yarn setup
13
11
```
14
12
15
13
# Usage
16
14
``` sh
17
- api-to-go https://api.github.com/users/github
15
+ cd [your project dir]
16
+ api-to-go https://api.github.com/users
17
+ # > ...
18
+ # > generated: api.github.com/users.go
18
19
```
19
20
20
21
``` sh
Original file line number Diff line number Diff line change 9
9
},
10
10
"homepage" : " https://github.com/nkmr-jp/api-to-go#readme" ,
11
11
"scripts" : {
12
- "fetch" : " rm -rf ./vendor && mkdir -p vendor && cd vendor && git clone https://github.com/mholt/json-to-go.git"
12
+ "fetch" : " rm -rf ./vendor && mkdir -p vendor && cd vendor && git clone https://github.com/mholt/json-to-go.git" ,
13
+ "setup" : " yarn install && yarn fetch && npm -f link && exec $SHELL -l"
13
14
},
14
- "description" : " Convert Rest API's JSON payload to Golang struct." ,
15
+ "description" : " Convert REST API's JSON payload to Golang struct." ,
15
16
"bin" : {
16
17
"api-to-go" : " bin/api-to-go.js"
17
18
},
You can’t perform that action at this time.
0 commit comments