Skip to content

Commit

Permalink
update url
Browse files Browse the repository at this point in the history
  • Loading branch information
Galen Liu committed Nov 26, 2024
1 parent cc648c2 commit 23238b6
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 18 deletions.
24 changes: 12 additions & 12 deletions examples/example_array.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
[
{
"login": "ChimeraCoder",
"login": "liugang",
"id": 376414,
"avatar_url": "https://avatars.githubusercontent.com/u/376414?v=3",
"gravatar_id": "",
"url": "https://api.github.com/users/ChimeraCoder",
"html_url": "https://github.com/ChimeraCoder",
"followers_url": "https://api.github.com/users/ChimeraCoder/followers",
"following_url": "https://api.github.com/users/ChimeraCoder/following{/other_user}",
"gists_url": "https://api.github.com/users/ChimeraCoder/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ChimeraCoder/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ChimeraCoder/subscriptions",
"organizations_url": "https://api.github.com/users/ChimeraCoder/orgs",
"repos_url": "https://api.github.com/users/ChimeraCoder/repos",
"events_url": "https://api.github.com/users/ChimeraCoder/events{/privacy}",
"received_events_url": "https://api.github.com/users/ChimeraCoder/received_events",
"url": "https://api.github.com/users/liugang",
"html_url": "https://github.com/liugang",
"followers_url": "https://api.github.com/users/liugang/followers",
"following_url": "https://api.github.com/users/liugang/following{/other_user}",
"gists_url": "https://api.github.com/users/liugang/gists{/gist_id}",
"starred_url": "https://api.github.com/users/liugang/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/liugang/subscriptions",
"organizations_url": "https://api.github.com/users/liugang/orgs",
"repos_url": "https://api.github.com/users/liugang/repos",
"events_url": "https://api.github.com/users/liugang/events{/privacy}",
"received_events_url": "https://api.github.com/users/liugang/received_events",
"type": "User",
"site_admin": false,
"name": "Aditya Mukerjee",
Expand Down
2 changes: 1 addition & 1 deletion examples/expected_output_array_test.go.out
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package gojson
// This is what we would like example_array.json
// to generate, though for the time being we'll have to settle
// for []interface{}
// https://github.com/ChimeraCoder/gojson/issues/17
// https://github.com/liugang/gojson/issues/17

type Users []struct {
AvatarURL string `json:"avatar_url"`
Expand Down
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ module github.com/liugang/gojson
go 1.18

require (
github.com/ChimeraCoder/gojson v1.1.0
github.com/spf13/cobra v1.8.1
gopkg.in/yaml.v3 v3.0.1
)
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
github.com/ChimeraCoder/gojson v1.1.0 h1:/6S8djl/jColpJGTYniA3xrqJWuKeyEozzPtpr5L4Pw=
github.com/ChimeraCoder/gojson v1.1.0/go.mod h1:nYbTQlu6hv8PETM15J927yM0zGj3njIldp72UT1MqSw=
github.com/liugang/gojson v1.1.0 h1:/6S8djl/jColpJGTYniA3xrqJWuKeyEozzPtpr5L4Pw=
github.com/liugang/gojson v1.1.0/go.mod h1:nYbTQlu6hv8PETM15J927yM0zGj3njIldp72UT1MqSw=
github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
Expand Down
2 changes: 1 addition & 1 deletion json-to-struct.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//
// Example:
//
// curl -s https://api.github.com/repos/chimeracoder/gojson | gojson -name=Repository
// curl -s https://api.github.com/repos/liugang/gojson | gojson -name=Repository
//
// Output:
//
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ var rootCmd = &cobra.Command{
It reads from stdin or a file and outputs the generated structs to stdout or a file.
Example:
curl -s https://api.github.com/repos/chimeracoder/gojson | gojson -name=Repository`,
curl -s https://api.github.com/repos/liugang/gojson | gojson -name=Repository`,
RunE: func(cmd *cobra.Command, args []string) error {
// Validate fileType
if fileType == "" && inputFile != "" {
Expand Down

0 comments on commit 23238b6

Please sign in to comment.