Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
108 changes: 54 additions & 54 deletions _examples/golang-basics/example.gen.go

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

5 changes: 4 additions & 1 deletion _examples/golang-basics/example.ridl
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,17 @@ error 400100 MemoryFull "system memory is full"
error 400200 Unauthorized "unauthorized" HTTP 401
error 400300 UserNotFound "user not found"

service ExampleService
service Example
- Ping()

# Status endpoint
#
# gives you current status of running application
@internal
- Status() => (status: bool)

- Version() => (version: Version)

# Get user endpoint
#
# gives you basic info about user
Expand Down
4 changes: 2 additions & 2 deletions _examples/golang-basics/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
)

var (
client ExampleServiceClient
client ExampleClient
)

// func TestMain()
Expand All @@ -20,7 +20,7 @@ func init() {
startServer()
}()

client = NewExampleServiceClient("http://0.0.0.0:4242", &http.Client{
client = NewExampleClient("http://0.0.0.0:4242", &http.Client{
Timeout: time.Duration(2 * time.Second),
})
time.Sleep(time.Millisecond * 500)
Expand Down
9 changes: 5 additions & 4 deletions _examples/golang-basics/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ go 1.22.12
toolchain go1.24.0

require (
github.com/bytedance/sonic v1.14.1
github.com/go-chi/chi/v5 v5.2.1
github.com/google/uuid v1.6.0
github.com/stretchr/testify v1.10.0
Expand All @@ -17,10 +18,10 @@ require (
github.com/Masterminds/sprig/v3 v3.3.0 // indirect
github.com/Microsoft/go-winio v0.6.2 // indirect
github.com/ProtonMail/go-crypto v1.1.5 // indirect
github.com/bytedance/sonic v1.13.1 // indirect
github.com/bytedance/sonic/loader v0.2.4 // indirect
github.com/bytedance/gopkg v0.1.3 // indirect
github.com/bytedance/sonic/loader v0.3.0 // indirect
github.com/cloudflare/circl v1.6.0 // indirect
github.com/cloudwego/base64x v0.1.5 // indirect
github.com/cloudwego/base64x v0.1.6 // indirect
github.com/cyphar/filepath-securejoin v0.4.1 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/emirpasic/gods v1.18.1 // indirect
Expand All @@ -34,7 +35,7 @@ require (
github.com/huandu/xstrings v1.5.0 // indirect
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
github.com/kevinburke/ssh_config v1.2.0 // indirect
github.com/klauspost/cpuid/v2 v2.0.9 // indirect
github.com/klauspost/cpuid/v2 v2.2.9 // indirect
github.com/kr/fs v0.1.0 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
Expand Down
Loading
Loading