Clean up all staticcheck errors (SA4006 + U1000): fix dead assignments in server_info.go and build_universal.go; remove unused proxy fields and functions; delete superseded icon_windows.go and shortcut_windows.go
This commit is contained in:
@@ -3,7 +3,6 @@ package api
|
||||
import (
|
||||
"net"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strings"
|
||||
)
|
||||
|
||||
@@ -38,10 +37,6 @@ func GetServerInfo(w http.ResponseWriter, r *http.Request, publicURLOverride str
|
||||
suggestedURL := "http://" + net.JoinHostPort(suggestedHost, itoa(port))
|
||||
if strings.TrimSpace(publicURLOverride) != "" {
|
||||
suggestedURL = strings.TrimSpace(publicURLOverride)
|
||||
suggestedHost = suggestedURL
|
||||
if u, err := url.Parse(suggestedURL); err == nil && u.Hostname() != "" {
|
||||
suggestedHost = u.Hostname()
|
||||
}
|
||||
}
|
||||
info := ServerInfo{
|
||||
Port: port,
|
||||
|
||||
Reference in New Issue
Block a user