shared

package
v1.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 13, 2023 License: MIT Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// Matching API https://www.algolia.com/doc/api-reference/api-methods/save-synonym/#method-param-type
	Regular        string = "synonym"
	OneWay         string = "oneWaySynonym"
	AltCorrection1 string = "altCorrection1"
	AltCorrection2 string = "altCorrection2"
	Placeholder    string = "placeholder"
)

Variables

This section is empty.

Functions

func FlagsToSynonym

func FlagsToSynonym(flags SynonymFlags) (search.Synonym, error)

Types

type SynonymFlags

type SynonymFlags struct {
	SynonymID           string
	SynonymInput        string
	SynonymWord         string
	SynonymPlaceholder  string
	SynonymType         string
	Synonyms            []string
	SynonymCorrections  []string
	SynonymReplacements []string
}

type SynonymType

type SynonymType string

Defining new type that implements pflag.Value interface with String, Set and Type https://stackoverflow.com/questions/50824554/permitted-flag-values-for-cobra

func (*SynonymType) Set

func (e *SynonymType) Set(v string) error

func (*SynonymType) String

func (e *SynonymType) String() string

func (*SynonymType) Type

func (e *SynonymType) Type() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL