Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
versionEqual函数主要是用来比较一个版本字符串是否等于所给出的版本字符串
versionEqual
func (s1 string) versionEqual(s2 string) bool
1.8.1
"1.8.1".versionEqual("1.008.01")
true
HTTP/1.1 200 OK Server: nginx Date: Sat, 07 Jan 2023 10:41:06 GMT Content-Type: text/html; charset=utf-8 Connection: close Vary: Accept-Encoding Cache-Control: no-cache Content-Length: 85 <!DOCTYPE html> <html> <head> <title>123</title> </head> <body> 1.8.1 </body> </html>
"(?P<version>\\d\\.\\d\\.\\d\\.)".submatch(response.body_string)["version"].versionEqual("1.8.2")
false
Was this page helpful?