Skip to content

Commit 30a76a5

Browse files
authored
Replace Go RPC quicktype generation (#1234)
* Replace Go RPC quicktype generation * Address Go RPC codegen review feedback * Rerun CI * Sort generated Go fields and constants * Regenerate Go after rebase * Sort generated Go output consistently * fix race * Regenerate Go files for updated schemas
1 parent ac55e9a commit 30a76a5

20 files changed

Lines changed: 3109 additions & 2611 deletions

go/client.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ func validateSessionFsConfig(config *SessionFsConfig) error {
6363
if config.SessionStatePath == "" {
6464
return errors.New("SessionFs.SessionStatePath is required")
6565
}
66-
if config.Conventions != rpc.SessionFSSetProviderConventionsPosix && config.Conventions != rpc.SessionFSSetProviderConventionsWindows {
66+
if config.Conventions != rpc.SessionFsSetProviderConventionsPosix && config.Conventions != rpc.SessionFsSetProviderConventionsWindows {
6767
return errors.New("SessionFs.Conventions must be either 'posix' or 'windows'")
6868
}
6969
return nil
@@ -372,7 +372,7 @@ func (c *Client) Start(ctx context.Context) error {
372372

373373
// If a session filesystem provider was configured, register it.
374374
if c.options.SessionFs != nil {
375-
_, err := c.RPC.SessionFs.SetProvider(ctx, &rpc.SessionFSSetProviderRequest{
375+
_, err := c.RPC.SessionFs.SetProvider(ctx, &rpc.SessionFsSetProviderRequest{
376376
InitialCwd: c.options.SessionFs.InitialCwd,
377377
SessionStatePath: c.options.SessionFs.SessionStatePath,
378378
Conventions: c.options.SessionFs.Conventions,

go/client_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ func TestClient_SessionFsConfig(t *testing.T) {
241241
NewClient(&ClientOptions{
242242
SessionFs: &SessionFsConfig{
243243
SessionStatePath: "/session-state",
244-
Conventions: rpc.SessionFSSetProviderConventionsPosix,
244+
Conventions: rpc.SessionFsSetProviderConventionsPosix,
245245
},
246246
})
247247
})
@@ -261,7 +261,7 @@ func TestClient_SessionFsConfig(t *testing.T) {
261261
NewClient(&ClientOptions{
262262
SessionFs: &SessionFsConfig{
263263
InitialCwd: "/",
264-
Conventions: rpc.SessionFSSetProviderConventionsPosix,
264+
Conventions: rpc.SessionFsSetProviderConventionsPosix,
265265
},
266266
})
267267
})

0 commit comments

Comments
 (0)