chore(build): bump Go toolchain to 1.27.0

Go 1.27.0 shipped on 2026-08-19. Raise the go directive and the builder
image so Docker and release builds pick it up; every CI job already reads
the version from go.mod, and golangci-lint v2.13.1 release binaries are
themselves built with go1.27.0, so the lint job needs no pin change.
This commit is contained in:
Sanaei
2026-08-23 21:51:39 +02:00
parent 02002dc1c3
commit 81fcacab11
20 changed files with 48 additions and 56 deletions
+9 -9
View File
@@ -387,10 +387,10 @@ func jsonMux(global, override string) string {
}
func (s *SubJsonService) genVnext(inbound *model.Inbound, streamSettings json_util.RawMessage, client model.Client, mux string) json_util.RawMessage {
outbound := Outbound{}
outbound := Outbound{
outbound.Protocol = string(inbound.Protocol)
outbound.Tag = "proxy"
Protocol: string(inbound.Protocol),
Tag: "proxy"}
if mux != "" {
outbound.Mux = json_util.RawMessage(mux)
}
@@ -410,9 +410,9 @@ func (s *SubJsonService) genVnext(inbound *model.Inbound, streamSettings json_ut
}
func (s *SubJsonService) genVless(subReq *SubService, inbound *model.Inbound, streamSettings json_util.RawMessage, client model.Client, mux string) json_util.RawMessage {
outbound := Outbound{}
outbound.Protocol = string(inbound.Protocol)
outbound.Tag = "proxy"
outbound := Outbound{
Protocol: string(inbound.Protocol),
Tag: "proxy"}
if mux != "" {
outbound.Mux = json_util.RawMessage(mux)
}
@@ -490,10 +490,10 @@ func (s *SubJsonService) genServer(subReq *SubService, inbound *model.Inbound, s
}
func (s *SubJsonService) genHy(inbound *model.Inbound, newStream map[string]any, client model.Client, mux string) json_util.RawMessage {
outbound := Outbound{}
outbound := Outbound{
outbound.Protocol = string(inbound.Protocol)
outbound.Tag = "proxy"
Protocol: string(inbound.Protocol),
Tag: "proxy"}
if mux != "" {
outbound.Mux = json_util.RawMessage(mux)
+3 -2
View File
@@ -25,8 +25,9 @@ func initMutDB(t *testing.T) {
t.Cleanup(func() { _ = database.CloseDB() })
}
//go:fix inline
func externalLinkEnabled(v bool) *bool {
return &v
return new(v)
}
// --- json_service.go:40 — rules are merged into routing only when non-empty ---
@@ -312,7 +313,7 @@ func TestGetClientExternalLinksBySubId(t *testing.T) {
if err := db.Create(&model.ClientExternalLink{ClientId: rec.Id, Kind: model.ExternalLinkKindLink, Value: "trojan://a", Remark: "first", SortIndex: 1}).Error; err != nil {
t.Fatalf("seed link a: %v", err)
}
if err := db.Create(&model.ClientExternalLink{ClientId: rec.Id, Kind: model.ExternalLinkKindLink, Value: "trojan://disabled", Remark: "disabled", Enable: externalLinkEnabled(false), SortIndex: 3}).Error; err != nil {
if err := db.Create(&model.ClientExternalLink{ClientId: rec.Id, Kind: model.ExternalLinkKindLink, Value: "trojan://disabled", Remark: "disabled", Enable: new(false), SortIndex: 3}).Error; err != nil {
t.Fatalf("seed disabled link: %v", err)
}
if err := db.Create(&model.ClientExternalLink{ClientId: rec.Id, Kind: model.ExternalLinkKindLink, Value: "trojan://expired", Remark: "expired", ExpiryTime: time.Now().Add(-time.Hour).UnixMilli(), SortIndex: 4}).Error; err != nil {
+2 -2
View File
@@ -370,8 +370,8 @@ func normalizeHappRouting(body []byte) (string, error) {
payload := ""
for _, prefix := range []string{"happ://routing/onadd/", "happ://routing/add/"} {
if strings.HasPrefix(text, prefix) {
payload = strings.TrimPrefix(text, prefix)
if after, ok := strings.CutPrefix(text, prefix); ok {
payload = after
break
}
}