diff --git a/cmd/zap/cmd/synonym.go b/cmd/zap/cmd/synonym.go index a9b9a8d..d6ee14c 100644 --- a/cmd/zap/cmd/synonym.go +++ b/cmd/zap/cmd/synonym.go @@ -25,9 +25,9 @@ import ( ) var thesCmd = &cobra.Command{ - Use: "thes [path] [name]", - Short: "thes prints the thesaurus with the specified name", - Long: `The thes command lets you print the thesaurus with the specified name.`, + Use: "thesaurus [path] [name]", + Short: "thesaurus prints the thesaurus with the specified name", + Long: `The thesaurus command lets you print the thesaurus with the specified name.`, RunE: func(cmd *cobra.Command, args []string) error { pos := segment.FieldsIndexOffset() if pos == 0 { diff --git a/section_synonym.go b/section_synonym.go index 93d8ce2..a89a696 100644 --- a/section_synonym.go +++ b/section_synonym.go @@ -195,10 +195,9 @@ func (so *synonymIndexOpaque) realloc() { for _, syn := range synonyms { _, exists := termSynMap[syn] if !exists { + termSynMap[syn] = sidNext + synTermMap[sidNext] = syn sidNext++ - sidPlus1 := sidNext - termSynMap[syn] = sidPlus1 - synTermMap[sidPlus1] = syn } } })