当前位置:网站首页>Golang through pointer for Range implements the change of the value of the element in the slice
Golang through pointer for Range implements the change of the value of the element in the slice
2022-07-05 18:54:00 【Learn programming notes】
*(&build.Args[2])=destination
*(&build.Args[6])=cacherepo
// Resolve when editing again ,workflow template The problem of not getting updates .
// Latest solutions : adopt argo workflow Global parameter mechanism to solve
builds := argoflowObject.Spec.Templates.Build
for _, build := range builds {
repoUrl:=build.BuildFormData.RepoUrl
if strings.Contains(repoUrl,"https://"){
repoUrl=strings.ReplaceAll(build.BuildFormData.RepoUrl,"https://","")
}
if strings.Contains(repoUrl,"http://"){
repoUrl=strings.ReplaceAll(build.BuildFormData.RepoUrl,"http://","")
}
finalImageName:=repoUrl+"/"+build.BuildFormData.ImageName+":"+build.BuildFormData.ImageTag
destination := build.Args[2]
cacherepo := build.Args[6]
destination=strings.Split(destination,"=")[0]+"="+finalImageName
cacherepo=strings.Split(cacherepo,"=")[0]+"="+repoUrl+"/"+build.BuildFormData.ImageName
*(&build.Args[2])=destination
*(&build.Args[6])=cacherepo
fmt.Println("build.Args:",build.Args)
}
边栏推荐
- Deep copy and shallow copy [interview question 3]
- max31865模块RTD测温注意事项
- How much does the mlperf list weigh when AI is named?
- 华律网牵手观测云,上线系统全链路可观测平台
- 2022最新中高级Android面试题目,【原理+实战+视频+源码】
- The 2022 China Xinchuang Ecological Market Research and model selection evaluation report released that Huayun data was selected as the mainstream manufacturer of Xinchuang IT infrastructure!
- Redhat7.4 configure Yum software warehouse (rhel7.4)
- The 11th China cloud computing standards and Applications Conference | cloud computing national standards and white paper series release, and Huayun data fully participated in the preparation
- 2022 Alibaba Android advanced interview questions sharing, 2022 Alibaba hand Taobao Android interview questions
- Is it safe to open an account and register stocks for stock speculation? Is there any risk? Is it reliable?
猜你喜欢

尚硅谷尚优选项目教程发布

The 2022 China Xinchuang Ecological Market Research and model selection evaluation report released that Huayun data was selected as the mainstream manufacturer of Xinchuang IT infrastructure!

2022最新Android面试笔试,一个安卓程序员的面试心得

达梦数据库udf实现

爬虫01-爬虫基本原理讲解

AI open2022 | overview of recommendation systems based on heterogeneous information networks: concepts, methods, applications and resources

The worse the AI performance, the higher the bonus? Doctor of New York University offered a reward for the task of making the big model perform poorly

Summary of six points of MySQL optimization

SAP 特征 特性 说明
![[HCIA cloud] [1] definition of cloud computing, what is cloud computing, architecture and technical description of cloud computing, Huawei cloud computing products, and description of Huawei memory DD](/img/b8/624799e4bf788e4476b155486f478b.png)
[HCIA cloud] [1] definition of cloud computing, what is cloud computing, architecture and technical description of cloud computing, Huawei cloud computing products, and description of Huawei memory DD
随机推荐
Summary of six points of MySQL optimization
sample_ What is the relationship between rate, sample and duration
Overview of video self supervised learning
c语言简便实现链表增删改查「建议收藏」
Memory leak of viewpager + recyclerview
Trust counts the number of occurrences of words in the file
2022 latest intermediate and advanced Android interview questions, [principle + practice + Video + source code]
面试官:Redis 过期删除策略和内存淘汰策略有什么区别?
sample_rate(采樣率),sample(采樣),duration(時長)是什麼關系
Personal understanding of convolutional neural network
爬虫01-爬虫基本原理讲解
[HCIA cloud] [1] definition of cloud computing, what is cloud computing, architecture and technical description of cloud computing, Huawei cloud computing products, and description of Huawei memory DD
Reading notes of Clickhouse principle analysis and Application Practice (5)
XML basic knowledge concept
视频融合云平台EasyCVR增加多级分组,可灵活管理接入设备
Startup and shutdown of CDB instances
LeetCode 6111. Spiral matrix IV
The worse the AI performance, the higher the bonus? Doctor of New York University offered a reward for the task of making the big model perform poorly
Isprs2022/ cloud detection: cloud detection with boundary nets
The 11th China cloud computing standards and Applications Conference | China cloud data has become the deputy leader unit of the cloud migration special group of the cloud computing standards working