Skip to content
Snippets Groups Projects
Select Git revision
  • feature/v1.3.60
  • develop default protected
  • main protected
  • release/v1.0.7
  • release/v1.0.0
  • feature/v0.9.5
  • release/v0.6.2
  • hotfix/v0.5.7
  • release/v0.5.6
  • release/v0.5.5
  • hotfix/v0.5.4
  • hotfix/v0.5.3
  • hotfix/v0.5.2
  • release/v0.5.1
  • hotfix/v0.5.0
  • hotfix/v0.4.9
  • hotfix/v0.4.8
  • hotfix/v0.4.7
  • release/v0.4.6
  • hotfix/v0.4.5
  • v1.3.55
  • v1.3.52
  • v1.3.50
  • v1.3.45
  • v1.3.42
  • v1.3.41
  • v1.3.40
  • v1.3.38
  • v1.3.37
  • v1.3.36
  • v1.3.35
  • v1.3.34
  • v1.3.33
  • v1.3.32
  • v1.3.31
  • v1.3.30
  • v1.3.29
  • v1.3.28
  • v1.3.27
  • v1.3.26
40 results

vars.go

vars.go 1.86 KiB
package issetter

import (
	"gitlab.com/evatix-go/core/simplewrap"
)

var (
	values = []string{"Uninitialized", "True", "False", "Unset", "Set", "Wildcard"}

	jsonValuesMap = map[string]Value{
		simplewrap.WithDoubleQuote("0"):        Uninitialized,
		simplewrap.WithDoubleQuote(""):         Uninitialized,
		simplewrap.WithDoubleQuote("-"):        Uninitialized,
		simplewrap.WithDoubleQuote("-1"):       Uninitialized,
		simplewrap.WithDoubleQuote("1"):        True,
		simplewrap.WithDoubleQuote("yes"):      True,
		simplewrap.WithDoubleQuote("Yes"):      True,
		simplewrap.WithDoubleQuote("true"):     True,
		simplewrap.WithDoubleQuote("True"):     True,
		simplewrap.WithDoubleQuote("no"):       False,
		simplewrap.WithDoubleQuote("No"):       False,
		simplewrap.WithDoubleQuote("Nop"):      False,
		simplewrap.WithDoubleQuote("None"):     False,
		simplewrap.WithDoubleQuote("false"):    False,
		simplewrap.WithDoubleQuote("False"):    False,
		simplewrap.WithDoubleQuote("set"):      Set,
		simplewrap.WithDoubleQuote("Set"):      Set,
		simplewrap.WithDoubleQuote("Unset"):    Unset,
		simplewrap.WithDoubleQuote("unset"):    Unset,
		simplewrap.WithDoubleQuote("*"):        Wildcard,
		simplewrap.WithDoubleQuote("%"):        Wildcard,
		simplewrap.WithDoubleQuote("Wildcard"): Wildcard,
		simplewrap.WithDoubleQuote("WildCard"): Wildcard,
		simplewrap.WithDoubleQuote("wildcard"): Wildcard, // all small
	}

	valuesToJsonBytesMap = map[Value][]byte{
		Uninitialized: jsonBytes("Uninitialized"),
		True:          jsonBytes("True"),
		False:         jsonBytes("False"),
		Unset:         jsonBytes("Unset"),
		Set:           jsonBytes("Set"),
		Wildcard:      jsonBytes("Wildcard"),
	}

	valuesToNameMap = map[Value]string{
		Uninitialized: "Uninitialized",
		True:          "True",
		False:         "False",
		Unset:         "Unset",
		Set:           "Set",
		Wildcard:      "Wildcard",
	}
)