diff --git a/lang/funcs/core/datetime/datetime.go b/lang/funcs/core/datetime/datetime.go index d0fe0e6f..de516b5e 100644 --- a/lang/funcs/core/datetime/datetime.go +++ b/lang/funcs/core/datetime/datetime.go @@ -18,6 +18,6 @@ package coredatetime const ( - // moduleName is the prefix given to all the functions in this module. - moduleName = "datetime" + // ModuleName is the prefix given to all the functions in this module. + ModuleName = "datetime" ) diff --git a/lang/funcs/core/datetime/now_fact.go b/lang/funcs/core/datetime/now_fact.go index 91ad4c6a..604b5118 100644 --- a/lang/funcs/core/datetime/now_fact.go +++ b/lang/funcs/core/datetime/now_fact.go @@ -25,7 +25,7 @@ import ( ) func init() { - facts.ModuleRegister(moduleName, "now", func() facts.Fact { return &DateTimeFact{} }) // must register the fact and name + facts.ModuleRegister(ModuleName, "now", func() facts.Fact { return &DateTimeFact{} }) // must register the fact and name } // DateTimeFact is a fact which returns the current date and time. diff --git a/lang/funcs/core/datetime/print_func.go b/lang/funcs/core/datetime/print_func.go index b92a3188..25424b21 100644 --- a/lang/funcs/core/datetime/print_func.go +++ b/lang/funcs/core/datetime/print_func.go @@ -27,7 +27,7 @@ import ( func init() { // FIXME: consider renaming this to printf, and add in a format string? - simple.ModuleRegister(moduleName, "print", &types.FuncValue{ + simple.ModuleRegister(ModuleName, "print", &types.FuncValue{ T: types.NewType("func(a int) str"), V: func(input []types.Value) (types.Value, error) { epochDelta := input[0].Int() diff --git a/lang/funcs/core/datetime/weekday_func.go b/lang/funcs/core/datetime/weekday_func.go index 5f9872b1..d7cdbb31 100644 --- a/lang/funcs/core/datetime/weekday_func.go +++ b/lang/funcs/core/datetime/weekday_func.go @@ -27,7 +27,7 @@ import ( ) func init() { - simple.ModuleRegister(moduleName, "weekday", &types.FuncValue{ + simple.ModuleRegister(ModuleName, "weekday", &types.FuncValue{ T: types.NewType("func(a int) str"), V: Weekday, }) diff --git a/lang/funcs/core/example/answer_func.go b/lang/funcs/core/example/answer_func.go index ff870ab0..0bb0d348 100644 --- a/lang/funcs/core/example/answer_func.go +++ b/lang/funcs/core/example/answer_func.go @@ -26,7 +26,7 @@ import ( const Answer = 42 func init() { - simple.ModuleRegister(moduleName, "answer", &types.FuncValue{ + simple.ModuleRegister(ModuleName, "answer", &types.FuncValue{ T: types.NewType("func() int"), V: func([]types.Value) (types.Value, error) { return &types.IntValue{V: Answer}, nil diff --git a/lang/funcs/core/example/errorbool_func.go b/lang/funcs/core/example/errorbool_func.go index 949d6bfc..a8085ba5 100644 --- a/lang/funcs/core/example/errorbool_func.go +++ b/lang/funcs/core/example/errorbool_func.go @@ -25,7 +25,7 @@ import ( ) func init() { - simple.ModuleRegister(moduleName, "errorbool", &types.FuncValue{ + simple.ModuleRegister(ModuleName, "errorbool", &types.FuncValue{ T: types.NewType("func(a bool) str"), V: func(input []types.Value) (types.Value, error) { if input[0].Bool() { diff --git a/lang/funcs/core/example/example.go b/lang/funcs/core/example/example.go index f04e4ec0..36ded882 100644 --- a/lang/funcs/core/example/example.go +++ b/lang/funcs/core/example/example.go @@ -18,6 +18,6 @@ package coreexample const ( - // moduleName is the prefix given to all the functions in this module. - moduleName = "example" + // ModuleName is the prefix given to all the functions in this module. + ModuleName = "example" ) diff --git a/lang/funcs/core/example/flipflop_fact.go b/lang/funcs/core/example/flipflop_fact.go index 4e7d5849..9be64a27 100644 --- a/lang/funcs/core/example/flipflop_fact.go +++ b/lang/funcs/core/example/flipflop_fact.go @@ -25,7 +25,7 @@ import ( ) func init() { - facts.ModuleRegister(moduleName, "flipflop", func() facts.Fact { return &FlipFlopFact{} }) // must register the fact and name + facts.ModuleRegister(ModuleName, "flipflop", func() facts.Fact { return &FlipFlopFact{} }) // must register the fact and name } // FlipFlopFact is a fact which flips a bool repeatedly. This is an example fact diff --git a/lang/funcs/core/example/int2str_func.go b/lang/funcs/core/example/int2str_func.go index ebbcc3e1..93bffa40 100644 --- a/lang/funcs/core/example/int2str_func.go +++ b/lang/funcs/core/example/int2str_func.go @@ -25,7 +25,7 @@ import ( ) func init() { - simple.ModuleRegister(moduleName, "int2str", &types.FuncValue{ + simple.ModuleRegister(ModuleName, "int2str", &types.FuncValue{ T: types.NewType("func(a int) str"), V: func(input []types.Value) (types.Value, error) { return &types.StrValue{ diff --git a/lang/funcs/core/example/str2int_func.go b/lang/funcs/core/example/str2int_func.go index b66dc6c0..f054b8e2 100644 --- a/lang/funcs/core/example/str2int_func.go +++ b/lang/funcs/core/example/str2int_func.go @@ -25,7 +25,7 @@ import ( ) func init() { - simple.ModuleRegister(moduleName, "str2int", &types.FuncValue{ + simple.ModuleRegister(ModuleName, "str2int", &types.FuncValue{ T: types.NewType("func(a str) int"), V: func(input []types.Value) (types.Value, error) { var i int64 diff --git a/lang/funcs/core/example/vumeter_func.go b/lang/funcs/core/example/vumeter_func.go index 831a38b2..25630645 100644 --- a/lang/funcs/core/example/vumeter_func.go +++ b/lang/funcs/core/example/vumeter_func.go @@ -33,7 +33,7 @@ import ( ) func init() { - funcs.ModuleRegister(moduleName, "vumeter", func() interfaces.Func { return &VUMeterFunc{} }) // must register the func and name + funcs.ModuleRegister(ModuleName, "vumeter", func() interfaces.Func { return &VUMeterFunc{} }) // must register the func and name } // VUMeterFunc is a gimmic function to display a vu meter from the microphone. diff --git a/lang/funcs/core/fmt/fmt.go b/lang/funcs/core/fmt/fmt.go index 0d7e5341..f259793b 100644 --- a/lang/funcs/core/fmt/fmt.go +++ b/lang/funcs/core/fmt/fmt.go @@ -18,6 +18,6 @@ package corefmt const ( - // moduleName is the prefix given to all the functions in this module. - moduleName = "fmt" + // ModuleName is the prefix given to all the functions in this module. + ModuleName = "fmt" ) diff --git a/lang/funcs/core/fmt/printf_func.go b/lang/funcs/core/fmt/printf_func.go index 96f348c0..9635d1ea 100644 --- a/lang/funcs/core/fmt/printf_func.go +++ b/lang/funcs/core/fmt/printf_func.go @@ -29,7 +29,7 @@ import ( func init() { // FIXME: should this be named sprintf instead? - funcs.ModuleRegister(moduleName, "printf", func() interfaces.Func { return &PrintfFunc{} }) + funcs.ModuleRegister(ModuleName, "printf", func() interfaces.Func { return &PrintfFunc{} }) } const ( diff --git a/lang/funcs/core/math/math.go b/lang/funcs/core/math/math.go index 414fb274..b871a3f4 100644 --- a/lang/funcs/core/math/math.go +++ b/lang/funcs/core/math/math.go @@ -18,6 +18,6 @@ package coremath const ( - // moduleName is the prefix given to all the functions in this module. - moduleName = "math" + // ModuleName is the prefix given to all the functions in this module. + ModuleName = "math" ) diff --git a/lang/funcs/core/math/mod_func.go b/lang/funcs/core/math/mod_func.go index 90b6a453..bc7f6a52 100644 --- a/lang/funcs/core/math/mod_func.go +++ b/lang/funcs/core/math/mod_func.go @@ -26,7 +26,7 @@ import ( ) func init() { - simplepoly.ModuleRegister(moduleName, "mod", []*types.FuncValue{ + simplepoly.ModuleRegister(ModuleName, "mod", []*types.FuncValue{ { T: types.NewType("func(int, int) int"), V: Mod, diff --git a/lang/funcs/core/math/pow_func.go b/lang/funcs/core/math/pow_func.go index 295a4542..382f1015 100644 --- a/lang/funcs/core/math/pow_func.go +++ b/lang/funcs/core/math/pow_func.go @@ -26,7 +26,7 @@ import ( ) func init() { - simple.ModuleRegister(moduleName, "pow", &types.FuncValue{ + simple.ModuleRegister(ModuleName, "pow", &types.FuncValue{ T: types.NewType("func(x float, y float) float"), V: Pow, }) diff --git a/lang/funcs/core/math/sqrt_func.go b/lang/funcs/core/math/sqrt_func.go index dcd3d20b..a306dd50 100644 --- a/lang/funcs/core/math/sqrt_func.go +++ b/lang/funcs/core/math/sqrt_func.go @@ -26,7 +26,7 @@ import ( ) func init() { - simple.ModuleRegister(moduleName, "sqrt", &types.FuncValue{ + simple.ModuleRegister(ModuleName, "sqrt", &types.FuncValue{ T: types.NewType("func(x float) float"), V: Sqrt, }) diff --git a/lang/funcs/core/os/family_func.go b/lang/funcs/core/os/family_func.go index 0db4d05e..d3b9caec 100644 --- a/lang/funcs/core/os/family_func.go +++ b/lang/funcs/core/os/family_func.go @@ -26,15 +26,15 @@ import ( func init() { // TODO: Create a family method that will return a giant struct. - simple.ModuleRegister(moduleName, "is_debian", &types.FuncValue{ + simple.ModuleRegister(ModuleName, "is_debian", &types.FuncValue{ T: types.NewType("func() bool"), V: IsDebian, }) - simple.ModuleRegister(moduleName, "is_redhat", &types.FuncValue{ + simple.ModuleRegister(ModuleName, "is_redhat", &types.FuncValue{ T: types.NewType("func() bool"), V: IsRedHat, }) - simple.ModuleRegister(moduleName, "is_archlinux", &types.FuncValue{ + simple.ModuleRegister(ModuleName, "is_archlinux", &types.FuncValue{ T: types.NewType("func() bool"), V: IsArchLinux, }) diff --git a/lang/funcs/core/os/os.go b/lang/funcs/core/os/os.go index 137d4dd0..8c93be3f 100644 --- a/lang/funcs/core/os/os.go +++ b/lang/funcs/core/os/os.go @@ -18,6 +18,6 @@ package coreos const ( - // moduleName is the prefix given to all the functions in this module. - moduleName = "os" + // ModuleName is the prefix given to all the functions in this module. + ModuleName = "os" ) diff --git a/lang/funcs/core/os/readfile_func.go b/lang/funcs/core/os/readfile_func.go index 3dd3b868..c89ea926 100644 --- a/lang/funcs/core/os/readfile_func.go +++ b/lang/funcs/core/os/readfile_func.go @@ -30,7 +30,7 @@ import ( ) func init() { - funcs.ModuleRegister(moduleName, "readfile", func() interfaces.Func { return &ReadFileFunc{} }) // must register the func and name + funcs.ModuleRegister(ModuleName, "readfile", func() interfaces.Func { return &ReadFileFunc{} }) // must register the func and name } // ReadFileFunc is a function that reads the full contents from a local file. If diff --git a/lang/funcs/core/regexp/match_func.go b/lang/funcs/core/regexp/match_func.go index 5f7a387f..68f58bea 100644 --- a/lang/funcs/core/regexp/match_func.go +++ b/lang/funcs/core/regexp/match_func.go @@ -26,7 +26,7 @@ import ( ) func init() { - simple.ModuleRegister(moduleName, "match", &types.FuncValue{ + simple.ModuleRegister(ModuleName, "match", &types.FuncValue{ T: types.NewType("func(pattern str, s str) bool"), V: Match, }) diff --git a/lang/funcs/core/regexp/regexp.go b/lang/funcs/core/regexp/regexp.go index c0b842d8..dac5a870 100644 --- a/lang/funcs/core/regexp/regexp.go +++ b/lang/funcs/core/regexp/regexp.go @@ -18,6 +18,6 @@ package coreregexp const ( - // moduleName is the prefix given to all the functions in this module. - moduleName = "regexp" + // ModuleName is the prefix given to all the functions in this module. + ModuleName = "regexp" ) diff --git a/lang/funcs/core/strings/split_func.go b/lang/funcs/core/strings/split_func.go index 2bc58e31..58c7f74b 100644 --- a/lang/funcs/core/strings/split_func.go +++ b/lang/funcs/core/strings/split_func.go @@ -25,7 +25,7 @@ import ( ) func init() { - simple.ModuleRegister(moduleName, "split", &types.FuncValue{ + simple.ModuleRegister(ModuleName, "split", &types.FuncValue{ T: types.NewType("func(a str, b str) []str"), V: Split, }) diff --git a/lang/funcs/core/strings/strings.go b/lang/funcs/core/strings/strings.go index a0e9156b..542d5bb9 100644 --- a/lang/funcs/core/strings/strings.go +++ b/lang/funcs/core/strings/strings.go @@ -18,6 +18,6 @@ package corestrings const ( - // moduleName is the prefix given to all the functions in this module. - moduleName = "strings" + // ModuleName is the prefix given to all the functions in this module. + ModuleName = "strings" ) diff --git a/lang/funcs/core/strings/to_lower_func.go b/lang/funcs/core/strings/to_lower_func.go index 9d584181..621c7723 100644 --- a/lang/funcs/core/strings/to_lower_func.go +++ b/lang/funcs/core/strings/to_lower_func.go @@ -25,7 +25,7 @@ import ( ) func init() { - simple.ModuleRegister(moduleName, "to_lower", &types.FuncValue{ + simple.ModuleRegister(ModuleName, "to_lower", &types.FuncValue{ T: types.NewType("func(a str) str"), V: ToLower, }) diff --git a/lang/funcs/core/sys/cpucount_fact.go b/lang/funcs/core/sys/cpucount_fact.go index 44d14974..eb05f837 100644 --- a/lang/funcs/core/sys/cpucount_fact.go +++ b/lang/funcs/core/sys/cpucount_fact.go @@ -41,7 +41,7 @@ const ( ) func init() { - facts.ModuleRegister(moduleName, "cpu_count", func() facts.Fact { return &CPUCountFact{} }) // must register the fact and name + facts.ModuleRegister(ModuleName, "cpu_count", func() facts.Fact { return &CPUCountFact{} }) // must register the fact and name } // CPUCountFact is a fact that returns the current CPU count. diff --git a/lang/funcs/core/sys/env_func.go b/lang/funcs/core/sys/env_func.go index 45437b73..7599adc2 100644 --- a/lang/funcs/core/sys/env_func.go +++ b/lang/funcs/core/sys/env_func.go @@ -26,19 +26,19 @@ import ( ) func init() { - simple.ModuleRegister(moduleName, "getenv", &types.FuncValue{ + simple.ModuleRegister(ModuleName, "getenv", &types.FuncValue{ T: types.NewType("func(str) str"), V: GetEnv, }) - simple.ModuleRegister(moduleName, "defaultenv", &types.FuncValue{ + simple.ModuleRegister(ModuleName, "defaultenv", &types.FuncValue{ T: types.NewType("func(str, str) str"), V: DefaultEnv, }) - simple.ModuleRegister(moduleName, "hasenv", &types.FuncValue{ + simple.ModuleRegister(ModuleName, "hasenv", &types.FuncValue{ T: types.NewType("func(str) bool"), V: HasEnv, }) - simple.ModuleRegister(moduleName, "env", &types.FuncValue{ + simple.ModuleRegister(ModuleName, "env", &types.FuncValue{ T: types.NewType("func() map{str: str}"), V: Env, }) diff --git a/lang/funcs/core/sys/hostname_fact.go b/lang/funcs/core/sys/hostname_fact.go index 7bdef101..2c5300e8 100644 --- a/lang/funcs/core/sys/hostname_fact.go +++ b/lang/funcs/core/sys/hostname_fact.go @@ -23,7 +23,7 @@ import ( ) func init() { - facts.ModuleRegister(moduleName, "hostname", func() facts.Fact { return &HostnameFact{} }) // must register the fact and name + facts.ModuleRegister(ModuleName, "hostname", func() facts.Fact { return &HostnameFact{} }) // must register the fact and name } // HostnameFact is a function that returns the hostname. diff --git a/lang/funcs/core/sys/load_fact.go b/lang/funcs/core/sys/load_fact.go index 68812033..0d6e4056 100644 --- a/lang/funcs/core/sys/load_fact.go +++ b/lang/funcs/core/sys/load_fact.go @@ -30,7 +30,7 @@ const ( ) func init() { - facts.ModuleRegister(moduleName, "load", func() facts.Fact { return &LoadFact{} }) // must register the fact and name + facts.ModuleRegister(ModuleName, "load", func() facts.Fact { return &LoadFact{} }) // must register the fact and name } // LoadFact is a fact which returns the current system load. diff --git a/lang/funcs/core/sys/sys.go b/lang/funcs/core/sys/sys.go index b62d370a..d7d48fa5 100644 --- a/lang/funcs/core/sys/sys.go +++ b/lang/funcs/core/sys/sys.go @@ -18,6 +18,6 @@ package coresys const ( - // moduleName is the prefix given to all the functions in this module. - moduleName = "sys" + // ModuleName is the prefix given to all the functions in this module. + ModuleName = "sys" ) diff --git a/lang/funcs/core/sys/uptime_fact.go b/lang/funcs/core/sys/uptime_fact.go index 375b215d..8c8c742d 100644 --- a/lang/funcs/core/sys/uptime_fact.go +++ b/lang/funcs/core/sys/uptime_fact.go @@ -26,7 +26,7 @@ import ( ) func init() { - facts.ModuleRegister(moduleName, "uptime", func() facts.Fact { return &UptimeFact{} }) + facts.ModuleRegister(ModuleName, "uptime", func() facts.Fact { return &UptimeFact{} }) } // UptimeFact is a fact which returns the current uptime of your system. diff --git a/lang/funcs/core/world/exchange_func.go b/lang/funcs/core/world/exchange_func.go index ce94c66d..2d16a98f 100644 --- a/lang/funcs/core/world/exchange_func.go +++ b/lang/funcs/core/world/exchange_func.go @@ -28,7 +28,7 @@ import ( ) func init() { - funcs.ModuleRegister(moduleName, "exchange", func() interfaces.Func { return &ExchangeFunc{} }) + funcs.ModuleRegister(ModuleName, "exchange", func() interfaces.Func { return &ExchangeFunc{} }) } // ExchangeFunc is special function which returns all the values of a given key diff --git a/lang/funcs/core/world/kvlookup_func.go b/lang/funcs/core/world/kvlookup_func.go index 03cc4771..59f7f396 100644 --- a/lang/funcs/core/world/kvlookup_func.go +++ b/lang/funcs/core/world/kvlookup_func.go @@ -28,7 +28,7 @@ import ( ) func init() { - funcs.ModuleRegister(moduleName, "kvlookup", func() interfaces.Func { return &KVLookupFunc{} }) + funcs.ModuleRegister(ModuleName, "kvlookup", func() interfaces.Func { return &KVLookupFunc{} }) } // KVLookupFunc is special function which returns all the values of a given key diff --git a/lang/funcs/core/world/schedule_func.go b/lang/funcs/core/world/schedule_func.go index a0338641..31768160 100644 --- a/lang/funcs/core/world/schedule_func.go +++ b/lang/funcs/core/world/schedule_func.go @@ -46,7 +46,7 @@ const ( ) func init() { - funcs.ModuleRegister(moduleName, "schedule", func() interfaces.Func { return &SchedulePolyFunc{} }) + funcs.ModuleRegister(ModuleName, "schedule", func() interfaces.Func { return &SchedulePolyFunc{} }) } // SchedulePolyFunc is special function which determines where code should run diff --git a/lang/funcs/core/world/world.go b/lang/funcs/core/world/world.go index 2fab3cbf..0b300ced 100644 --- a/lang/funcs/core/world/world.go +++ b/lang/funcs/core/world/world.go @@ -18,6 +18,6 @@ package coreworld const ( - // moduleName is the prefix given to all the functions in this module. - moduleName = "world" + // ModuleName is the prefix given to all the functions in this module. + ModuleName = "world" )