当前位置:网站首页>You have a string of code, but do not support the lower version of go; Judge the go version number, you deserve it!
You have a string of code, but do not support the lower version of go; Judge the go version number, you deserve it!
2022-06-23 08:17:00 【Deng_ Xian_ Sheng】
I don't say much nonsense
Show You Code!
// copyright 2022 article author .
// The use of this source code is restricted by CC 4.0 BY-SA Constraints of style license , The license can be found in the article header .
version := runtime.Version()
reg := regexp.MustCompile(`(\d.*\.\d.*\.\d.*)`)
if reg == nil {
log.Panicln(" Regular expression parsing failed ")
}
versionStr := reg.FindAllStringSubmatch(version, -1)
versionSlice := strings.Split(versionStr[0][1], ".")
var intSlice []int
for _, v := range versionSlice {
atoi, err := strconv.Atoi(v)
if err != nil {
log.Panicln("strconv error ")
}
intSlice = append(intSlice, atoi)
}
if !(intSlice[0] >= 1 && intSlice[1] >= 18) {
return
}
fmt.Println("happy")
边栏推荐
- Basic use of check boxes and implementation of select all and invert selection functions
- Copy image bitmap by C # memory method
- 记一次高校学生账户的“从无到有”
- Fillet the tabbar with the flutter
- Create an orderly sequence table and perform the following operations: 1 Insert element x into the table and keep it in order; 2. find the element with the value of X, and delete it if found; 3. outpu
- Generate code 39 extension code in batch through Excel file
- Observer mode
- APM performance monitoring practice of jubasha app
- Imperva- method of finding regular match timeout
- C# 内存法复制图像bitmap
猜你喜欢

Ad object of Active Directory

openvino系列 19. OpenVINO 与 PaddleOCR 实现视频实时OCR处理
![[paper notes] catching both gray and black swans: open set supervised analog detection*](/img/52/787b25a9818cfc6a1897af81d41ab2.png)
[paper notes] catching both gray and black swans: open set supervised analog detection*

Active Directory之AD对象

Structure and usage of transform

Does huangrong really exist?

观察者模式

Imperva- method of finding regular match timeout

The rtsp/onvif protocol video platform easynvr startup service reports an error "service not found". How to solve it?

Captain Abu's soul torture
随机推荐
What are the PCB characteristics inspection items?
Deep learning ----- convolution (conv2d) bottom layer
Basic use of check boxes and implementation of select all and invert selection functions
transform的结构及用法
MySQL brochure notes 5 InnoDB record storage structure
ArcLayoutView: 一个弧形布局的实现
APM performance monitoring practice of jubasha app
There are some limitations in cluster expansion and contraction
顺序表课设
@What is the difference between controller and @restcontroller?
QT irregular shape antialiasing
Active Directory之AD对象
Deep learning ----- different methods to implement lenet-5 model
qt 不规则图形 消除锯齿
记一次高校学生账户的“从无到有”
odoo项目 发送信息到微信公众号或企业微信的做法
Openvino series 19 Openvino and paddleocr for real-time video OCR processing
Vulnhub | DC: 3 |【实战】
C Advanced Learning -- extended method (this)
MySQL小册子笔记 5 InnoDB 记录存储结构