From 54e993dfc997fdb08d2f6a486f7024a3f80160c7 Mon Sep 17 00:00:00 2001 From: Eraxyso <130852025+Eraxyso@users.noreply.github.com> Date: Fri, 30 Aug 2024 06:44:00 +0000 Subject: [PATCH] style: format code --- model/targets_impl.go | 6 +++--- model/targets_test.go | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/model/targets_impl.go b/model/targets_impl.go index ccad5b1e..41350884 100644 --- a/model/targets_impl.go +++ b/model/targets_impl.go @@ -13,7 +13,7 @@ func NewTarget() *Target { return new(Target) } -//Targets targetsテーブルの構造体 +// Targets targetsテーブルの構造体 type Targets struct { QuestionnaireID int `gorm:"type:int(11) AUTO_INCREMENT;not null;primaryKey"` UserTraqid string `gorm:"type:varchar(32);size:32;not null;primaryKey"` @@ -81,7 +81,7 @@ func (*Target) GetTargets(ctx context.Context, questionnaireIDs []int) ([]Target return targets, nil } -func(*Target) IsTargetingMe(ctx context.Context, questionnairID int, userID string) (bool, error) { +func (*Target) IsTargetingMe(ctx context.Context, questionnairID int, userID string) (bool, error) { db, err := getTx(ctx) if err != nil { return false, fmt.Errorf("failed to get transaction: %w", err) @@ -99,4 +99,4 @@ func(*Target) IsTargetingMe(ctx context.Context, questionnairID int, userID stri return true, nil } return false, nil -} \ No newline at end of file +} diff --git a/model/targets_test.go b/model/targets_test.go index fd73aae2..71404545 100644 --- a/model/targets_test.go +++ b/model/targets_test.go @@ -328,9 +328,9 @@ func TestIsTargetingMe(t *testing.T) { userID string } type expect struct { - isErr bool - err error - isTargeted bool + isErr bool + err error + isTargeted bool } type test struct { description string