@@ -13,13 +13,13 @@ import (
1313)
1414
1515var (
16- ErrNoCodespaces = errors .New ("You have no codespaces ." )
16+ ErrNoCodespaces = errors .New ("You have no Codespaces ." )
1717)
1818
1919func ChooseCodespace (ctx context.Context , apiClient * api.API , user * api.User ) (* api.Codespace , error ) {
2020 codespaces , err := apiClient .ListCodespaces (ctx , user )
2121 if err != nil {
22- return nil , fmt .Errorf ("error getting codespaces : %v" , err )
22+ return nil , fmt .Errorf ("error getting Codespaces : %v" , err )
2323 }
2424
2525 if len (codespaces ) == 0 {
@@ -77,9 +77,9 @@ func ConnectToLiveshare(ctx context.Context, log logger, apiClient *api.API, use
7777 var startedCodespace bool
7878 if codespace .Environment .State != api .CodespaceEnvironmentStateAvailable {
7979 startedCodespace = true
80- log .Print ("Starting your codespace ..." )
80+ log .Print ("Starting your Codespace ..." )
8181 if err := apiClient .StartCodespace (ctx , token , codespace ); err != nil {
82- return nil , fmt .Errorf ("error starting codespace : %v" , err )
82+ return nil , fmt .Errorf ("error starting Codespace : %v" , err )
8383 }
8484 }
8585
@@ -93,20 +93,20 @@ func ConnectToLiveshare(ctx context.Context, log logger, apiClient *api.API, use
9393 }
9494
9595 if retries == 30 {
96- return nil , errors .New ("timed out while waiting for the codespace to start" )
96+ return nil , errors .New ("timed out while waiting for the Codespace to start" )
9797 }
9898
9999 codespace , err = apiClient .GetCodespace (ctx , token , userLogin , codespace .Name )
100100 if err != nil {
101- return nil , fmt .Errorf ("error getting codespace : %v" , err )
101+ return nil , fmt .Errorf ("error getting Codespace : %v" , err )
102102 }
103103 }
104104
105105 if startedCodespace {
106106 fmt .Print ("\n " )
107107 }
108108
109- log .Println ("Connecting to your codespace ..." )
109+ log .Println ("Connecting to your Codespace ..." )
110110
111111 lsclient , err := liveshare .NewClient (
112112 liveshare .WithConnection (liveshare.Connection {
@@ -117,11 +117,11 @@ func ConnectToLiveshare(ctx context.Context, log logger, apiClient *api.API, use
117117 }),
118118 )
119119 if err != nil {
120- return nil , fmt .Errorf ("error creating live share : %v" , err )
120+ return nil , fmt .Errorf ("error creating Live Share : %v" , err )
121121 }
122122
123123 if err := lsclient .Join (ctx ); err != nil {
124- return nil , fmt .Errorf ("error joining liveshare client: %v" , err )
124+ return nil , fmt .Errorf ("error joining Live Share client: %v" , err )
125125 }
126126
127127 return lsclient , nil
@@ -134,23 +134,23 @@ func GetOrChooseCodespace(ctx context.Context, apiClient *api.API, user *api.Use
134134 if err == ErrNoCodespaces {
135135 return nil , "" , err
136136 }
137- return nil , "" , fmt .Errorf ("choosing codespace : %v" , err )
137+ return nil , "" , fmt .Errorf ("choosing Codespace : %v" , err )
138138 }
139139 codespaceName = codespace .Name
140140
141141 token , err = apiClient .GetCodespaceToken (ctx , user .Login , codespaceName )
142142 if err != nil {
143- return nil , "" , fmt .Errorf ("getting codespace token: %v" , err )
143+ return nil , "" , fmt .Errorf ("getting Codespace token: %v" , err )
144144 }
145145 } else {
146146 token , err = apiClient .GetCodespaceToken (ctx , user .Login , codespaceName )
147147 if err != nil {
148- return nil , "" , fmt .Errorf ("getting codespace token for given codespace: %v" , err )
148+ return nil , "" , fmt .Errorf ("getting Codespace token for given codespace: %v" , err )
149149 }
150150
151151 codespace , err = apiClient .GetCodespace (ctx , token , user .Login , codespaceName )
152152 if err != nil {
153- return nil , "" , fmt .Errorf ("getting full codespace details: %v" , err )
153+ return nil , "" , fmt .Errorf ("getting full Codespace details: %v" , err )
154154 }
155155 }
156156
0 commit comments