From 730d65557fae3d46e0010767a4fae0f4aab57408 Mon Sep 17 00:00:00 2001 From: qqxhb <1252905006@qq.com> Date: Thu, 16 Jun 2022 20:42:17 +0800 Subject: [PATCH] feat: fmt --- migrator.go | 1 + migrator/index.go | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/migrator.go b/migrator.go index 39c4871b..34e888f2 100644 --- a/migrator.go +++ b/migrator.go @@ -50,6 +50,7 @@ type ColumnType interface { Comment() (value string, ok bool) DefaultValue() (value string, ok bool) } + type Index interface { Table() string Name() string diff --git a/migrator/index.go b/migrator/index.go index 6f55be93..fe686e5a 100644 --- a/migrator/index.go +++ b/migrator/index.go @@ -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 } @@ -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