github.com/JarrahG/buffalocli@v0.0.0-20230801092127-b85bfd5d395a/internal/genny/fix/options.go (about) 1 package fix 2 3 import ( 4 "github.com/gobuffalo/meta" 5 ) 6 7 // Options for building a Buffalo application 8 type Options struct { 9 App meta.App `json:"app"` 10 // YesToAll will be used by the command to skip the confirmation 11 // and perform all implied destroy operations 12 YesToAll bool `json:"yes_to_all"` 13 14 warnings []string 15 } 16 17 // Validate that options are usuable 18 func (opts *Options) Validate() error { 19 if opts.App.IsZero() { 20 opts.App = meta.New(".") 21 } 22 23 if opts.warnings == nil { 24 opts.warnings = make([]string, 0) 25 } 26 27 return nil 28 }