feat: run staticcheck during build and fix errors
All checks were successful
Build and Push Docker Image / Build-And-Push-Docker-Image (push) Successful in 46s
Build Docker Image / Build-Docker-Image (push) Successful in 41s

This commit was merged in pull request #285.
This commit is contained in:
2024-11-29 20:23:02 +01:00
parent a62f0fb037
commit e201ac7b2c
6 changed files with 12 additions and 20 deletions

View File

@@ -61,7 +61,7 @@ func NewWorkoutDto(rowId string, date string, workoutType string, sets string, r
}
var (
ErrInputValues = errors.New("Invalid input values")
ErrInputValues = errors.New("invalid input values")
)
func (service WorkoutServiceImpl) AddWorkout(user *User, workoutDto *WorkoutDto) (*WorkoutDto, error) {
@@ -125,15 +125,6 @@ func (service WorkoutServiceImpl) GetWorkouts(user *User) ([]*WorkoutDto, error)
return workoutsDto, nil
}
func renderDateStr(date string) (string, error) {
t, err := time.Parse("2006-01-02 15:04:05-07:00", date)
if err != nil {
return "", err
}
return renderDate(t), nil
}
func renderDate(date time.Time) string {
return date.Format("2006-01-02")
}