Skip to content

cli.go:57 lacks error checking #157

Description

@john8329

There's a missing error check in the mentioned file, so a file reading error is ignored. It should be trivial to fix.

// GenAST creates an *ast.File containing type declarations and
// associated methods based on a set of XML schema.
func (cfg *Config) GenAST(files ...string) (*ast.File, error) {
	data, err := cfg.readFiles(files...)
// HERE
	code, err := cfg.GenCode(data...)
	if err != nil {
		return nil, err
	}
	return code.GenAST()
}

Thanks

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions