code: func (f *FlattenCmdOptions) SetFlattenOptions(dflt *analysis.FlattenOpts) (res *analysis.FlattenOpts) {
  	res = &analysis.FlattenOpts{}
  	if dflt != nil {
  		*res = *dflt
  	}
  	if f == nil {
  		return
  	}
  	verboseIsSet := false
  	minimalIsSet := false
  	//removeUnusedIsSet := false
  	expandIsSet := false
  	if f.WithExpand {
  		res.Expand = true
  		expandIsSet = true
  	}
  	for _, opt := range f.WithFlatten {
  		if opt == "verbose" {
  			res.Verbose = true
  			verboseIsSet = true
  		}
  		if opt == "noverbose" && !verboseIsSet {
  			// verbose flag takes precedence
  			res.Verbose = false
  			verboseIsSet = true
  		}
  		if opt == "remove-unused" {
  			res.RemoveUnused = true
  			//removeUnusedIsSet = true
  		}
  		if opt == "expand" {
  			res.Expand = true
  			expandIsSet = true
  		}
  		if opt == "full" && !minimalIsSet && !expandIsSet {
  			// minimal flag takes precedence
  			res.Minimal = false
  			minimalIsSet = true
  		}
  		if opt == "minimal" && !expandIsSet {
  			// expand flag takes precedence
  			res.Minimal = true
  			minimalIsSet = true
  		}
  	}
  	return
  }
docs: // SetFlattenOptions builds flatten options from command line args