Skip to content

Commit

Permalink
named returnをやめる
Browse files Browse the repository at this point in the history
  • Loading branch information
pirosiki197 committed Apr 2, 2024
1 parent 07499d1 commit a2082c2
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions pkg/infrastructure/repository/environment.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,13 @@ func (r *environmentRepository) GetEnv(ctx context.Context, cond domain.GetEnvCo
return ds.Map(environments, repoconvert.ToDomainEnvironment), nil
}

func (r *environmentRepository) SetEnv(ctx context.Context, env *domain.Environment) (err error) {
func (r *environmentRepository) SetEnv(ctx context.Context, env *domain.Environment) error {
// NOTE: sqlboiler does not recognize multiple column unique keys: https://github.com/volatiletech/sqlboiler/issues/328
tx, err := r.db.BeginTx(ctx, nil)
if err != nil {
return errors.Wrap(err, "failed to start transaction")
}
defer func() {
if err != nil {
tx.Rollback()
}
}()
defer tx.Rollback()

_, err = models.Applications(
qm.Select(models.ApplicationColumns.ID),
Expand Down

0 comments on commit a2082c2

Please sign in to comment.