浏览代码

Fix golint errors in api

Signed-off-by: John Howard <jhoward@microsoft.com>
John Howard 8 年之前
父节点
当前提交
c8ce0856b7
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      api/client/image/build.go
  2. 1 1
      api/server/router/build/build_routes.go

+ 1 - 1
api/client/image/build.go

@@ -421,7 +421,7 @@ func replaceDockerfileTarWrapper(ctx context.Context, inputTarStream io.ReadClos
 				return
 				return
 			}
 			}
 
 
-			var content io.Reader = tarReader
+			content := io.Reader(tarReader)
 			if hdr.Name == dockerfileName {
 			if hdr.Name == dockerfileName {
 				// This entry is the Dockerfile. Since the tar archive was
 				// This entry is the Dockerfile. Since the tar archive was
 				// generated from a directory on the local filesystem, the
 				// generated from a directory on the local filesystem, the

+ 1 - 1
api/server/router/build/build_routes.go

@@ -163,7 +163,7 @@ func (br *buildRouter) postBuild(ctx context.Context, w http.ResponseWriter, r *
 		return progress.NewProgressReader(in, progressOutput, r.ContentLength, "Downloading context", remoteURL)
 		return progress.NewProgressReader(in, progressOutput, r.ContentLength, "Downloading context", remoteURL)
 	}
 	}
 
 
-	var out io.Writer = output
+	out := io.Writer(output)
 	if buildOptions.SuppressOutput {
 	if buildOptions.SuppressOutput {
 		out = notVerboseBuffer
 		out = notVerboseBuffer
 	}
 	}