Skip to content

Commit 50ad08a

Browse files
authored
Merge pull request opencontainers#170 from q384566678/string-fix
image.go: Simplified type declaration
2 parents da84dc9 + c3c099c commit 50ad08a

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

image/image.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -141,12 +141,12 @@ func validate(w walker, refs []string, out *log.Logger) error {
141141
// UnpackLayout walks through the file tree given by src and, using the layers
142142
// specified in the manifest pointed to by the given ref, unpacks all layers in
143143
// the given destination directory or returns an error if the unpacking failed.
144-
func UnpackLayout(src, dest, ref string, platform string) error {
144+
func UnpackLayout(src, dest, ref, platform string) error {
145145
return unpack(newPathWalker(src), dest, ref, platform)
146146
}
147147

148148
// UnpackFile opens the file pointed by tarFileName and calls Unpack on it.
149-
func UnpackFile(tarFileName, dest, ref string, platform string) error {
149+
func UnpackFile(tarFileName, dest, ref, platform string) error {
150150
f, err := os.Open(tarFileName)
151151
if err != nil {
152152
return errors.Wrap(err, "unable to open file")
@@ -160,11 +160,11 @@ func UnpackFile(tarFileName, dest, ref string, platform string) error {
160160
// the manifest pointed to by the given ref, unpacks all layers in the given
161161
// destination directory or returns an error if the unpacking failed.
162162
// The destination will be created if it does not exist.
163-
func Unpack(r io.ReadSeeker, dest, refName string, platform string) error {
163+
func Unpack(r io.ReadSeeker, dest, refName, platform string) error {
164164
return unpack(newTarWalker(r), dest, refName, platform)
165165
}
166166

167-
func unpack(w walker, dest, refName string, platform string) error {
167+
func unpack(w walker, dest, refName, platform string) error {
168168
if err := layoutValidate(w); err != nil {
169169
return err
170170
}
@@ -217,13 +217,13 @@ func unpack(w walker, dest, refName string, platform string) error {
217217
// CreateRuntimeBundleLayout walks through the file tree given by src and
218218
// creates an OCI runtime bundle in the given destination dest
219219
// or returns an error if the unpacking failed.
220-
func CreateRuntimeBundleLayout(src, dest, ref, root string, platform string) error {
220+
func CreateRuntimeBundleLayout(src, dest, ref, root, platform string) error {
221221
return createRuntimeBundle(newPathWalker(src), dest, ref, root, platform)
222222
}
223223

224224
// CreateRuntimeBundleFile opens the file pointed by tarFile and calls
225225
// CreateRuntimeBundle.
226-
func CreateRuntimeBundleFile(tarFile, dest, ref, root string, platform string) error {
226+
func CreateRuntimeBundleFile(tarFile, dest, ref, root, platform string) error {
227227
f, err := os.Open(tarFile)
228228
if err != nil {
229229
return errors.Wrap(err, "unable to open file")
@@ -236,11 +236,11 @@ func CreateRuntimeBundleFile(tarFile, dest, ref, root string, platform string) e
236236
// CreateRuntimeBundle walks through the given tar stream and
237237
// creates an OCI runtime bundle in the given destination dest
238238
// or returns an error if the unpacking failed.
239-
func CreateRuntimeBundle(r io.ReadSeeker, dest, ref, root string, platform string) error {
239+
func CreateRuntimeBundle(r io.ReadSeeker, dest, ref, root, platform string) error {
240240
return createRuntimeBundle(newTarWalker(r), dest, ref, root, platform)
241241
}
242242

243-
func createRuntimeBundle(w walker, dest, refName, rootfs string, platform string) error {
243+
func createRuntimeBundle(w walker, dest, refName, rootfs, platform string) error {
244244
if err := layoutValidate(w); err != nil {
245245
return err
246246
}

0 commit comments

Comments
 (0)