@@ -31,8 +31,6 @@ func (*dockerCLIContainerLister) List(ctx context.Context) ([]codersdk.Workspace
31
31
return nil , xerrors .Errorf ("run docker ps: %w" , err )
32
32
}
33
33
34
- // the output is returned with a single item per line, so we have to decode it
35
- // line-by-line
36
34
ids := make ([]string , 0 )
37
35
for _ , line := range strings .Split (buf .String (), "\n " ) {
38
36
tmp := strings .TrimSpace (line )
@@ -53,7 +51,6 @@ func (*dockerCLIContainerLister) List(ctx context.Context) ([]codersdk.Workspace
53
51
return nil , xerrors .Errorf ("run docker inspect: %w" , err )
54
52
}
55
53
56
- // out := make([]codersdk.WorkspaceAgentContainer, 0)
57
54
ins := make ([]dockerInspect , 0 )
58
55
if err := json .NewDecoder (& buf ).Decode (& ins ); err != nil {
59
56
return nil , xerrors .Errorf ("decode docker inspect output: %w" , err )
@@ -149,7 +146,6 @@ func convertDockerInspect(in dockerInspect) codersdk.WorkspaceAgentContainer {
149
146
150
147
// convertDockerPort converts a Docker port string to a port number and network
151
148
// example: "8080/tcp" -> 8080, "tcp"
152
- //
153
149
// "8080" -> 8080, "tcp"
154
150
func convertDockerPort (in string ) (uint16 , string , error ) {
155
151
parts := strings .Split (in , "/" )
@@ -176,7 +172,6 @@ func convertDockerPort(in string) (uint16, string, error) {
176
172
// container path. If the host path is not specified, the container path is used
177
173
// as the host path.
178
174
// example: "/host/path=/container/path" -> "/host/path", "/container/path"
179
- //
180
175
// "/container/path" -> "/container/path", "/container/path"
181
176
func convertDockerVolume (in string ) (hostPath , containerPath string ) {
182
177
parts := strings .Split (in , "=" )
0 commit comments