Skip to content

Commit

Permalink
updated examples
Browse files Browse the repository at this point in the history
  • Loading branch information
david-littlefarmer committed Apr 29, 2024
1 parent 5b9762f commit ec4e17f
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 6 deletions.
13 changes: 12 additions & 1 deletion _examples/golang-basics/example.gen.go

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

10 changes: 9 additions & 1 deletion _examples/golang-imports/api.gen.go

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

7 changes: 3 additions & 4 deletions _examples/golang-imports/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ func startServer() error {
return http.ListenAndServe(":4242", r)
}

type ExampleRPC struct {
}
type ExampleRPC struct{}

func (s *ExampleRPC) Ping(ctx context.Context) error {
return nil
Expand All @@ -44,9 +43,9 @@ func (s *ExampleRPC) Status(ctx context.Context) (bool, error) {
return true, nil
}

func (s *ExampleRPC) GetUsers(ctx context.Context) ([]*User, *Location, error) {
func (s *ExampleRPC) GetUsers(ctx context.Context) ([]*User, Location, error) {
loc := Location_TORONTO
return []*User{
{Username: "pk", Age: 99},
}, &loc, nil
}, loc, nil
}

0 comments on commit ec4e17f

Please sign in to comment.