1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

pkg/chrootarchive: normalize comment formatting

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2019-11-27 15:39:12 +01:00
parent ecb898dcb9
commit 9de5d3da89
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C
2 changed files with 4 additions and 4 deletions

View file

@ -96,8 +96,8 @@ func TestChrootUntarWithHugeExcludesList(t *testing.T) {
t.Fatal(err)
}
options := &archive.TarOptions{}
//65534 entries of 64-byte strings ~= 4MB of environment space which should overflow
//on most systems when passed via environment or command line arguments
// 65534 entries of 64-byte strings ~= 4MB of environment space which should overflow
// on most systems when passed via environment or command line arguments
excludes := make([]string, 65534)
for i := 0; i < 65534; i++ {
excludes[i] = strings.Repeat(string(i), 64)

View file

@ -28,7 +28,7 @@ func untar() {
var options archive.TarOptions
//read the options from the pipe "ExtraFiles"
// read the options from the pipe "ExtraFiles"
if err := json.NewDecoder(os.NewFile(3, "options")).Decode(&options); err != nil {
fatal(err)
}
@ -100,7 +100,7 @@ func invokeUnpack(decompressedArchive io.Reader, dest string, options *archive.T
return fmt.Errorf("Untar error on re-exec cmd: %v", err)
}
//write the options to the pipe for the untar exec to read
// write the options to the pipe for the untar exec to read
if err := json.NewEncoder(w).Encode(options); err != nil {
w.Close()
return fmt.Errorf("Untar json encode to pipe failed: %v", err)