MCPcopy Create free account
hub / github.com/ajitpratap0/GoSQLX / NewValidator

Function NewValidator

cmd/gosqlx/cmd/validator.go:115–121  ·  view source on GitHub ↗

NewValidator creates a new Validator with the given options. Constructs a Validator instance with specified I/O writers and options. This is the primary way to create a Validator for both CLI and programmatic use. Parameters: - out: Output writer for success messages and results - err: Error write

(out, err io.Writer, opts ValidatorOptions)

Source from the content-addressed store, hash-verified

113//
114// NewValidator creates a new Validator with the given options
115func NewValidator(out, err io.Writer, opts ValidatorOptions) *Validator {
116 return &Validator{
117 Out: out,
118 Err: err,
119 Opts: opts,
120 }
121}
122
123// Validate validates the given SQL files or patterns.
124//

Callers 10

validateRunFunction · 0.70
validateFromStdinFunction · 0.70
validateFileMethod · 0.70
TestValidator_ValidateFunction · 0.70
TestValidator_EmptyArgsFunction · 0.70

Calls

no outgoing calls

Tested by 7

TestValidator_ValidateFunction · 0.56
TestValidator_EmptyArgsFunction · 0.56