platform: modularize api/gui, add docs-tests-web foundation, and refresh root config
This commit is contained in:
21
selective-vpn-api/app/transport_client_runtime_helpers.go
Normal file
21
selective-vpn-api/app/transport_client_runtime_helpers.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package app
|
||||
|
||||
func findTransportClientIndex(items []TransportClient, id string) int {
|
||||
for i := range items {
|
||||
if items[i].ID == id {
|
||||
return i
|
||||
}
|
||||
}
|
||||
return -1
|
||||
}
|
||||
|
||||
func cloneMap(in map[string]any) map[string]any {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := make(map[string]any, len(in))
|
||||
for k, v := range in {
|
||||
out[k] = v
|
||||
}
|
||||
return out
|
||||
}
|
||||
Reference in New Issue
Block a user