Skip to content
This repository has been archived by the owner on Mar 21, 2023. It is now read-only.

Commit

Permalink
fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Raymond Ho committed Mar 5, 2021
1 parent 5319534 commit 1b74958
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,6 @@ func (p *parser) parse() error {
return nil
}


func (p *parser) CreateOASFile(path string) error {
if err := p.parse(); err != nil {
return err
Expand Down Expand Up @@ -1064,7 +1063,7 @@ func (p *parser) parseSchemaObject(pkgPath, pkgName, typeName string) (*SchemaOb
if err != nil {
return nil, err
}
schemaObject.AdditionalProperties = schemaProperty
schemaObject.AdditionalProperties = schemaProperty
return &schemaObject, nil
} else if typeName == "time.Time" {
schemaObject.Type = "string"
Expand Down Expand Up @@ -1137,7 +1136,7 @@ func (p *parser) parseSchemaObject(pkgPath, pkgName, typeName string) (*SchemaOb
return &schemaObject, nil
}

log.Fatalf("Cannot find definition of guess %s ast.TypeSpec in package %s. " +
log.Fatalf("Cannot find definition of guess %s ast.TypeSpec in package %s. "+
"If definition is in a vendor dependency, try running `go mod tidy && go mod vendor`",
guessTypeName, guessPkgName)
}
Expand Down Expand Up @@ -1502,7 +1501,7 @@ func (p *parser) debugf(format string, args ...interface{}) {
}
}

func sortedPackageKeys(m map[string]*ast.Package) ([]string) {
func sortedPackageKeys(m map[string]*ast.Package) []string {
keys := make([]string, len(m))
i := 0
for k, _ := range m {
Expand All @@ -1513,7 +1512,7 @@ func sortedPackageKeys(m map[string]*ast.Package) ([]string) {
return keys
}

func sortedFileKeys(m map[string]*ast.File) ([]string) {
func sortedFileKeys(m map[string]*ast.File) []string {
keys := make([]string, len(m))
i := 0
for k, _ := range m {
Expand Down

0 comments on commit 1b74958

Please sign in to comment.