mirror of
https://github.com/go-gitea/gitea.git
synced 2026-02-07 09:49:41 +09:00
Update tool dependencies (#36445)
Updates all dependencies in `Makefile`. The go fix was done automatically, I just altered the variable name. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@@ -142,8 +142,8 @@ func ParseDebugHeaderID(r io.ReadSeeker) (string, error) {
|
||||
if _, err := r.Read(b); err != nil {
|
||||
return "", err
|
||||
}
|
||||
if i := bytes.IndexByte(b, 0); i != -1 {
|
||||
buf.Write(b[:i])
|
||||
if before, _, ok := bytes.Cut(b, []byte{0}); ok {
|
||||
buf.Write(before)
|
||||
return buf.String(), nil
|
||||
}
|
||||
buf.Write(b)
|
||||
|
||||
@@ -219,8 +219,8 @@ func portOnly(hostport string) string {
|
||||
if !ok {
|
||||
return ""
|
||||
}
|
||||
if i := strings.Index(hostport, "]:"); i != -1 {
|
||||
return hostport[i+len("]:"):]
|
||||
if _, after2, ok2 := strings.Cut(hostport, "]:"); ok2 {
|
||||
return after2
|
||||
}
|
||||
if strings.Contains(hostport, "]") {
|
||||
return ""
|
||||
|
||||
Reference in New Issue
Block a user