Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Reserve @names (mapped as /@).

I did have "master" as an invalid node name.  Instead, I don't think
we want a master node as much as services that are global and are
registered using a global service registry function.
  • Loading branch information...
commit 3edb06008e34f4b431cd34df1daba01fd983ada5 1 parent 653e3f8
Dustin Sallings dustin authored
Showing with 4 additions and 4 deletions.
  1. +1 −3 registry.go
  2. +3 −1 registry_test.go
4 registry.go
View
@@ -14,9 +14,7 @@ func validateServerId(s string) error {
switch {
case len(s) == 0:
return invalid
- case s == "master":
- return invalid
- case s[0] == '/':
+ case s[0] == '/' || s[0] == '@':
return invalid
}
return nil
4 registry_test.go
View
@@ -8,9 +8,11 @@ func TestServerIDValidation(t *testing.T) {
tests := map[string]bool{
"": false,
"/": false,
+ "/@thing": false,
+ "@thing": false,
"/something": false,
+ "master": true,
"something": true,
- "master": false,
}
for testId, shouldBeOK := range tests {
Please sign in to comment.
Something went wrong with that request. Please try again.