summaryrefslogtreecommitdiff
path: root/golang/pkg/api/utils.go
diff options
context:
space:
mode:
authorJulien Dessaux2025-02-15 01:22:36 +0100
committerJulien Dessaux2025-02-15 01:22:36 +0100
commit66466e161fff1bd2b8c2ea42249947ccc19c39fe (patch)
tree67f0e7fe70a3993764c43aa77fa6707a4137ae67 /golang/pkg/api/utils.go
parent[golang] implement automation loop and add contract accepting (diff)
downloadspacetraders-66466e161fff1bd2b8c2ea42249947ccc19c39fe.tar.gz
spacetraders-66466e161fff1bd2b8c2ea42249947ccc19c39fe.tar.bz2
spacetraders-66466e161fff1bd2b8c2ea42249947ccc19c39fe.zip
[golang] implement systems and waypoints lookups
Diffstat (limited to '')
-rw-r--r--golang/pkg/api/utils.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/golang/pkg/api/utils.go b/golang/pkg/api/utils.go
new file mode 100644
index 0000000..7dfee5c
--- /dev/null
+++ b/golang/pkg/api/utils.go
@@ -0,0 +1,7 @@
+package api
+
+import "strings"
+
+func WaypointSymbolToSystemSymbol(symbol string) string {
+ return strings.Join(strings.Split(symbol, "-")[:2], "-")
+}