Skip to content

Commit

Permalink
feat: fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
qqxhb committed Jun 16, 2022
1 parent d8f1a70 commit 730d655
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions migrator.go
Expand Up @@ -50,6 +50,7 @@ type ColumnType interface {
Comment() (value string, ok bool)
DefaultValue() (value string, ok bool)
}

type Index interface {
Table() string
Name() string
Expand Down
7 changes: 3 additions & 4 deletions migrator/index.go
Expand Up @@ -12,12 +12,12 @@ type Index struct {
OptionValue string
}

// Table returns the table name of the index.
// Table return the table name of the index.
func (idx Index) Table() string {
return idx.TableName
}

// Name returns the name of the index.
// Name return the name of the index.
func (idx Index) Name() string {
return idx.NameValue
}
Expand All @@ -32,10 +32,9 @@ func (idx Index) PrimaryKey() (isPrimaryKey bool, ok bool) {
return idx.PrimaryKeyValue.Bool, idx.PrimaryKeyValue.Valid
}

// Unique reports whether the index is unique or not.
// Unique returns whether the index is unique or not.
func (idx Index) Unique() (unique bool, ok bool) {
return idx.UniqueValue.Bool, idx.UniqueValue.Valid

}

// Option return the optional attribute fo the index
Expand Down

0 comments on commit 730d655

Please sign in to comment.