Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade go.mod to v2 #393

Merged
merged 2 commits into from
Jan 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 39 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,44 @@
## What's Changed

- Upgrade go.mod to v2
- Fix(gpx): Handle GPX files without track names, by @jovandeginste, in
[#391](https://github.com/jovandeginste/workout-tracker/pull/391)
- refactor(converters): Improve name detection, by @jovandeginste, in
[#390](https://github.com/jovandeginste/workout-tracker/pull/390)
- Refactor(views): Improve workout and route segment name display, by
@jovandeginste, in
[#389](https://github.com/jovandeginste/workout-tracker/pull/389)
- Refactor(template): Remove duplicate footer from statistics page, by
@jovandeginste, in
[#386](https://github.com/jovandeginste/workout-tracker/pull/386)

## What's Changed in v2.0.1

- Always show workout details in lists, by @jovandeginste, in
[#385](https://github.com/jovandeginste/workout-tracker/pull/385)
- fix(user): Set context of user from request, by @jovandeginste, in
[#384](https://github.com/jovandeginste/workout-tracker/pull/384)
- Improve the page options for scripts and stylesheets, by @jovandeginste, in
[#382](https://github.com/jovandeginste/workout-tracker/pull/382)
- Convert the pages into a shared template, by @jovandeginste, in
[#381](https://github.com/jovandeginste/workout-tracker/pull/381)
- Bump templates generated by templ, by @jovandeginste, in
[#379](https://github.com/jovandeginste/workout-tracker/pull/379)
- Convert floats using helper function, by @jovandeginste
- Add helper function to convert any type to string, by @jovandeginste
- Bump templ to v0.3, by @jovandeginste
- Add back a number of icons that went missing, by @jovandeginste, in
[#378](https://github.com/jovandeginste/workout-tracker/pull/378)

**Full Changelog**:
https://github.com/jovandeginste/workout-tracker/compare/v2.0.0...v2.0.1

## What's Changed in v2.0.0

- refactor: Improve error handling in equipment handlers
- refactor: Improve error handling in equipment handlers, by @jovandeginste, in
[#377](https://github.com/jovandeginste/workout-tracker/pull/377)
- Update changelog, by @jovandeginste, in
[#376](https://github.com/jovandeginste/workout-tracker/pull/376)
- Fix a few more template errors, by @jovandeginste, in
[#375](https://github.com/jovandeginste/workout-tracker/pull/375)
- Translations update from Hosted Weblate, by @jovandeginste, in
Expand Down Expand Up @@ -373,16 +411,12 @@

## New Contributors

- @jovandeginste made their first contribution in
[#375](https://github.com/jovandeginste/workout-tracker/pull/375)
- @ made their first contribution
- @weblate made their first contribution
- @dependabot[bot] made their first contribution
- @sikmir made their first contribution
- @woernsn made their first contribution
- @Monirzadeh made their first contribution
- @Leiasticot made their first contribution
- @pixelspark made their first contribution
- @Atalanttore made their first contribution

**Full Changelog**:
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/jovandeginste/workout-tracker
module github.com/jovandeginste/workout-tracker/v2

go 1.23

Expand Down
8 changes: 4 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package main

import (
appassets "github.com/jovandeginste/workout-tracker/assets"
"github.com/jovandeginste/workout-tracker/pkg/app"
"github.com/jovandeginste/workout-tracker/pkg/version"
apptranslations "github.com/jovandeginste/workout-tracker/translations"
appassets "github.com/jovandeginste/workout-tracker/v2/assets"
"github.com/jovandeginste/workout-tracker/v2/pkg/app"
"github.com/jovandeginste/workout-tracker/v2/pkg/version"
apptranslations "github.com/jovandeginste/workout-tracker/v2/translations"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion pkg/app/admin_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package app
import (
"strconv"

"github.com/jovandeginste/workout-tracker/pkg/database"
"github.com/jovandeginste/workout-tracker/v2/pkg/database"
"github.com/labstack/echo/v4"
)

Expand Down
4 changes: 2 additions & 2 deletions pkg/app/admin_handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package app
import (
"net/http"

"github.com/jovandeginste/workout-tracker/pkg/database"
"github.com/jovandeginste/workout-tracker/views/admin"
"github.com/jovandeginste/workout-tracker/v2/pkg/database"
"github.com/jovandeginste/workout-tracker/v2/views/admin"
"github.com/labstack/echo/v4"
)

Expand Down
6 changes: 3 additions & 3 deletions pkg/app/api_handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
"time"

"github.com/a-h/templ"
"github.com/jovandeginste/workout-tracker/pkg/database"
"github.com/jovandeginste/workout-tracker/pkg/importers"
"github.com/jovandeginste/workout-tracker/views/workouts"
"github.com/jovandeginste/workout-tracker/v2/pkg/database"
"github.com/jovandeginste/workout-tracker/v2/pkg/importers"
"github.com/jovandeginste/workout-tracker/v2/views/workouts"
echojwt "github.com/labstack/echo-jwt/v4"
"github.com/labstack/echo/v4"
"github.com/labstack/echo/v4/middleware"
Expand Down
2 changes: 1 addition & 1 deletion pkg/app/api_handlers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"net/http/httptest"
"testing"

"github.com/jovandeginste/workout-tracker/pkg/database"
"github.com/jovandeginste/workout-tracker/v2/pkg/database"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"gorm.io/gorm"
Expand Down
6 changes: 3 additions & 3 deletions pkg/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import (
"github.com/cat-dealer/go-rand/v2"
"github.com/fsouza/slognil"
"github.com/invopop/ctxi18n/i18n"
"github.com/jovandeginste/workout-tracker/pkg/database"
"github.com/jovandeginste/workout-tracker/pkg/geocoder"
"github.com/jovandeginste/workout-tracker/pkg/version"
"github.com/jovandeginste/workout-tracker/v2/pkg/database"
"github.com/jovandeginste/workout-tracker/v2/pkg/geocoder"
"github.com/jovandeginste/workout-tracker/v2/pkg/version"
"github.com/labstack/echo/v4"
"github.com/lmittmann/tint"
"github.com/mattn/go-isatty"
Expand Down
6 changes: 3 additions & 3 deletions pkg/app/app_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"testing"

"github.com/fsouza/slognil"
appassets "github.com/jovandeginste/workout-tracker/assets"
"github.com/jovandeginste/workout-tracker/pkg/version"
apptranslations "github.com/jovandeginste/workout-tracker/translations"
appassets "github.com/jovandeginste/workout-tracker/v2/assets"
"github.com/jovandeginste/workout-tracker/v2/pkg/version"
apptranslations "github.com/jovandeginste/workout-tracker/v2/translations"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/app/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"time"

"github.com/golang-jwt/jwt/v5"
"github.com/jovandeginste/workout-tracker/pkg/database"
"github.com/jovandeginste/workout-tracker/v2/pkg/database"
"github.com/labstack/echo/v4"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/app/background.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"path/filepath"
"time"

"github.com/jovandeginste/workout-tracker/pkg/database"
"github.com/jovandeginste/workout-tracker/v2/pkg/database"
"gorm.io/gorm"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/app/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

"github.com/golang-jwt/jwt/v5"
"github.com/invopop/ctxi18n"
"github.com/jovandeginste/workout-tracker/pkg/database"
"github.com/jovandeginste/workout-tracker/v2/pkg/database"

"github.com/labstack/echo/v4"
)
Expand Down
4 changes: 2 additions & 2 deletions pkg/app/equipment_handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"net/http"
"strconv"

"github.com/jovandeginste/workout-tracker/pkg/database"
"github.com/jovandeginste/workout-tracker/views/equipment"
"github.com/jovandeginste/workout-tracker/v2/pkg/database"
"github.com/jovandeginste/workout-tracker/v2/views/equipment"
"github.com/labstack/echo/v4"
)

Expand Down
8 changes: 4 additions & 4 deletions pkg/app/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import (
"net/http"

"github.com/a-h/templ"
"github.com/jovandeginste/workout-tracker/pkg/database"
"github.com/jovandeginste/workout-tracker/pkg/geocoder"
"github.com/jovandeginste/workout-tracker/views/partials"
"github.com/jovandeginste/workout-tracker/views/user"
"github.com/jovandeginste/workout-tracker/v2/pkg/database"
"github.com/jovandeginste/workout-tracker/v2/pkg/geocoder"
"github.com/jovandeginste/workout-tracker/v2/views/partials"
"github.com/jovandeginste/workout-tracker/v2/views/user"
"github.com/labstack/echo/v4"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/app/i18n.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"github.com/invopop/ctxi18n"
"github.com/invopop/ctxi18n/i18n"
"github.com/jovandeginste/workout-tracker/pkg/database"
"github.com/jovandeginste/workout-tracker/v2/pkg/database"
"github.com/labstack/echo/v4"
)

Expand Down
4 changes: 2 additions & 2 deletions pkg/app/route_segments_handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"strconv"
"strings"

"github.com/jovandeginste/workout-tracker/pkg/database"
"github.com/jovandeginste/workout-tracker/views/route_segments"
"github.com/jovandeginste/workout-tracker/v2/pkg/database"
"github.com/jovandeginste/workout-tracker/v2/views/route_segments"
"github.com/labstack/echo/v4"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/app/routes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"net/http/httptest"
"testing"

"github.com/jovandeginste/workout-tracker/pkg/database"
"github.com/jovandeginste/workout-tracker/v2/pkg/database"
session "github.com/spazzymoto/echo-scs-session"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
Expand Down
4 changes: 2 additions & 2 deletions pkg/app/self_handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package app
import (
"net/http"

"github.com/jovandeginste/workout-tracker/pkg/database"
"github.com/jovandeginste/workout-tracker/views/user"
"github.com/jovandeginste/workout-tracker/v2/pkg/database"
"github.com/jovandeginste/workout-tracker/v2/views/user"
"github.com/labstack/echo/v4"
)

Expand Down
4 changes: 2 additions & 2 deletions pkg/app/users_handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"fmt"
"net/http"

"github.com/jovandeginste/workout-tracker/pkg/database"
"github.com/jovandeginste/workout-tracker/views/user"
"github.com/jovandeginste/workout-tracker/v2/pkg/database"
"github.com/jovandeginste/workout-tracker/v2/views/user"
"github.com/labstack/echo/v4"
)

Expand Down
4 changes: 2 additions & 2 deletions pkg/app/workouts.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"strings"
"time"

"github.com/jovandeginste/workout-tracker/pkg/database"
"github.com/jovandeginste/workout-tracker/pkg/geocoder"
"github.com/jovandeginste/workout-tracker/v2/pkg/database"
"github.com/jovandeginste/workout-tracker/v2/pkg/geocoder"
"github.com/labstack/echo/v4"
)

Expand Down
4 changes: 2 additions & 2 deletions pkg/app/workouts_handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"time"

"github.com/google/uuid"
"github.com/jovandeginste/workout-tracker/pkg/database"
"github.com/jovandeginste/workout-tracker/views/workouts"
"github.com/jovandeginste/workout-tracker/v2/pkg/database"
"github.com/jovandeginste/workout-tracker/v2/views/workouts"
"github.com/labstack/echo/v4"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/database/profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"os"

"github.com/jovandeginste/workout-tracker/pkg/templatehelpers"
"github.com/jovandeginste/workout-tracker/v2/pkg/templatehelpers"
"gorm.io/gorm"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/database/route_segments.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/gomarkdown/markdown"
"github.com/gomarkdown/markdown/html"
"github.com/gomarkdown/markdown/parser"
"github.com/jovandeginste/workout-tracker/pkg/converters"
"github.com/jovandeginste/workout-tracker/v2/pkg/converters"
"github.com/microcosm-cc/bluemonday"
"github.com/tkrajina/gpxgo/gpx"
"gorm.io/gorm"
Expand Down
2 changes: 1 addition & 1 deletion pkg/database/user_statistics.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package database
import (
"time"

"github.com/jovandeginste/workout-tracker/pkg/templatehelpers"
"github.com/jovandeginste/workout-tracker/v2/pkg/templatehelpers"
)

type (
Expand Down
2 changes: 1 addition & 1 deletion pkg/database/workouts.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/gomarkdown/markdown/html"
"github.com/gomarkdown/markdown/parser"
"github.com/google/uuid"
"github.com/jovandeginste/workout-tracker/pkg/converters"
"github.com/jovandeginste/workout-tracker/v2/pkg/converters"
"github.com/microcosm-cc/bluemonday"
"github.com/tkrajina/gpxgo/gpx"
"gorm.io/gorm"
Expand Down
4 changes: 2 additions & 2 deletions pkg/database/workouts_map.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"time"

"github.com/codingsince1985/geo-golang"
"github.com/jovandeginste/workout-tracker/pkg/geocoder"
"github.com/jovandeginste/workout-tracker/pkg/templatehelpers"
"github.com/jovandeginste/workout-tracker/v2/pkg/geocoder"
"github.com/jovandeginste/workout-tracker/v2/pkg/templatehelpers"
"github.com/labstack/gommon/log"
"github.com/paulmach/orb"
"github.com/ringsaturn/tzf"
Expand Down
2 changes: 1 addition & 1 deletion pkg/database/workouts_statistics.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"time"

"github.com/jovandeginste/workout-tracker/pkg/templatehelpers"
"github.com/jovandeginste/workout-tracker/v2/pkg/templatehelpers"
)

type BreakdownItem struct {
Expand Down
4 changes: 2 additions & 2 deletions views/admin/actions.templ
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package admin
import (
"fmt"
"github.com/invopop/ctxi18n/i18n"
"github.com/jovandeginste/workout-tracker/pkg/database"
"github.com/jovandeginste/workout-tracker/views/helpers"
"github.com/jovandeginste/workout-tracker/v2/pkg/database"
"github.com/jovandeginste/workout-tracker/v2/views/helpers"
)

templ actions(u *database.User) {
Expand Down
4 changes: 2 additions & 2 deletions views/admin/actions_templ.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions views/admin/edit_user.templ
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package admin

import (
"github.com/invopop/ctxi18n/i18n"
"github.com/jovandeginste/workout-tracker/pkg/database"
"github.com/jovandeginste/workout-tracker/views/helpers"
"github.com/jovandeginste/workout-tracker/views/partials"
"github.com/jovandeginste/workout-tracker/v2/pkg/database"
"github.com/jovandeginste/workout-tracker/v2/views/helpers"
"github.com/jovandeginste/workout-tracker/v2/views/partials"
)

templ EditUser(u *database.User) {
Expand Down
6 changes: 3 additions & 3 deletions views/admin/edit_user_templ.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions views/admin/root.templ
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ package admin

import (
"github.com/invopop/ctxi18n/i18n"
"github.com/jovandeginste/workout-tracker/pkg/database"
"github.com/jovandeginste/workout-tracker/views/helpers"
"github.com/jovandeginste/workout-tracker/views/partials"
"github.com/jovandeginste/workout-tracker/v2/pkg/database"
"github.com/jovandeginste/workout-tracker/v2/views/helpers"
"github.com/jovandeginste/workout-tracker/v2/views/partials"
)

templ Root(users []*database.User) {
Expand Down
Loading
Loading