Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Commit

Permalink
api: fix consts block
Browse files Browse the repository at this point in the history
  • Loading branch information
jonboulle committed Sep 9, 2014
1 parent dad37ac commit a304a7c
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions api/units.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,15 @@ func (ur *unitsResource) set(rw http.ResponseWriter, req *http.Request, item str
ur.update(rw, su.Name, su.DesiredState)
}

const unitNameMax = 256
const digits = "0123456789"
const lowercase = "abcdefghijklmnopqrstuvwxyz"
const uppercase = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
const alphanumerical = digits + lowercase + uppercase
const validChars = alphanumerical + `:=+.\@`
const (
// These constants taken from systemd
unitNameMax = 256
digits = "0123456789"
lowercase = "abcdefghijklmnopqrstuvwxyz"
uppercase = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
alphanumerical = digits + lowercase + uppercase
validChars = alphanumerical + `:=+.\@`
)

var validUnitTypes = pkg.NewUnsafeSet(
"service",
Expand Down

0 comments on commit a304a7c

Please sign in to comment.