当前位置: 首页>>代码示例>>Golang>>正文


Golang TagReference.Name方法代码示例

本文整理汇总了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
}
开发者ID:rhamilto,项目名称:origin,代码行数:34,代码来源:conversion_generated.go

示例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
}
开发者ID:juanluisvaladas,项目名称:origin,代码行数:19,代码来源:zz_generated.conversion.go


注:本文中的github.com/openshift/origin/pkg/image/api.TagReference.Name方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。