MCPcopy Create free account
hub / github.com/Hidden-Node/GooseRelayVPN-AndroidClient / shortScriptKey

Function shortScriptKey

cmd/client/main.go:80–95  ·  view source on GitHub ↗
(scriptURL string)

Source from the content-addressed store, hash-verified

78}
79
80func shortScriptKey(scriptURL string) string {
81 parts := strings.Split(strings.Trim(scriptURL, "/"), "/")
82 for i := 0; i < len(parts)-1; i++ {
83 if parts[i] == "s" {
84 id := parts[i+1]
85 if len(id) > 14 {
86 return id[:6] + "..." + id[len(id)-6:]
87 }
88 return id
89 }
90 }
91 if len(parts) >= 3 {
92 return parts[2]
93 }
94 return scriptURL
95}
96
97func summarizeScriptURLs(scriptURLs []string) string {
98 if len(scriptURLs) == 0 {

Callers 1

summarizeScriptURLsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected