/
erlango_types_cli.go
41 lines (33 loc) · 1.16 KB
/
erlango_types_cli.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/*
Copyright (c) 2023, Balazs Nyiro
All rights reserved.
This source code (all file in this repo) is licensed
under the Apache-2 style license found in the
LICENSE file in the root directory of this source tree.
Version 0.2, second rewrite
*/
package old2
// general storage for settings - strings, ints, bools are typical config elems
type SettingsTable struct {
SettingStr map[string][]string
SettingInt map[string][]int
SettingBool map[string]bool
}
/* very rarely modified, and often read program-wide data structure.
Stored infos:
- erlango command line call parameters (good to know everywhere)
in program start arguments, there can be strings, ints, bools
*/
type ProgramWideStateVariable struct {
ArgumentsErlangoCliStart SettingsTable
}
// const debbuggerVerboseMode = true
func new_program_state(verboseForErlangoInvestigations__useFalseInProdEnv bool) ProgramWideStateVariable {
return ProgramWideStateVariable {
SettingsTable{
SettingStr: map[string][]string{},
SettingInt: map[string][]int{},
SettingBool: map[string]bool{"verboseForErlangoInvestigations__useFalseInProdEnv": verboseForErlangoInvestigations__useFalseInProdEnv},
},
}
}