Skip to content

Commit

Permalink
remove triming space for schemaDefault
Browse files Browse the repository at this point in the history
  • Loading branch information
dqn committed Aug 6, 2020
1 parent 39a12e0 commit 1c9f24b
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 1c9f24b

Please sign in to comment.