Skip to content
This repository has been archived by the owner on Aug 18, 2020. It is now read-only.

Commit

Permalink
Merge pull request #83 from dadleyy/misspell
Browse files Browse the repository at this point in the history
chore(reportcard) correcting misspellings + reducing complexity
  • Loading branch information
dadleyy authored Mar 17, 2018
2 parents 3e00ca0 + f6cdd38 commit bd1e922
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 23 deletions.
2 changes: 1 addition & 1 deletion examples/library/models/database_connections.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ type DatabaseConnections struct {
sqlite *sql.DB
}

// Initialize opens the various datbase connection types and seeds their database tables.
// Initialize opens the various database connection types and seeds their database tables.
func (db *DatabaseConnections) Initialize() error {
sqlite, e := sql.Open("sqlite3", db.Config.SQLite.Filename)

Expand Down
2 changes: 1 addition & 1 deletion examples/library/models/multi_auto.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package models

// MultiAuto represents a record w/ mutliple auto-increment directives on a postgres model.
// MultiAuto represents a record w/ multiple auto-increment directives on a postgres model.
type MultiAuto struct {
table bool `marlow:"tableName=multi_auto&dialect=postgres&primaryKey=id"`
ID uint `marlow:"column=id&autoIncrement=true"`
Expand Down
6 changes: 3 additions & 3 deletions examples/library/models/multi_auto_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ func Test_MultiAuto(t *testing.T) {
var db *sql.DB
var store MultiAutoStore

g.Describe("Model with mutliple auto increment columns", func() {
g.Describe("Model with multiple auto increment columns", func() {
g.Before(func() {
var e error
config := struct {
Expand Down Expand Up @@ -73,7 +73,7 @@ func Test_MultiAuto(t *testing.T) {
})
})

g.It("allows consumer to delete mutli auto records", func() {
g.It("allows consumer to delete multi auto records", func() {
id, e := store.CreateMultiAutos(MultiAuto{Name: "to-delete"})
g.Assert(e).Equal(nil)
_, e = store.DeleteMultiAutos(&MultiAutoBlueprint{ID: []uint{uint(id)}})
Expand Down Expand Up @@ -125,7 +125,7 @@ func Test_MultiAuto(t *testing.T) {
g.Assert(e).Equal(nil)
})

g.It("allows the consumer to count mutli autos", func() {
g.It("allows the consumer to count multi autos", func() {
a, e := store.CountMultiAutos(&MultiAutoBlueprint{Limit: 1})
g.Assert(e).Equal(nil)
g.Assert(a > 0).Equal(true)
Expand Down
26 changes: 8 additions & 18 deletions marlowc/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ import "github.com/dadleyy/marlow/marlow"
import "github.com/dadleyy/marlow/marlow/constants"

func main() {
cwd, err := os.Getwd()
cwd, e := os.Getwd()

if err != nil {
exit("unable to get current directory", err)
if e != nil {
exit("unable to get current directory", e)
}

options := cliOptions{ext: constants.DefaultMarlowFileExtension}
Expand All @@ -31,15 +31,10 @@ func main() {
flag.Usage = usage
flag.Parse()

// Check to ensure the input exists on the filesystem.
if _, e := os.Stat(options.input); e != nil {
exit("must provide a valid input for compilation", nil)
}

sourceFiles, err := loadFileNames(options.input)
sourceFiles, e := loadFileNames(options.input)

if err != nil {
exit("unable to load package from input", err)
if e != nil {
exit("unable to load package from input", e)
}

var progressOut io.Writer = new(bytes.Buffer)
Expand Down Expand Up @@ -120,13 +115,8 @@ func main() {
progress.Stop()
<-done

// If no files were the target of compilation,
if len(results) == 0 {
return
}

// If silent, finish here.
if options.silent == true {
// If no files were the target of compilation, or the silent flag was used, do nothing.
if len(results) == 0 || options.silent == true {
return
}

Expand Down

0 comments on commit bd1e922

Please sign in to comment.