mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-30 09:51:23 +00:00
fix issues from code review
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2018 The Kubernetes Authors.
|
||||
Copyright 2019 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
@@ -17,14 +17,14 @@ limitations under the License.
|
||||
package image
|
||||
|
||||
// Append appends a slice of type Tag to slice of type Image
|
||||
func Append(images []Image, tags ...Tag) []Image {
|
||||
func Append(images []Image, tags ...ImageTag) []Image {
|
||||
for _, tag := range tags {
|
||||
images = append(images, toImage(tag))
|
||||
}
|
||||
return images
|
||||
}
|
||||
|
||||
func toImage(tag Tag) Image {
|
||||
func toImage(tag ImageTag) Image {
|
||||
return Image{
|
||||
Name: tag.Name,
|
||||
NewTag: tag.NewTag,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2018 The Kubernetes Authors.
|
||||
Copyright 2019 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
@@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Package image provides struct definitions and libraries
|
||||
// for image overwriting of names, tags and digest.
|
||||
package image
|
||||
|
||||
// Image contains an image name, a new name, a new tag or digest,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2018 The Kubernetes Authors.
|
||||
Copyright 2019 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
@@ -16,9 +16,9 @@ limitations under the License.
|
||||
|
||||
package image
|
||||
|
||||
// Tag contains an image and a new tag, which will replace the original tag.
|
||||
// Tag usage is deprecated, instead use ImageTag.
|
||||
type Tag struct {
|
||||
// ImageTag contains an image and a new tag, which will replace the original tag.
|
||||
// Deprecated, instead use Image.
|
||||
type ImageTag struct {
|
||||
// Name is a tag-less image name.
|
||||
Name string `json:"name,omitempty" yaml:"name,omitempty"`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user