Closed suntong closed 8 years ago
I'm sorry. I made a mistake when fix Reader
and Writer
, See commit 7bfc6df. And Self
should be the last field of strcutre:
type buildT struct {
Dir string `cli:"dir" usage:"source code root dir" dft:"./"`
Suffix string `cli:"suffix" usage:"source file suffix" dft:".go,.c,.s"`
Out string `cli:"o,out" usage:"output filename"`
Self *buildT `cli:"c,config" usage:"config file" json:"-" parser:"jsonfile" dft:"build.json"`
}
otherwise, the values(read from json file) will be covered by the dft
values
Bingo. Thanks,
Hiya,
Please take a look at 027s-subc.go
This is how I run it,
The
Self
in sub command is supposed to pick up values defined in thebuild.json
file, and I surely remember it did it before, but now it seems not doing it.