本文整理汇总了Golang中github.com/openshift/origin/pkg/image/api.TagReference.Name方法的典型用法代码示例。如果您正苦于以下问题:Golang TagReference.Name方法的具体用法?Golang TagReference.Name怎么用?Golang TagReference.Name使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类github.com/openshift/origin/pkg/image/api.TagReference
的用法示例。
在下文中一共展示了TagReference.Name方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: autoConvert_v1_TagReference_To_api_TagReference
func autoConvert_v1_TagReference_To_api_TagReference(in *TagReference, out *image_api.TagReference, s conversion.Scope) error {
out.Name = in.Name
if in.Annotations != nil {
in, out := &in.Annotations, &out.Annotations
*out = make(map[string]string, len(*in))
for key, val := range *in {
(*out)[key] = val
}
} else {
out.Annotations = nil
}
if in.From != nil {
in, out := &in.From, &out.From
*out = new(api.ObjectReference)
// TODO: Inefficient conversion - can we improve it?
if err := s.Convert(*in, *out, 0); err != nil {
return err
}
} else {
out.From = nil
}
out.Reference = in.Reference
if in.Generation != nil {
in, out := &in.Generation, &out.Generation
*out = new(int64)
**out = **in
} else {
out.Generation = nil
}
if err := Convert_v1_TagImportPolicy_To_api_TagImportPolicy(&in.ImportPolicy, &out.ImportPolicy, s); err != nil {
return err
}
return nil
}
示例2: autoConvert_v1_TagReference_To_api_TagReference
func autoConvert_v1_TagReference_To_api_TagReference(in *TagReference, out *api.TagReference, s conversion.Scope) error {
out.Name = in.Name
out.Annotations = in.Annotations
if in.From != nil {
in, out := &in.From, &out.From
*out = new(pkg_api.ObjectReference)
if err := api_v1.Convert_v1_ObjectReference_To_api_ObjectReference(*in, *out, s); err != nil {
return err
}
} else {
out.From = nil
}
out.Reference = in.Reference
out.Generation = in.Generation
if err := Convert_v1_TagImportPolicy_To_api_TagImportPolicy(&in.ImportPolicy, &out.ImportPolicy, s); err != nil {
return err
}
return nil
}