@@ -73,47 +73,47 @@ func initVals() {
7373 if _, exists = os.LookupEnv("EASYGEN_HTML"); Opts.HTML|| exists {
7474 Opts.HTML = true
7575 }
76- if len(Opts.TemplateStr) == 0 ||
76+ if len(Opts.TemplateStr) == 0 &&
7777 len(os.Getenv("EASYGEN_TS")) != 0 {
7878 Opts.TemplateStr = os.Getenv("EASYGEN_TS")
7979 }
80- if len(Opts.TemplateFile) == 0 ||
80+ if len(Opts.TemplateFile) == 0 &&
8181 len(os.Getenv("EASYGEN_F")) != 0 {
8282 Opts.TemplateFile = os.Getenv("EASYGEN_F")
8383 }
84- if len(Opts.TemplateFile) == 0 ||
84+ if len(Opts.TemplateFile) == 0 &&
8585 len(os.Getenv("EASYGEN_TF")) != 0 {
8686 Opts.TemplateFile = os.Getenv("EASYGEN_TF")
8787 }
88- if len(Opts.ExtYaml) == 0 ||
88+ if len(Opts.ExtYaml) == 0 &&
8989 len(os.Getenv("EASYGEN_EY")) != 0 {
9090 Opts.ExtYaml = os.Getenv("EASYGEN_EY")
9191 }
92- if len(Opts.ExtTmpl) == 0 ||
92+ if len(Opts.ExtTmpl) == 0 &&
9393 len(os.Getenv("EASYGEN_ET")) != 0 {
9494 Opts.ExtTmpl = os.Getenv("EASYGEN_ET")
9595 }
96- if len(Opts.StrFrom) == 0 ||
96+ if len(Opts.StrFrom) == 0 &&
9797 len(os.Getenv("EASYGEN_RF")) != 0 {
9898 Opts.StrFrom = os.Getenv("EASYGEN_RF")
9999 }
100- if len(Opts.StrTo) == 0 ||
100+ if len(Opts.StrTo) == 0 &&
101101 len(os.Getenv("EASYGEN_RT")) != 0 {
102102 Opts.StrTo = os.Getenv("EASYGEN_RT")
103103 }
104- if Opts.IntV == 0 ||
104+ if Opts.IntV == 0 &&
105105 len(os.Getenv("EASYGEN_INTV")) != 0 {
106106 if i, err := strconv.Atoi(os.Getenv("EASYGEN_INTV")); err == nil {
107107 Opts.IntV = i
108108 }
109109 }
110- if Opts.Debug == 0 ||
110+ if Opts.Debug == 0 &&
111111 len(os.Getenv("EASYGEN_D")) != 0 {
112112 if i, err := strconv.Atoi(os.Getenv("EASYGEN_D")); err == nil {
113113 Opts.Debug = i
114114 }
115115 }
116- if Opts.Debug == 0 ||
116+ if Opts.Debug == 0 &&
117117 len(os.Getenv("EASYGEN_DEBUG")) != 0 {
118118 if i, err := strconv.Atoi(os.Getenv("EASYGEN_DEBUG")); err == nil {
119119 Opts.Debug = i
0 commit comments