github.com/tilt-dev/tilt@v0.33.15-0.20240515162809-0a22ed45d8a0/internal/build/moby/archive_unix.go (about) 1 //go:build !windows 2 // +build !windows 3 4 // Adapted from 5 // https://github.com/moby/moby/blob/ecb898dcb9065c8e9bcf7bb79fd160dea1c859b8/pkg/archive/archive_unix.go 6 7 /* 8 Copyright 2013-2018 Docker, Inc. 9 10 Licensed under the Apache License, Version 2.0 (the "License"); 11 you may not use this file except in compliance with the License. 12 You may obtain a copy of the License at 13 14 https://www.apache.org/licenses/LICENSE-2.0 15 16 Unless required by applicable law or agreed to in writing, software 17 distributed under the License is distributed on an "AS IS" BASIS, 18 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 19 See the License for the specific language governing permissions and 20 limitations under the License. 21 */ 22 23 package moby 24 25 import ( 26 "os" 27 ) 28 29 // chmodTarEntry is used to adjust the file permissions used in tar header based 30 // on the platform the archival is done. 31 32 func ChmodTarEntry(perm os.FileMode) os.FileMode { 33 return perm // noop for unix as golang APIs provide perm bits correctly 34 }