Skip to content

Commit

Permalink
Merge pull request #1269 from dqn/new-line-at-the-end-of-file
Browse files Browse the repository at this point in the history
Add a new line to end of the file schema.graphqls
  • Loading branch information
vektah committed Nov 8, 2020
2 parents 22c5d1f + 1c9f24b commit 0e12bfb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cmd/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"io/ioutil"
"os"
"path/filepath"
"strings"

"github.com/99designs/gqlgen/api"
"github.com/99designs/gqlgen/codegen/config"
Expand Down Expand Up @@ -192,7 +191,7 @@ func initSchema(schemaFilename string) error {
return fmt.Errorf("unable to create schema dir: " + err.Error())
}

if err = ioutil.WriteFile(schemaFilename, []byte(strings.TrimSpace(schemaDefault)), 0644); err != nil {
if err = ioutil.WriteFile(schemaFilename, []byte(schemaDefault), 0644); err != nil {
return fmt.Errorf("unable to write schema file: " + err.Error())
}
return nil
Expand Down

0 comments on commit 0e12bfb

Please sign in to comment.