summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2017-11-19 11:21:35 +0100
committerChristian Pointner <equinox@spreadspace.org>2017-11-19 11:21:35 +0100
commit2d1b018920dfb7194084cbbd623e2916a0424a77 (patch)
tree09175e1a718ccd8c124fdb39275fb6c8dc5ca0c6 /src
parentmove hub web api to /api/v1/ path (diff)
use uniqe slug for clients (ip/port seperator)
Diffstat (limited to 'src')
-rw-r--r--src/hub/src/spreadspace.org/sfive/s5typesStore.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/hub/src/spreadspace.org/sfive/s5typesStore.go b/src/hub/src/spreadspace.org/sfive/s5typesStore.go
index 680973a..dbf4c4f 100644
--- a/src/hub/src/spreadspace.org/sfive/s5typesStore.go
+++ b/src/hub/src/spreadspace.org/sfive/s5typesStore.go
@@ -130,8 +130,8 @@ func NewClientDB(c *Client) *clientDB {
}
}
-func (c *clientDB) Slug() string { // TODO: use better seperator between IP:Port, : might not be unique if IP is an IPv6 address???
- return fmt.Sprintf("%s:%d/%s/%s/%s/%f,%f", c.IP, c.Port, c.CountryCode2, c.RegionCode, c.CityName, c.Latitude, c.Longitude)
+func (c *clientDB) Slug() string {
+ return fmt.Sprintf("%s-%d/%s/%s/%s/%f,%f", c.IP, c.Port, c.CountryCode2, c.RegionCode, c.CityName, c.Latitude, c.Longitude)
}
func (c *Client) CopyFromClientDB(cdb *clientDB) {