constants

package
v1.3.55 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2022 License: MIT Imports: 6 Imported by: 132

Documentation

Index

Constants

View Source
const (
	ArbitraryCapacity1     = 1
	ArbitraryCapacity2     = 2
	ArbitraryCapacity3     = 3
	ArbitraryCapacity4     = 4
	ArbitraryCapacity5     = 5
	ArbitraryCapacity6     = 6
	ArbitraryCapacity7     = 7
	ArbitraryCapacity8     = 8
	ArbitraryCapacity9     = 9
	ArbitraryCapacity10    = 10
	ArbitraryCapacity11    = 11
	ArbitraryCapacity12    = 12
	ArbitraryCapacity13    = 13
	ArbitraryCapacity14    = 14
	ArbitraryCapacity15    = 15
	ArbitraryCapacity16    = 16
	ArbitraryCapacity17    = 17
	ArbitraryCapacity18    = 18
	ArbitraryCapacity19    = 19
	ArbitraryCapacity20    = 20
	ArbitraryCapacity21    = 21
	ArbitraryCapacity22    = 22
	ArbitraryCapacity23    = 23
	ArbitraryCapacity24    = 24
	ArbitraryCapacity25    = 25
	ArbitraryCapacity26    = 26
	ArbitraryCapacity27    = 27
	ArbitraryCapacity28    = 28
	ArbitraryCapacity29    = 29
	ArbitraryCapacity30    = 30
	ArbitraryCapacity31    = 31
	ArbitraryCapacity32    = 32
	ArbitraryCapacity64    = 64
	ArbitraryCapacity50    = 50
	ArbitraryCapacity100   = 100
	ArbitraryCapacity150   = 150
	ArbitraryCapacity200   = 200
	ArbitraryCapacity250   = 250
	ArbitraryCapacity500   = 500
	ArbitraryCapacity1000  = 1000
	ArbitraryCapacity1500  = 1500
	ArbitraryCapacity2000  = 2000
	ArbitraryCapacity2500  = 2500
	ArbitraryCapacity3000  = 3000
	ArbitraryCapacity5000  = 5000
	ArbitraryCapacity10000 = 10000
	WordCapacity8          = bitsize.Of8
	WordCapacity16         = bitsize.Of16
	WordCapacity32         = bitsize.Of32
	WordCapacity64         = bitsize.Of64
	WordCapacity128        = bitsize.Of128
	WordCapacity256        = bitsize.Of256
	WordCapacity512        = bitsize.Of512
	WordCapacity1G         = bitsize.Of1G
	LineCapacity8          = bitsize.Of8
	LineCapacity16         = bitsize.Of16
	LineCapacity32         = bitsize.Of32
	LineCapacity64         = bitsize.Of64
	LineCapacity128        = bitsize.Of128
	LineCapacity256        = bitsize.Of256
	LineCapacity512        = bitsize.Of512
	LineCapacity1G         = bitsize.Of1G
	LineCapacity2G         = bitsize.Of2G
	LineCapacity4G         = bitsize.Of4G
	LineCapacity8G         = bitsize.Of8G
	LineCapacity16G        = bitsize.Of16G
	LineCapacity32G        = bitsize.Of32G
	LineCapacity64G        = bitsize.Of64G
	LineCapacity128G       = bitsize.Of128G
	LineCapacity256G       = bitsize.Of256G
	FileCapacity8          = bitsize.Of8
	FileCapacity16         = bitsize.Of16
	FileCapacity32         = bitsize.Of32
	FileCapacity64         = bitsize.Of64
	FileCapacity128        = bitsize.Of128
	FileCapacity256        = bitsize.Of256
	FileCapacity512        = bitsize.Of512
	FileCapacity1G         = bitsize.Of1G
	FileCapacity2G         = bitsize.Of2G
	FileCapacity4G         = bitsize.Of4G
	FileCapacity8G         = bitsize.Of8G
	FileCapacity16G        = bitsize.Of16G
	FileCapacity32G        = bitsize.Of32G
	FileCapacity64G        = bitsize.Of64G
	FileCapacity128G       = bitsize.Of128G
	FileCapacity256G       = bitsize.Of256G
	Capacity1              = 1
	Capacity2              = 2
	Capacity3              = 3
	Capacity4              = 4
	Capacity5              = 5
	Capacity6              = 6
	Capacity7              = 7
	Capacity8              = bitsize.Of8
	Capacity10             = 10
	Capacity12             = 12
	Capacity16             = bitsize.Of16
	Capacity32             = bitsize.Of32
	Capacity64             = bitsize.Of64
	Capacity128            = bitsize.Of128
	Capacity256            = bitsize.Of256
	Capacity512            = bitsize.Of512
	Capacity1G             = bitsize.Of1G
	Capacity2G             = bitsize.Of2G
	Capacity4G             = bitsize.Of4G
	Capacity8G             = bitsize.Of8G
	Capacity16G            = bitsize.Of16G
	Capacity32G            = bitsize.Of32G
	Capacity64G            = bitsize.Of64G
	Capacity128G           = bitsize.Of128G
	Capacity256G           = bitsize.Of256G
)
View Source
const (
	EmptyString                              = ""
	EmptyArray                               = "[]"
	FirstItemEmptyStringArray                = "[\"\"]"
	EmptyStatus                              = "Empty Status"
	FilePath                                 = "File Path"
	DirectoryPath                            = "Directory Path"
	Dot                                      = "."
	UpperCaseA                               = 'A'
	UpperCaseZ                               = 'Z'
	LowerCaseA                               = 'a'
	LowerCaseZ                               = 'z'
	LowerCase                                = LowerCaseA - UpperCaseA // c - 'A' + 'a' (ref: https://bit.ly/3mFnUPW)
	UpperCase                                = UpperCaseA - LowerCaseA // c - 'a' + 'A'
	NewLineMac                               = "\n"
	NewLineUnix                              = "\n"
	DefaultLine                              = "\n"
	NewLineHyphenSpace                       = DefaultLine + HyphenSpace
	NewLineEqualSpace                        = DefaultLine + "= "
	NewLineWindows                           = "\r\n"
	Tab                                      = "\t"
	TabV                                     = "\v"
	Hash                                     = "#"
	DoubleHash                               = "##"
	TripleHash                               = "###"
	HashSpace                                = "# "
	DoubleHashSpace                          = "## "
	Space                                    = " "
	Hyphen                                   = "-"
	Semicolon                                = ";"
	Comma                                    = ","
	CommaUnixNewLine                         = ",\n"
	CommaSpace                               = ", "
	CsvJoiner                                = CommaSpace
	SpaceColonSpace                          = " : "
	Pipe                                     = "|"
	QuestionMarkSymbol                       = "?"
	NilString                                = "nil"
	EqualSymbol                              = "="
	DoubleEqualSymbol                        = "=="
	TripleEqualSymbol                        = "==="
	NotEqualSymbol                           = "!="
	JsNotEqualSymbol                         = "!=="
	SqlNotEqualSymbol                        = "<>"
	LeftLessSymbol                           = "<"
	LeftLessEqualSymbol                      = "<="
	LeftGreaterSymbol                        = ">"
	LeftGreaterEqualSymbol                   = ">="
	InvalidNotFoundCase                      = -1
	Zero                                     = 0
	NotImplemented                           = "Not Implemented"
	SingleQuoteSymbol                byte    = '\''
	DoubleQuoteSymbol                byte    = '"'
	SingleQuoteStringSymbol                  = "'"
	DoubleQuoteStringSymbol                  = "\""
	DoubleDoubleQuoteStringSymbol            = "\"\""
	ParenthesisStartSymbol           byte    = '('
	ParenthesisEndSymbol             byte    = ')'
	CurlyStartSymbol                 byte    = '{'
	CurlyEndSymbol                   byte    = '}'
	SquareStartSymbol                byte    = '['
	SquareEndSymbol                  byte    = ']'
	LineFeedUnix                             = '\n'
	CarriageReturn                           = '\r'
	FormFeed                                 = '\f'
	SpaceByte                                = ' '
	TabByte                                  = '\t'
	LineFeedUnixByte                         = '\n'
	CarriageReturnByte                       = '\r'
	FormFeedByte                             = '\f'
	TabVByte                                 = '\v'
	MaxUnit8                         byte    = 255
	OtherPathSeparator                       = "/"
	WindowsPathSeparator                     = "\\"
	WindowsOS                                = "windows"
	LowerCaseFileColon                       = "file:"
	DoubleBackSlash                          = "\\\\"
	TripleBackSlash                          = "\\\\\\"
	BackSlash                                = "\\"
	DoubleForwardSlash                       = "//"
	TripleForwardSlash                       = "///"
	BackwardAndForwardSlashes                = "\\//"
	ForwardSlash                             = "/"
	UriSchemePrefixStandard                  = "file:///"
	UriSchemePrefixTwoSlashes                = "file://"
	Underscore                               = "_"
	Colon                                    = ":"
	Dash                                     = "-"
	DoubleDash                               = "--"
	DoubleUnderscore                         = "__"
	HyphenAngelRight                         = "->"
	GoPath                                   = "GOPATH"
	GoBinPath                                = "GOBIN"
	Go111ModuleEnvironment                   = "GO111MODULE"
	On                                       = "on"
	PathSeparator                            = string(os.PathSeparator)
	DoublePathSeparator                      = PathSeparator + PathSeparator
	Dollar                                   = "$"
	DoubleDollar                             = "$$"
	Percent                                  = "%"
	DoublePercent                            = "%%"
	One                                      = 1
	SemiColon                                = ";"
	Path                                     = "PATH"
	Unix                                     = "Unix OS"
	Windows                                  = "Windows OS"
	SymbolicLinkCreationCommandName          = "ln"
	SymbolicLinkCreationArgument             = "-s"
	Architecture64                           = "X64"
	Architecture32                           = "X32"
	LongPathUncPrefix                        = `\\?\UNC\`
	LongPathQuestionMarkPrefix               = `\\?\`
	SingleHash                               = "#"
	EndOfBlock                               = "}"
	EndOfLineMark                            = ";"
	StartOfBlock                             = "{"
	MinusOne                                 = -1
	InvalidValue                             = -1
	InvalidIndex                             = -1
	InvalidLineNumber                        = -1
	TakeAllMinusOne                          = -1
	NoLimits                                 = -1
	DontCompare                              = -1
	WildcardSymbol                           = "*"
	WildcardChar                             = '*'
	WildcardRune                     rune    = '*'
	ParenthesisStart                         = "("
	ParenthesisEnd                           = ")"
	CurlyStart                               = "{"
	CurlyEnd                                 = "}"
	SquareStart                              = "["
	SquareEnd                                = "]"
	ZeroChar                         byte    = '0'
	NineChar                         byte    = '9'
	HyphenChar                       byte    = '-'
	MaxUnit8Rune                     rune    = 255
	MaxUnit8AsInt16                  int16   = 255
	MaxUnit8AsInt                    int     = 255
	MaxInt16                                 = math.MaxUint16
	MaxInt16AsInt                    int     = math.MaxUint16
	MaxUnit8AsFloat32                float32 = 255
	ParenthesisStartRune             rune    = '('
	ParenthesisEndRune               rune    = ')'
	CurlyStartRune                   rune    = '{'
	CurlyEndRune                     rune    = '}'
	SquareStartRune                  rune    = '['
	SquareEndRune                    rune    = ']'
	ZeroRune                         rune    = '0'
	NineRune                         rune    = '9'
	HyphenRune                       rune    = '-'
	UpperCaseARune                   rune    = 'A'
	UpperCaseZRune                   rune    = 'Z'
	LowerCaseARune                   rune    = 'a'
	LowerCaseZRune                   rune    = 'z'
	LowerCaseRune                    rune    = LowerCaseA - UpperCaseA         // c - 'A' + 'a' (ref: https://bit.ly/3mFnUPW) a - A = 32 also works
	UpperCaseRune                            = UpperCaseARune - LowerCaseARune // c - 'a' + 'A'
	NoElements                               = "{No Element}"
	NoItems                                  = "{No Items}"
	NoItemsSquare                            = "[No Items]"
	NoElementsSquare                         = "[No Element]"
	DoubleNewLine                            = "\n\n"
	DefaultLineByte                  byte    = '\n'
	DotSymbol                                = "."
	DotChar                          byte    = '.'
	ForwardChar                      byte    = '/'
	BackwardChar                     byte    = '\\'
	AndChar                          byte    = '&'
	PipeChar                         byte    = '|'
	ParenthesisStartChar             byte    = '('
	ParenthesisEndChar               byte    = ')'
	CurlyBraceStartChar              byte    = '{'
	CurlyBraceEndChar                byte    = '}'
	SquareBraceStartChar             byte    = '['
	SquareBraceEndChar               byte    = ']'
	AngleStartChar                   byte    = '<'
	AngleEndChar                     byte    = '>'
	QuestionChar                     byte    = '?'
	CommaChar                        byte    = ','
	ExclamationChar                  byte    = '!'
	HashChar                         byte    = '#'
	DollarChar                       byte    = '$'
	AsteriskChar                     byte    = '*'
	WildcardStarChar                 byte    = '*'
	PlusChar                         byte    = '+'
	MinusChar                        byte    = '-'
	UnderscoreChar                   byte    = '_'
	SingleQuoteChar                  byte    = '\''
	DoubleQuoteChar                  byte    = '"'
	ColonChar                        byte    = ':'
	SemicolonChar                    byte    = ';'
	SpaceChar                        byte    = ' '
	AtChar                           byte    = '@'
	EqualChar                        byte    = '='
	LeftLessChar                     byte    = '<'
	LeftGreaterChar                  byte    = '>'
	DotRune                          rune    = '.'
	ForwardRune                      rune    = '/'
	BackwardRune                     rune    = '\\'
	AndRune                          rune    = '&'
	PipeRune                         rune    = '|'
	CurlyBraceStartRune              rune    = '{'
	CurlyBraceEndRune                rune    = '}'
	SquareBraceStartRune             rune    = '['
	SquareBraceEndRune               rune    = ']'
	AngleStartRune                   rune    = '<'
	AngleEndRune                     rune    = '>'
	QuestionRune                     rune    = '?'
	CommaRune                        rune    = ','
	ExclamationRune                  rune    = '!'
	HashRune                         rune    = '#'
	DollarRune                       rune    = '$'
	AsteriskRune                     rune    = '*'
	PlusRune                         rune    = '+'
	MinusRune                        rune    = '-'
	UnderscoreRune                   rune    = '_'
	SingleQuoteRune                  rune    = '\''
	DoubleQuoteRune                  rune    = '"'
	AtRune                           rune    = '@'
	ColonRune                        rune    = ':'
	SemicolonRune                    rune    = ';'
	SpaceRune                        rune    = ' '
	EqualRune                        rune    = '='
	LeftLessRune                     rune    = '<'
	LeftGreaterRune                  rune    = '>'
	MinusTwo                                 = -2
	MinusThree                               = -3
	MinusFour                                = -4
	Two                                      = 2
	Three                                    = 3
	Four                                     = 4
	Five                                     = 5
	Six                                      = 6
	Seven                                    = 7
	Eight                                    = 8
	Nine                                     = 9
	Ten                                      = 10
	AsteriskSymbol                           = "*"
	PlusSymbol                               = "+"
	TildeSymbol                              = "~"
	TildeChar                        byte    = '~'
	TildeRune                        rune    = '~'
	BrokenLongPathUncPrefix                  = `\?\UNC\`
	BrokenLongPathQuestionMarkPrefix         = `\?\`
	N0                                       = 0
	N1                                       = 1
	N2                                       = 2
	N3                                       = 3
	N4                                       = 4
	N5                                       = 5
	N6                                       = 6
	N7                                       = 7
	N8                                       = 8
	N9                                       = 9
	N10                                      = 10
	N11                                      = 11
	N12                                      = 12
	N13                                      = 13
	N14                                      = 14
	N15                                      = 15
	N16                                      = 16
	N17                                      = 17
	N18                                      = 18
	N19                                      = 19
	N20                                      = 20
	N21                                      = 21
	N22                                      = 22
	N23                                      = 23
	N24                                      = 24
	N25                                      = 25
	N26                                      = 26
	N27                                      = 27
	N28                                      = 28
	N29                                      = 29
	N30                                      = 30
	N31                                      = 31
	N32                                      = 32
	DistributorID                            = "Distributor ID"
	Description                              = "Description"
	Release                                  = "Release"
	Codename                                 = "Codename"
	HyphenA                                  = "-a"
	UnameArgForReleaseInfo                   = "-r"
	ArgumentForReleaseDate                   = "-v"
	LsbCommand                               = "lsb_release"
	UnameCommand                             = "uname"
	Shell                                    = "sh"
	Bash                                     = "bash"
	BinShellCmd                              = "/bin/sh"
	Etc                                      = "/etc/"
	ShellCmdline                             = "sh"
	PerlCmdline                              = "perl"
	MakeCmdline                              = "make"
	Pwsh                                     = "pwsh"
	Cmd                                      = "cmd"
	HypenC                                   = "-c"
	Cd                                       = "cd"
	Pwd                                      = "pwd"
	BashDefaultPath                          = "/bin/bash"
	BashCommandline                          = "bash"
	NonInteractiveFlag                       = "-c"
	NonInteractiveCmdFlag                    = "/c"
	NonInteractivePerlFlag                   = "-e"
	ChmodCommand                             = "chmod"
	RecursiveCommandFlag                     = "-R"
	VersionCommandForCmd                     = "ver.exe"
	CompareEqual                             = 0
	CompareLess                              = -1
	CompareGreater                           = 1
	NilAngelBracket                          = "<nil>"
	CommaRawValueColonSpace                  = ", value: "
	IndexColonSpace                          = "index: "
	CommaIndexColonSpace                     = ", index: "
	N0String                                 = "0" // N refers to number
	N1String                                 = "1"
	N2String                                 = "2"
	N3String                                 = "3"
	N4String                                 = "4"
	N5String                                 = "5"
	N6String                                 = "6"
	N7String                                 = "7"
	N8String                                 = "8"
	N9String                                 = "9"
	N10String                                = "10"
	MaxUint                                  = ^uint(0) // https://stackoverflow.com/a/6878625
	MinUint                                  = 0
	MaxInt                                   = int(MaxUint >> 1) // https://stackoverflow.com/a/6878625, 64 bit 9223372036854775807, 32bit, 2147483647
	MinInt                                   = -MaxInt - 1
	NewLineUnixChar                  byte    = '\n'
	NewLineUnixRune                  rune    = '\n'
	DefaultRangesJoiner                      = ", "
	DoubleQuotationStartEnd                  = `""`
	DoubleQuotation                          = `"`
	SingleQuotationStartEnd                  = `''`
	SingleQuotation                          = `'`
	Backtick                                 = "`"
	BacktickStartEnd                         = "``"
	BacktickSymbol                           = '`'
	BacktickRuneSymbol               rune    = '`'
	CodeQuotation                            = "`"
	CodeQuotationStartEnd                    = "``"
	SpaceWithColon                           = " : "
	CurrentDirDot                            = Dot
	InQuerySuffix                            = " IN (?)"
	SslPort                                  = 443
	PublicPort                               = 80
	Common8080Port                           = 8080
	SpaceHyphenSpace                         = " - "
	HyphenSpace                              = "- "
	SpaceEqualSpace                          = " = "
	SpacePipeSpace                           = " | "
	SpaceUnderscoreSpace                     = " _ "
	SpaceColonEqualSpace                     = " := "
	SpaceCommaSpace                          = " , "
	NewLineSpaceHyphenSpace                  = "\n - "
	NewLineSpaceEqualSpace                   = "\n = "
	NewLineSpacePlusSpace                    = "\n + "
	SpaceHyphenAngelBracketSpace             = " -> "
	NonAsyncSafeRangeSmall                   = 15
	NonAsyncSafeRangeMedium                  = 50
	NonAsyncSafeRangeLarge                   = 100
	FileInfoEachLineJoiner                   = ",\n - "
	IndentFileInfoEachLineJoiner             = "\n   - "
	PrefixKeyword                            = "prefix"
	RelativeKeyword                          = "relative"
	IdKeyword                                = "id"
	OnKeyword                                = "on"
	OffKeyword                               = "off"
	FileKeyword                              = "file"
	LogFileKeyword                           = "log-file"
	HomeKeyword                              = "home"
	UserKeyword                              = "user"
	AppKeyword                               = "app"
	TmpKeyword                               = "tmp"
	WrappedTemplate                          = "{wrapped}"
	BracketsWrappedTemplate                  = "{brackets-wrapped}"
	QuotesWrappedTemplate                    = "{quotes-wrapped}"
	SingleQuotesWrappedTemplate              = "{single-quotes-wrapped}"
	DoubleQuotesWrappedTemplate              = "{double-quotes-wrapped}"
	BacktickQuotesWrappedTemplate            = "{backtick-quotes-wrapped}"
	ParenthesisWrappedTemplate               = "{parenthesis-wrapped}"
	SquareWrappedTemplate                    = "{square-wrapped}"
	CurlyWrappedTemplate                     = "{curly-wrapped}"
	DynamicTemplate                          = "{dynamic}"
	DynamicTemplateTemplate                  = "{dynamic-template}"
	RandomTemplate                           = "{random}"
	InjectTemplate                           = "{inject-template}"
	ValueTemplate                            = "{value}"
	ValueWithFieldsTemplate                  = "{value-fields}"
	ValueJsonTemplate                        = "{value-json}"
	ValueYamlTemplate                        = "{value-yaml}"
	PathPrefixTemplate                       = "{prefix}"
	PathRelativeTemplate                     = "{relative}"
	PathIdTemplate                           = "{id}"
	PathLogFileTemplate                      = "{log-file}"
	PathFileTemplate                         = "{file}"
	PathRootTemplate                         = "{root}"
	PathHomeTemplate                         = "{home}"
	PathUserTemplate                         = "{user}"
	PathRootPrefixTemplate                   = "{root}/{prefix}/"
	PathHomeUserTemplate                     = "{home}/{user}"
	PathHomeUserAppTemplate                  = "{home}/{user}/{app}"
	PathTempDirTemplate                      = "{tmp}/{app}/{pkg}/"
	PathTempTestDirTemplate                  = "{tmp}/{app}/{pkg}/{test}"
	PathVarAppDirTemplate                    = "/var/{app}"                      // app
	PathVarAppDirFileTemplate                = PathVarAppDirTemplate + "/{file}" // app, file
	PathVarLogDirTemplate                    = "/var/log"
	PathVarAppLogDirTemplate                 = "/var/log/{app}/{log-file}"       // app, log-filename
	PrefixRelativeTemplate                   = "{prefix}/{relative}"             // prefix, relative
	PrefixRelativeIdTemplate                 = "{prefix}/{relative}/{id}"        // prefix, relative, id
	PrefixRelativeIdFileTemplate             = "{prefix}/{relative}/{id}/{file}" // prefix, relative, id, file
	PrefixRelativeFormat                     = "%v/%v"                           // prefix, relative
	PrefixRelativeIdFormat                   = "%v/%v/%v"                        // prefix, relative, id
	PrefixRelativeIdFileFormat               = "%v/%v/%v/%v"                     // prefix, relative, id, file
	KeyValShortFormat                        = "%s = %v"                         // Key, Value any
	KeyValJsonFormat                         = "{key: %s, val: %v}"              // Key, Value any
	KeyValQuotationWrapJsonFormat            = "\"%v\":\"%v\""                   // Key, Value any
	KeyStringValAnyWrapJsonFormat            = "\"%v\":%v"                       // Key, Value any
	EnumNameValueFormat                      = "%s[%d]"                          // name, value any
	EnumDoubleQuoteNameValueFormat           = "\"%s\"[%d]"                      // name, value any
	StringEnumNameValueFormat                = "%s"                              // name, value any
	LikeQuerySuffix                          = " LIKE ?"
	SpaceStartedExclamation                  = " started!"
	SpaceEndedExclamation                    = " ended!"
	SpaceFailedExclamation                   = " failed!"
	SpaceErrorColon                          = " error:"
	AndJoiner                                = " AND "
	WhereClauseStart                         = " WHERE "
	DoubleStars                              = "**"
	Export                                   = "export"
	ProductName                              = "Cimux"
	ProductNameLower                         = "cimux"
	RedisDefaultAddress                      = "localhost:6379"
	DefaultConcurrency                       = 10
	DefaultMaxTrySmall                       = 3
	DefaultMaxTry                            = 5
	DefaultMaxTryLarge                       = 10
	DefaultMaxDepth                          = 50
	DefaultMaxDepthSmall                     = 10
	DefaultRecursiveMaxDepth                 = 255
	DefaultRecursiveMaxDepthLarge            = 2048
	DefaultMaxLevel                          = 8
	DefaultMaxLevelLarge                     = 64
	DefaultWait                              = 800 * time.Millisecond
	DefaultWaitLong                          = 1 * time.Minute
	DefaultWaitLongLong                      = 2 * time.Minute
	DefaultWaitFast                          = 500 * time.Millisecond
	DefaultWaitFastest                       = 300 * time.Millisecond
	DurationDay                              = 24 * time.Hour
	DurationWeek                             = 7 * DurationDay
	DurationMinute                           = 1 * time.Minute
	DurationMonth                            = 30 * DurationDay
	DurationYear                             = 365 * DurationDay
	SourceLower                              = "source"
	Source                                   = "Source"
	DestinationLower                         = "destination"
	Destination                              = "Destination"
	FromLower                                = "from"
	ToLower                                  = "to"
	From                                     = "From"
	To                                       = "To"
	Left                                     = "Left"
	Right                                    = "Right"
	LeftLower                                = "left"
	RightLower                               = "right"
	List                                     = "List"
	ListLower                                = "list"
	ListsLower                               = "lists"
	HistoryLower                             = "history"
	VerboseLower                             = "verbose"
	DoubleHyphen                             = "--"
	VerboseFlagName                          = DoubleHyphen + VerboseLower
	IncludesString                           = "Includes"
	IncludeString                            = "Include"
	DebugLowerString                         = "debug"
	LogLowerString                           = "log"
	JsonLowerString                          = "json"
	AvailableLowerString                     = "available"
	DefaultString                            = "Default"
	AllCapitalDefaultString                  = "DEFAULT"
	Localhost                                = "localhost"
	LocalhostPublicPort                      = "localhost:80"
	NewLineTabTab                            = "\n\t\t"
	UnknownType                              = "Unknown type"
	DotString                                = ".string"
	DotStringTitleCase                       = ".String"
	UnknownStringType                        = "Unknown type.String"
	PayloadsFieldName                        = "Payloads"
)
View Source
const (
	SprintValueFormat                            = "%v"
	SprintValueDoubleQuotationFormat             = "\"%v\""
	SprintNumberFormat                           = "%d"
	SprintFullPropertyNameValueFormat            = "%#v"
	SprintPropertyNameValueFormat                = "%+v"
	SprintPropertyValueWithTypeFormat            = "%+v (%T)"
	SprintTypeFormat                             = "%T"
	SprintTypeInParenthesisFormat                = "(type : %T)"
	SprintNilValueTypeInParenthesisFormat        = "<nil> (type : %T)"
	SprintValueWithTypeFormat                    = "%v " + SprintTypeInParenthesisFormat
	SprintDoubleQuoteFormat                      = "%q"
	SprintSingleQuoteFormat                      = "'%s'"
	SprintStringFormat                           = "%s"
	SprintThirdBracketQuoteFormat                = "[\"%v\"]"
	KeyValuePariSimpleFormat                     = "{ Key (Type - %T): %v} - { Value (Type - %T) : %v  }"
	SprintFormatNumberWithColon                  = "%d:%d"
	SprintFormatAnyValueWithColon                = "%v:%v"
	TitleValueFormat                             = "%s : %v"
	CurlyTitleWrapFormat                         = "%v: {%v}"        // Title, Value
	QuotationTitleWrapFormat                     = "%v: \"%v\""      // Title, Value
	QuotationTitleMetaWrapFormat                 = "%v: \"%v\" (%v)" // Title, Value, Meta
	CurlyTitleMetaWrapFormat                     = "%v: {%v} (%v)"   // Title, Value, Meta
	SquareTitleWrapFormat                        = "%v: [%v]"        // Title, Value
	SquareTitleMetaWrapFormat                    = "%v: [%v] (%v)"   // Title, Value, Meta
	SprintFormatAnyValueWithComma                = "%v,%v"
	SprintFormatWithNewLine                      = "%v\n%v"
	SprintFormatAnyValueWithPipe                 = "%v|%v"
	SprintFormatAnyNameValueWithColon            = "%#v:%#v"
	SprintFormatAnyNameValueWithPipe             = "%#v|%#v"
	SprintFormatNumberWithHyphen                 = "%d-%d"
	SprintFormatNumberWithPipe                   = "%d|%d"
	ThreeValueNewLineJoin                        = "%v\n%v\n%v"
	ThreeValueNewLineSpaceJoin                   = " %v\n %v\n %v"
	BracketWrapFormat                            = "[%v]"
	BracketQuotationWrapFormat                   = "[\"%v\"]"
	CurlyWrapFormat                              = "{%v}"
	SquareWrapFormat                             = "[%v]"
	ParenthesisWrapFormat                        = "(%v)"
	CurlyQuotationWrapFormat                     = "{\"%v\"}"
	ParenthesisQuotationWrap                     = "(\"%v\")"
	ReferenceWrapFormat                          = "Ref (s) { %v }"
	MessageReferenceWrapFormat                   = "%s Ref (s) { %v }"
	StringWithBracketWrapNumberFormat            = "%s[%d]"
	DoubleQuoteStringWithBracketWrapNumberFormat = "\"%s\"[%d]"
	SpaceHyphenAngelBracketSpaceRefWrapFormat    = " -> Ref(%v)"
	ValueWithDoubleQuoteFormat                   = "\"%v\""
	ValueWithSingleQuoteFormat                   = "'%v'"
	StringWithDoubleQuoteFormat                  = "\"%s\""
	StringWithSingleQuoteFormat                  = "'%s'"
	MessageWrapMessageFormat                     = "%s (%s)"
	FromToFormat                                 = "{From : %q, To: %q}"            // From, To name
	SourceDestinationFormat                      = "{Source : %q, Destination: %q}" // source, destination
	RenameFormat                                 = "{Existing : %q, New: %q}"       // existing, new
	ValueWrapValueFormat                         = "%v (%v)"
	FilePathEmpty                                = "File path was empty(\"\")."
	EnumOnlySupportedFormat                      = "enum: %T, " +
		"not supported (\"%s\") | only supported { %s }" // enumSelf, enumSelf, csv-support
	EnumOnlySupportedWithMessageFormat = "enum: %T, " +
		"not supported (\"%s\") | %s | only supported { %s }" // enumSelf, enumSelf, message, csv-support
)
View Source
const (
	// Reference: https://stackoverflow.com/a/49963413
	// Operating system based newline, for unix it is "\n"
	// For Windows Operating system, "\r\n"
	NewLine = NewLineUnix
)

Variables

View Source
var (
	// Copied from golang strings
	AsciiSpace = [256]uint8{
		TabByte:            One,
		LineFeedUnixByte:   One,
		TabVByte:           One,
		FormFeedByte:       One,
		CarriageReturnByte: One,
		SpaceByte:          One,
		0x85:               One,
		0xA0:               One,
	}

	// FormFeed \f is also marked as newline here.
	AsciiNewLinesChars = [256]uint8{
		LineFeedUnix:   One,
		FormFeed:       One,
		CarriageReturn: One,
	}

	SpecialChars = [256]uint8{
		'!': One,
		'@': One,
		'#': One,
		'$': One,
		'%': One,
		'^': One,
		'&': One,
		'*': One,
		'(': One,
		')': One,
	}

	BracketChars = [256]uint8{
		'[': One,
		']': One,
		'{': One,
		'}': One,
		'(': One,
		')': One,
		'<': One,
		'>': One,
	}

	EmptyStrings          []string
	EmptyPtrStrings       []*string
	EmptyInts             []int
	EmptyBytes            []byte
	EmptyFloats           []float32
	EmptyFloat64s         []float64
	EmptyInterfaces       []interface{}
	EmptyIntToPtrIntsMap  map[int]*[]int
	EmptyIntToIntsMap     map[int][]int
	EmptyIntToBytesMap    map[int][]byte
	EmptyIntToPtrBytesMap map[int]*[]byte
	EmptyStringMap        map[string]string
	EmptyStrToIntsMap     map[string][]int
	EmptyStrToPtrIntsMap  map[string]*[]int
	EmptyStrToPtrBytesMap map[string]*[]byte
	EmptyStringsMap       map[string][]string
	EmptyPtrStringsMap    map[string]*[]string
)
View Source
var (
	AsciiSpacePtr            = &AsciiSpace
	AsciiNewLinesCharsPtr    = &AsciiNewLinesChars
	EmptyStringsPtr          = &EmptyStrings
	EmptyPtrStringsPtr       = &EmptyPtrStrings
	EmptyIntsPtr             = &EmptyInts
	EmptyBytesPtr            = &EmptyBytes
	EmptyFloatsPtr           = &EmptyFloats
	EmptyFloat64sPtr         = &EmptyFloat64s
	EmptyInterfacesPtr       = &EmptyInterfaces
	EmptyIntToPtrIntsMapPtr  = &EmptyIntToPtrIntsMap
	EmptyIntToIntsMapPtr     = &EmptyIntToIntsMap
	EmptyIntToBytesMapPtr    = &EmptyIntToBytesMap
	EmptyIntToPtrBytesMapPtr = &EmptyIntToPtrBytesMap
	EmptyStringMapPtr        = &EmptyStringMap
	EmptyStrToIntsMapPtr     = &EmptyStrToIntsMap
	EmptyStrToPtrIntsMapPtr  = &EmptyStrToPtrIntsMap
	EmptyStrToPtrBytesMapPtr = &EmptyStrToPtrBytesMap
	EmptyStringsMapPtr       = &EmptyStringsMap
	EmptyPtrStringsMapPtr    = &EmptyPtrStringsMap
)
View Source
var (
	NewLineBytes        = []byte(NewLine)
	NewLineUnixBytes    = []byte(NewLineUnix)
	DefaultLineBytes    = []byte(DefaultLine)
	NewLineWindowsBytes = []byte(NewLineWindows)

	CpuNumber          = runtime.NumCPU()
	ProcessorCount     = CpuNumber
	MaxWorker          = CpuNumber * 5
	SafeWorker         = CpuNumber * 3
	SafestWorker       = CpuNumber * 2
	UnsafeNullPointer  = unsafe.Pointer(nil)          // Reference: https://github.com/golang/go/issues/4680
	NullPointerUintPtr = uintptr(unsafe.Pointer(nil)) // Reference: https://github.com/golang/go/issues/4680
)
View Source
var (
	// Better to use NewLineUnix
	NewLinePtr                           = &newline
	EmptyArrayPtr                        = &emptyArray
	FirstItemEmptyStringArrayPtr         = &firstItemEmptyStringArray
	EmptyStatusPtr                       = &emptyStatus
	FilePathPtr                          = &filePath
	DirectoryPathPtr                     = &directoryPath
	DotPtr                               = &dot
	UpperCaseAPtr                        = &upperCaseA
	UpperCaseZPtr                        = &upperCaseZ
	LowerCaseAPtr                        = &lowerCaseA
	LowerCaseZPtr                        = &lowerCaseZ
	LowerCasePtr                         = &lowerCase
	UpperCasePtr                         = &upperCase
	NewLineMacPtr                        = &newLineMac
	NewLineUnixPtr                       = &newLineUnix
	NewLineWindowsPtr                    = &newLineWindows
	TabPtr                               = &tab
	TabVPtr                              = &tabV
	HashPtr                              = &hash
	DoubleHashPtr                        = &doubleHash
	TrippleHashPtr                       = &trippleHash
	HashSpacePtr                         = &hashSpace
	DoubleHashSpacePtr                   = &doubleHashSpace
	SpacePtr                             = &space
	HyphenPtr                            = &hyphen
	SemicolonPtr                         = &semicolon
	CommaPtr                             = &comma
	CommaSpacePtr                        = &commaSpace
	SpaceColonSpacePtr                   = &spaceColonSpace
	PipePtr                              = &pipe
	QuestionMarkSymbolPtr                = &questionMarkSymbol
	NilStringPtr                         = &nilString
	SprintValueFormatPtr                 = &sprintValueFormat
	SprintNumberFormatPtr                = &sprintNumberFormat
	SprintFullPropertyNameValueFormatPtr = &sprintFullPropertyNameValueFormat
	SprintPropertyNameValueFormatPtr     = &sprintPropertyNameValueFormat
	SprintTypeFormatPtr                  = &sprintTypeFormat
	InvalidNotFoundCasePtr               = &invalidNotFoundCase
	ZeroPtr                              = &zero
	NotImplementedPtr                    = &notImplemented
	SingleQuoteSymbolPtr                 = &singleQuoteSymbol
	DoubleQuoteSymbolPtr                 = &doubleQuoteSymbol
	SingleQuoteStringSymbolPtr           = &singleQuoteStringSymbol
	DoubleQuoteStringSymbolPtr           = &doubleQuoteStringSymbol
	DoubleDoubleQuoteStringSymbolPtr     = &doubleDoubleQuoteStringSymbol
	ParenthesisStartSymbolPtr            = &parenthesisStartSymbol
	ParenthesisEndSymbolPtr              = &parenthesisEndSymbol
	CurlyStartSymbolPtr                  = &curlyStartSymbol
	CurlyEndSymbolPtr                    = &curlyEndSymbol
	SquareStartSymbolPtr                 = &squareStartSymbol
	SquareEndSymbolPtr                   = &squareEndSymbol
	ArbitraryCapacity1Ptr                = &arbitraryCapacity1
	ArbitraryCapacity2Ptr                = &arbitraryCapacity2
	ArbitraryCapacity3Ptr                = &arbitraryCapacity3
	ArbitraryCapacity4Ptr                = &arbitraryCapacity4
	ArbitraryCapacity5Ptr                = &arbitraryCapacity5
	ArbitraryCapacity6Ptr                = &arbitraryCapacity6
	ArbitraryCapacity7Ptr                = &arbitraryCapacity7
	ArbitraryCapacity8Ptr                = &arbitraryCapacity8
	ArbitraryCapacity9Ptr                = &arbitraryCapacity9
	ArbitraryCapacity10Ptr               = &arbitraryCapacity10
	ArbitraryCapacity11Ptr               = &arbitraryCapacity11
	ArbitraryCapacity12Ptr               = &arbitraryCapacity12
	ArbitraryCapacity13Ptr               = &arbitraryCapacity13
	ArbitraryCapacity14Ptr               = &arbitraryCapacity14
	ArbitraryCapacity15Ptr               = &arbitraryCapacity15
	ArbitraryCapacity30Ptr               = &arbitraryCapacity30
	ArbitraryCapacity50Ptr               = &arbitraryCapacity50
	ArbitraryCapacity100Ptr              = &arbitraryCapacity100
	ArbitraryCapacity150Ptr              = &arbitraryCapacity150
	ArbitraryCapacity200Ptr              = &arbitraryCapacity200
	ArbitraryCapacity250Ptr              = &arbitraryCapacity250
	ArbitraryCapacity500Ptr              = &arbitraryCapacity500
	ArbitraryCapacity1000Ptr             = &arbitraryCapacity1000
	ArbitraryCapacity1500Ptr             = &arbitraryCapacity1500
	ArbitraryCapacity2000Ptr             = &arbitraryCapacity2000
	ArbitraryCapacity2500Ptr             = &arbitraryCapacity2500
	ArbitraryCapacity3000Ptr             = &arbitraryCapacity3000
	ArbitraryCapacity5000Ptr             = &arbitraryCapacity5000
	ArbitraryCapacity10000Ptr            = &arbitraryCapacity10000
	LineFeedUnixPtr                      = &lineFeedUnix
	CarriageReturnPtr                    = &carriageReturn
	FormFeedPtr                          = &formFeed
	SpaceBytePtr                         = &spaceByte
	TabBytePtr                           = &tabByte
	LineFeedUnixBytePtr                  = &lineFeedUnixByte
	CarriageReturnBytePtr                = &carriageReturnByte
	FormFeedBytePtr                      = &formFeedByte
	TabVBytePtr                          = &tabVByte
	MaxUnit8Ptr                          = &maxUnit8
	OtherPathSeparatorPtr                = &otherPathSeparator
	WindowsPathSeparatorPtr              = &windowsPathSeparator
	WindowsOSPtr                         = &windowsOS
	LowerCaseFileColonPtr                = &lowerCaseFileColon
	DoubleBackSlashPtr                   = &doubleBackSlash
	TripleBackSlashPtr                   = &tripleBackSlash
	BackSlashPtr                         = &backSlash
	DoubleForwardSlashPtr                = &doubleForwardSlash
	TripleForwardSlashPtr                = &tripleForwardSlash
	BackwardAndForwardSlashesPtr         = &backwardAndForwardSlashes
	ForwardSlashPtr                      = &forwardSlash
	UriSchemePrefixStandardPtr           = &uriSchemePrefixStandard
	UriSchemePrefixTwoSlashesPtr         = &uriSchemePrefixTwoSlashes
	UnderscorePtr                        = &underscore
	ColonPtr                             = &colon
	DashPtr                              = &dash
	DoubleDashPtr                        = &doubleDash
	DoubleUnderscorePtr                  = &doubleUnderscore
	GoPathPtr                            = &goPath
	GoBinPathPtr                         = &goBinPath
	Go111ModuleEnvironmentPtr            = &go111ModuleEnvironment
	OnPtr                                = &on
	PathSeparatorPtr                     = &pathSeparator
	DoublePathSeparatorPtr               = &doublePathSeparator
	DollarPtr                            = &dollar
	DoubleDollarPtr                      = &doubleDollar
	PercentPtr                           = &percent
	DoublePercentPtr                     = &doublePercent
	OnePtr                               = &one
	SemiColonPtr                         = &semiColon
	PathPtr                              = &path
	UnixPtr                              = &unix
	WindowsPtr                           = &windows
	SymbolicLinkCreationCommandNamePtr   = &symbolicLinkCreationCommandName
	SymbolicLinkCreationArgumentPtr      = &symbolicLinkCreationArgument
	Architecture64Ptr                    = &architecture64
	Architecture32Ptr                    = &architecture32
	LongPathUncPrefixPtr                 = &longPathUncPrefix
	LongPathQuestionMarkPrefixPtr        = &longPathQuestionMarkPrefix
	SingleHashPtr                        = &singleHash
	EmptyStringPtr                       = &emptyString
	EndOfBlockPtr                        = &endOfBlock
	EndOfLineMarkPtr                     = &endOfLineMark
	StartOfBlockPtr                      = &startOfBlock
	MinusOnePtr                          = &minusOne
	InvalidValuePtr                      = &invalidValue
	WildCardSymbolPtr                    = &wildCardSymbol
	ParenthesisStartPtr                  = &parenthesisStart
	ParenthesisEndPtr                    = &parenthesisEnd
	CurlyStartPtr                        = &curlyStart
	CurlyEndPtr                          = &curlyEnd
	SquareStartPtr                       = &squareStart
	SquareEndPtr                         = &squareEnd
	ZeroCharPtr                          = &zeroChar
	NineCharPtr                          = &nineChar
	HyphenCharPtr                        = &hyphenChar
	MaxUnit8RunePtr                      = &maxUnit8Rune
	MaxUnit8AsInt16Ptr                   = &maxUnit8AsInt16
	ParenthesisStartRunePtr              = &parenthesisStartRune
	ParenthesisEndRunePtr                = &parenthesisEndRune
	CurlyStartRunePtr                    = &curlyStartRune
	CurlyEndRunePtr                      = &curlyEndRune
	SquareStartRunePtr                   = &squareStartRune
	SquareEndRunePtr                     = &squareEndRune
	ZeroRunePtr                          = &zeroRune
	NineRunePtr                          = &nineRune
	HyphenRunePtr                        = &hyphenRune
	UpperCaseARunePtr                    = &upperCaseARune
	UpperCaseZRunePtr                    = &upperCaseZRune
	LowerCaseARunePtr                    = &lowerCaseARune
	LowerCaseZRunePtr                    = &lowerCaseZRune
	LowerCaseRunePtr                     = &lowerCaseRune
	UpperCaseRunePtr                     = &upperCaseRune
	NoElementsPtr                        = &noElements
	NoItemsPtr                           = &noItems
	NoItemsSquarePtr                     = &noItemsSquare
	NoElementsSquarePtr                  = &noElementsSquare
	DoubleNewLinePtr                     = &doubleNewLine
	FalseBoolPtr                         = &falseBool
	TrueBoolPtr                          = &trueBool
	ZeroBytePtr                          = &zeroByte
)

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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