Skip to content

Commit

Permalink
add fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
acelyc111 committed Dec 23, 2023
1 parent 1ce4efa commit 36cdedd
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 10 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/lint_and_test_go-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ jobs:
with:
version: v1.55.2
working-directory: ./go-client
- name: Format
working-directory: ./go-client
run: |
gofmt -d .
build_server:
name: Build server
Expand Down Expand Up @@ -115,5 +119,6 @@ jobs:
- name: Run Go client tests
working-directory: ./go-client
run: |
make build
make ci
GO111MODULE=on make build
./bin/echo > /dev/null 2>&1 &
GO111MODULE=on make ci
6 changes: 3 additions & 3 deletions go-client/admin/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,20 +78,20 @@ func TestAdmin_CreateTableMustAvailable(t *testing.T) {
const tableName = "admin_table_test"

c := NewClient(Config{
MetaServers: []string{"0.0.0.0:34601"},
MetaServers: []string{"0.0.0.0:34601", "0.0.0.0:34602", "0.0.0.0:34603"},
})

ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
defer cancel()

err := c.CreateTable(context.Background(), tableName, 1)
err := c.CreateTable(context.Background(), tableName, 8)
if !assert.NoError(t, err) {
assert.Fail(t, err.Error())
}

// ensures the created table must be available for read and write
rwClient := pegasus.NewClient(pegasus.Config{
MetaServers: []string{"0.0.0.0:34601"},
MetaServers: []string{"0.0.0.0:34601", "0.0.0.0:34602", "0.0.0.0:34603"},
})
defer func() {
err = rwClient.Close()
Expand Down
2 changes: 1 addition & 1 deletion go-client/example/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func main() {
for t := 0; t < 10; t++ {
var sortKeys [][]byte
for i := 0; i < 10; i++ {
sortKeys = append(sortKeys, []byte("sort"+string(i)))
sortKeys = append(sortKeys, []byte("sort"+fmt.Sprint(i)))
}
for i := 0; i < 10; i++ {
err = tb.Set(context.Background(), []byte("hash"), sortKeys[i], value)
Expand Down
1 change: 0 additions & 1 deletion go-client/idl/base/dsn_err_string.go

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

2 changes: 1 addition & 1 deletion go-client/session/admin_rpc_types.go

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

4 changes: 2 additions & 2 deletions go-client/session/radmin_rpc_types.go

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

0 comments on commit 36cdedd

Please sign in to comment.