Skip to content

Commit 9355dd0

Browse files
authored
Merge pull request #152 from alexandear/fix-typos
Fix typos in variables
2 parents 5cdff0d + f4907a9 commit 9355dd0

3 files changed

Lines changed: 11 additions & 11 deletions

File tree

bindata_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ func test_migrations_2_record_sql() ([]byte, error) {
6868
// It returns an error if the asset could not be found or
6969
// could not be loaded.
7070
func Asset(name string) ([]byte, error) {
71-
cannonicalName := strings.Replace(name, "\\", "/", -1)
72-
if f, ok := _bindata[cannonicalName]; ok {
71+
canonicalName := strings.Replace(name, "\\", "/", -1)
72+
if f, ok := _bindata[canonicalName]; ok {
7373
return f()
7474
}
7575
return nil, fmt.Errorf("Asset %s not found", name)
@@ -105,8 +105,8 @@ var _bindata = map[string]func() ([]byte, error){
105105
func AssetDir(name string) ([]string, error) {
106106
node := _bintree
107107
if len(name) != 0 {
108-
cannonicalName := strings.Replace(name, "\\", "/", -1)
109-
pathList := strings.Split(cannonicalName, "/")
108+
canonicalName := strings.Replace(name, "\\", "/", -1)
109+
pathList := strings.Split(canonicalName, "/")
110110
for _, p := range pathList {
111111
node = node.Children[p]
112112
if node == nil {

migrate.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,20 @@ var numberPrefixRegex = regexp.MustCompile(`^(\d+).*$`)
3333
// of already applied migrations and the currently found. For example, when the database
3434
// contains a migration which is not among the migrations list found for an operation.
3535
type PlanError struct {
36-
Migration *Migration
37-
ErrorMessag string
36+
Migration *Migration
37+
ErrorMessage string
3838
}
3939

4040
func newPlanError(migration *Migration, errorMessage string) error {
4141
return &PlanError{
42-
Migration: migration,
43-
ErrorMessag: errorMessage,
42+
Migration: migration,
43+
ErrorMessage: errorMessage,
4444
}
4545
}
4646

4747
func (p *PlanError) Error() string {
4848
return fmt.Sprintf("Unable to create migration plan because of %s: %s",
49-
p.Migration.Id, p.ErrorMessag)
49+
p.Migration.Id, p.ErrorMessage)
5050
}
5151

5252
// TxError is returned when any error is encountered during a database

sqlparse/sqlparse_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ func (s *SqlParseSuite) TestSplitStatements(c *C) {
8282
}
8383

8484
func (s *SqlParseSuite) TestIntentionallyBadStatements(c *C) {
85-
for _, test := range intenionallyBad {
85+
for _, test := range intentionallyBad {
8686
_, err := ParseMigration(strings.NewReader(test))
8787
c.Assert(err, NotNil)
8888
}
@@ -187,7 +187,7 @@ DROP TABLE fancier_post;
187187
`
188188

189189
// raise error when statements are not explicitly ended
190-
var intenionallyBad = []string{
190+
var intentionallyBad = []string{
191191
// first statement missing terminator
192192
`-- +migrate Up
193193
CREATE TABLE post (

0 commit comments

Comments
 (0)