File tree Expand file tree Collapse file tree 10 files changed +34
-34
lines changed Expand file tree Collapse file tree 10 files changed +34
-34
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ func exec() error {
3131
3232 err := godotenv .Load ()
3333 if err != nil {
34- fmt .Println ("No .env file found, continuing with system environment variables" )
34+ fmt .Println ("No .env file found, continuing with system environment variables\n " )
3535 }
3636
3737 /* setting up cobra for cli interactions */
Original file line number Diff line number Diff line change 22
33# backend environment configs
44app :
5- name : laclm-dev
5+ # name: laclm-dev
66 version : v1.1
77 debug_mode : true
88
Original file line number Diff line number Diff line change @@ -2,9 +2,9 @@ package config
22
33/* app parameters */
44type App struct {
5- Name string `yaml:"name"`
6- Version string `yaml:"version"`
7- DebugMode bool `yaml:"debug_mode"`
5+ Name string `yaml:"name,omitempty "`
6+ Version string `yaml:"version,omitempty "`
7+ DebugMode bool `yaml:"debug_mode,omitempty "`
88}
99
1010/* normalization function */
Original file line number Diff line number Diff line change @@ -8,15 +8,15 @@ import (
88
99/* authentication parameters */
1010type Authentication struct {
11- LDAPConfig LDAPConfig `yaml:"ldap"`
11+ LDAPConfig LDAPConfig `yaml:"ldap,omitempty "`
1212}
1313
1414/* ldap authentication parameters */
1515type LDAPConfig struct {
16- TLS bool `yaml:"tls"`
17- Address string `yaml:"address"`
18- AdminDN string `yaml:"admin_dn"`
19- AdminPassword string `yaml:"admin_password"`
16+ TLS bool `yaml:"tls,omitempty "`
17+ Address string `yaml:"address,omitempty "`
18+ AdminDN string `yaml:"admin_dn,omitempty "`
19+ AdminPassword string `yaml:"admin_password,omitempty "`
2020}
2121
2222/* normalization function */
Original file line number Diff line number Diff line change 88
99/* backend security configs */
1010type BackendSecurity struct {
11- JWTTokenSecret string `yaml:"jwt_secret_token"`
12- JWTExpiry int `yaml:"jwt_expiry"`
11+ JWTTokenSecret string `yaml:"jwt_secret_token,omitempty "`
12+ JWTExpiry int `yaml:"jwt_expiry,omitempty "`
1313}
1414
1515/* normalization function */
Original file line number Diff line number Diff line change @@ -7,13 +7,13 @@ var BackendConfig Config
77
88/* complete yaml config for global usage */
99type Config struct {
10- AppInfo App `yaml:"app"`
11- Server Server `yaml:"server"`
12- Database Database `yaml:"database"`
13- Logging Logging `yaml:"logging"`
14- FileSystemServers []FileSystemServers `yaml:"filesystem_servers"`
15- BackendSecurity BackendSecurity `yaml:"backend_security"`
16- Authentication Authentication `yaml:"authentication"`
10+ AppInfo App `yaml:"app,omitempty "`
11+ Server Server `yaml:"server,omitempty "`
12+ Database Database `yaml:"database,omitempty "`
13+ Logging Logging `yaml:"logging,omitempty "`
14+ FileSystemServers []FileSystemServers `yaml:"filesystem_servers,omitempty "`
15+ BackendSecurity BackendSecurity `yaml:"backend_security,omitempty "`
16+ Authentication Authentication `yaml:"authentication,omitempty "`
1717}
1818
1919/* complete config normalizer function */
Original file line number Diff line number Diff line change @@ -9,14 +9,14 @@ import (
99
1010/* database parameters */
1111type Database struct {
12- TransactionLogRedis TransactionLogRedis `yaml:"transaction_log_redis"`
12+ TransactionLogRedis TransactionLogRedis `yaml:"transaction_log_redis,omitempty "`
1313}
1414
1515/* transaction log redis parameters */
1616type TransactionLogRedis struct {
17- Address string `yaml:"address"`
18- Password string `yaml:"password"`
19- DB int `yaml:"db"`
17+ Address string `yaml:"address,omitempty "`
18+ Password string `yaml:"password,omitempty "`
19+ DB int `yaml:"db,omitempty "`
2020}
2121
2222/* normalization function */
Original file line number Diff line number Diff line change @@ -8,15 +8,15 @@ import (
88
99/* file system server parameters */
1010type FileSystemServers struct {
11- Path string `yaml:"path"`
12- Method string `yaml:"method"`
11+ Path string `yaml:"path,omitempty "`
12+ Method string `yaml:"method,omitempty "`
1313 Remote * Remote `yaml:"remote,omitempty"`
1414}
1515
1616/* remote parameters for file system server with laclm daemons installed */
1717type Remote struct {
18- Host string `yaml:"host"`
19- Port int `yaml:"port"`
18+ Host string `yaml:"host,omitempty "`
19+ Port int `yaml:"port,omitempty "`
2020}
2121
2222/* normalization function */
Original file line number Diff line number Diff line change @@ -2,11 +2,11 @@ package config
22
33/* logging parameters */
44type Logging struct {
5- File string `yaml:"file"`
6- MaxSize int `yaml:"max_size"`
7- MaxBackups int `yaml:"max_backups"`
8- MaxAge int `yaml:"max_age"`
9- Compress bool `yaml:"compress"`
5+ File string `yaml:"file,omitempty "`
6+ MaxSize int `yaml:"max_size,omitempty "`
7+ MaxBackups int `yaml:"max_backups,omitempty "`
8+ MaxAge int `yaml:"max_age,omitempty "`
9+ Compress bool `yaml:"compress,omitempty "`
1010}
1111
1212/* normalization function */
Original file line number Diff line number Diff line change @@ -2,8 +2,8 @@ package config
22
33/* server deployment parameters */
44type Server struct {
5- Host string `yaml:"host"`
6- Port int `yaml:"port"`
5+ Host string `yaml:"host,omitempty "`
6+ Port int `yaml:"port,omitempty "`
77}
88
99/* normalization function */
You can’t perform that action at this time.
0 commit comments