chore(format): change by gofumpt tool (#697)

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
Bo-Yi Wu
2021-05-18 14:43:09 +08:00
committed by GitHub
parent 73417f54db
commit 73906f996d
21 changed files with 47 additions and 47 deletions

View File

@@ -136,7 +136,7 @@ func TestGenCacheKeys(t *testing.T) {
})
}
func cacheKeyEqual(k1 Key, k2 Key) bool {
func cacheKeyEqual(k1, k2 Key) bool {
k1Join := k1.FieldNameJoin
k2Join := k2.FieldNameJoin
sort.Strings(k1Join)

View File

@@ -28,7 +28,7 @@ type (
StudentModel interface {
Insert(data Student) (sql.Result, error)
FindOne(id int64) (*Student, error)
FindOneByClassName(class string, name string) (*Student, error)
FindOneByClassName(class, name string) (*Student, error)
Update(data Student) error
// only for test
Delete(id int64, className, studentName string) error
@@ -85,7 +85,7 @@ func (m *defaultStudentModel) FindOne(id int64) (*Student, error) {
}
}
func (m *defaultStudentModel) FindOneByClassName(class string, name string) (*Student, error) {
func (m *defaultStudentModel) FindOneByClassName(class, name string) (*Student, error) {
studentClassNameKey := fmt.Sprintf("%s%v%v", cacheStudentClassNamePrefix, class, name)
var resp Student
err := m.QueryRowIndex(&resp, studentClassNameKey, m.formatPrimary, func(conn sqlx.SqlConn, v interface{}) (i interface{}, e error) {