spelling: sanitize
This commit is contained in:
parent
cec45c6bc8
commit
f28efbbc79
|
@ -145,7 +145,7 @@ func (c *AllocStatusCommand) Run(args []string) int {
|
|||
return 1
|
||||
}
|
||||
|
||||
allocID = sanatizeUUIDPrefix(allocID)
|
||||
allocID = sanitizeUUIDPrefix(allocID)
|
||||
allocs, _, err := client.Allocations().PrefixList(allocID)
|
||||
if err != nil {
|
||||
c.Ui.Error(fmt.Sprintf("Error querying allocation: %v", err))
|
||||
|
|
|
@ -139,7 +139,7 @@ func (c *EvalStatusCommand) Run(args []string) int {
|
|||
return 1
|
||||
}
|
||||
|
||||
evalID = sanatizeUUIDPrefix(evalID)
|
||||
evalID = sanitizeUUIDPrefix(evalID)
|
||||
evals, _, err := client.Evaluations().PrefixList(evalID)
|
||||
if err != nil {
|
||||
c.Ui.Error(fmt.Sprintf("Error querying evaluation: %v", err))
|
||||
|
|
|
@ -174,7 +174,7 @@ func (f *FSCommand) Run(args []string) int {
|
|||
return 1
|
||||
}
|
||||
|
||||
allocID = sanatizeUUIDPrefix(allocID)
|
||||
allocID = sanitizeUUIDPrefix(allocID)
|
||||
allocs, _, err := client.Allocations().PrefixList(allocID)
|
||||
if err != nil {
|
||||
f.Ui.Error(fmt.Sprintf("Error querying allocation: %v", err))
|
||||
|
|
|
@ -447,10 +447,10 @@ func mergeAutocompleteFlags(flags ...complete.Flags) complete.Flags {
|
|||
return merged
|
||||
}
|
||||
|
||||
// sanatizeUUIDPrefix is used to sanatize a UUID prefix. The returned result
|
||||
// sanitizeUUIDPrefix is used to sanitize a UUID prefix. The returned result
|
||||
// will be a truncated version of the prefix if the prefix would not be
|
||||
// queryable.
|
||||
func sanatizeUUIDPrefix(prefix string) string {
|
||||
func sanitizeUUIDPrefix(prefix string) string {
|
||||
hyphens := strings.Count(prefix, "-")
|
||||
length := len(prefix) - hyphens
|
||||
remainder := length % 2
|
||||
|
|
|
@ -149,7 +149,7 @@ func (l *LogsCommand) Run(args []string) int {
|
|||
return 1
|
||||
}
|
||||
|
||||
allocID = sanatizeUUIDPrefix(allocID)
|
||||
allocID = sanitizeUUIDPrefix(allocID)
|
||||
allocs, _, err := client.Allocations().PrefixList(allocID)
|
||||
if err != nil {
|
||||
l.Ui.Error(fmt.Sprintf("Error querying allocation: %v", err))
|
||||
|
|
|
@ -190,7 +190,7 @@ func (m *monitor) monitor(evalID string, allowPrefix bool) int {
|
|||
return 1
|
||||
}
|
||||
|
||||
evalID = sanatizeUUIDPrefix(evalID)
|
||||
evalID = sanitizeUUIDPrefix(evalID)
|
||||
evals, _, err := m.client.Evaluations().PrefixList(evalID)
|
||||
if err != nil {
|
||||
m.ui.Error(fmt.Sprintf("Error reading evaluation: %s", err))
|
||||
|
|
|
@ -122,7 +122,7 @@ func (c *NodeDrainCommand) Run(args []string) int {
|
|||
return 1
|
||||
}
|
||||
|
||||
nodeID = sanatizeUUIDPrefix(nodeID)
|
||||
nodeID = sanitizeUUIDPrefix(nodeID)
|
||||
nodes, _, err := client.Nodes().PrefixList(nodeID)
|
||||
if err != nil {
|
||||
c.Ui.Error(fmt.Sprintf("Error toggling drain mode: %s", err))
|
||||
|
|
|
@ -234,7 +234,7 @@ func (c *NodeStatusCommand) Run(args []string) int {
|
|||
return 1
|
||||
}
|
||||
|
||||
nodeID = sanatizeUUIDPrefix(nodeID)
|
||||
nodeID = sanitizeUUIDPrefix(nodeID)
|
||||
nodes, _, err := client.Nodes().PrefixList(nodeID)
|
||||
if err != nil {
|
||||
c.Ui.Error(fmt.Sprintf("Error querying node info: %s", err))
|
||||
|
|
|
@ -339,7 +339,7 @@ func (n *nomadFSM) applyUpsertJob(buf []byte, index uint64) interface{} {
|
|||
/* Handle upgrade paths:
|
||||
* - Empty maps and slices should be treated as nil to avoid
|
||||
* un-intended destructive updates in scheduler since we use
|
||||
* reflect.DeepEqual. Starting Nomad 0.4.1, job submission sanatizes
|
||||
* reflect.DeepEqual. Starting Nomad 0.4.1, job submission sanitizes
|
||||
* the incoming job.
|
||||
* - Migrate from old style upgrade stanza that used only a stagger.
|
||||
*/
|
||||
|
@ -943,7 +943,7 @@ func (n *nomadFSM) Restore(old io.ReadCloser) error {
|
|||
/* Handle upgrade paths:
|
||||
* - Empty maps and slices should be treated as nil to avoid
|
||||
* un-intended destructive updates in scheduler since we use
|
||||
* reflect.DeepEqual. Starting Nomad 0.4.1, job submission sanatizes
|
||||
* reflect.DeepEqual. Starting Nomad 0.4.1, job submission sanitizes
|
||||
* the incoming job.
|
||||
* - Migrate from old style upgrade stanza that used only a stagger.
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue