mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 04:44:53 +08:00
Fix golang download website hash match pattern
This commit is contained in:
parent
38f742156d
commit
b5c14d6f26
@ -47,7 +47,7 @@ class go_xcaddy
|
||||
}
|
||||
|
||||
$version_regex = str_replace('.', '\.', $version);
|
||||
$pattern = "/href=\"\\/dl\\/{$version_regex}\\.{$os}-{$arch}\\.tar\\.gz\">.*?<tt>([a-f0-9]{64})<\\/tt>/s";
|
||||
$pattern = "/class=\"download\" href=\"\\/dl\\/{$version_regex}\\.{$os}-{$arch}\\.tar\\.gz\">.*?<tt>([a-f0-9]{64})<\\/tt>/s";
|
||||
if (preg_match($pattern, $page, $matches)) {
|
||||
$hash = $matches[1];
|
||||
} else {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user