Skip to content

Commit

Permalink
removed internal/initialism package.
Browse files Browse the repository at this point in the history
now uses the releaser/initialism package.
  • Loading branch information
bengarrett committed Oct 7, 2023
1 parent 9270a85 commit b693446
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 297 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/Defacto2/server
go 1.21

require (
github.com/Defacto2/releaser v0.5.0
github.com/Defacto2/releaser v1.0.1
github.com/caarlos0/env/v7 v7.1.0
github.com/carlmjohnson/versioninfo v0.22.5
github.com/evanw/esbuild v0.18.15
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym
github.com/DATA-DOG/go-sqlmock v1.4.1 h1:ThlnYciV1iM/V0OSF/dtkqWb6xo5qITT1TJBG1MRDJM=
github.com/DATA-DOG/go-sqlmock v1.4.1/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM=
github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ=
github.com/Defacto2/releaser v0.5.0 h1:0sDQFh7Mquzo6b2KzEDz7cT4MG5PWpFPkGR5l+doXXU=
github.com/Defacto2/releaser v0.5.0/go.mod h1:qotKWtxM+tbp7uQaMX1/EiV+h0JoyujFn+4bxkWSihA=
github.com/Defacto2/releaser v1.0.1 h1:LNYM00IVi1QUp5Ba3UdIYo46Ho8qser+aA73frbALTg=
github.com/Defacto2/releaser v1.0.1/go.mod h1:qotKWtxM+tbp7uQaMX1/EiV+h0JoyujFn+4bxkWSihA=
github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU=
github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs=
github.com/Masterminds/sprig/v3 v3.2.2/go.mod h1:UoaO7Yp8KlPnJIYWTFkMaqPUYKTfGFPhxNuwnnxkKlk=
Expand Down
2 changes: 1 addition & 1 deletion handler/app/funcmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"html/template"

"github.com/Defacto2/releaser"
"github.com/Defacto2/releaser/initialism"
"github.com/Defacto2/server/internal/helper"
"github.com/Defacto2/server/internal/initialism"
)

const (
Expand Down
6 changes: 3 additions & 3 deletions handler/app/render_files.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
"strconv"

"github.com/Defacto2/releaser"
"github.com/Defacto2/releaser/initialism"
"github.com/Defacto2/server/internal/helper"
"github.com/Defacto2/server/internal/initialism"
"github.com/Defacto2/server/internal/postgres"
"github.com/Defacto2/server/internal/postgres/models"
"github.com/Defacto2/server/internal/sixteen"
Expand Down Expand Up @@ -238,15 +238,15 @@ func Releasers(z *zap.SugaredLogger, c echo.Context, uri string) error {
data := emptyFiles()
data["title"] = "Files for " + s
data["h1"] = s
data["lead"] = initialism.Join(uri)
data["lead"] = initialism.Join(initialism.Path(uri))
data["logo"] = s
data["description"] = "The collection of files for " + s + "."
data["demozoo"] = strconv.Itoa(int(zoo.Find(uri)))
data["sixteen"] = sixteen.Find(uri)
data[records] = fs
switch uri {
case "independent":
data["lead"] = initialism.Join(uri) +
data["lead"] = initialism.Join(initialism.Path(uri)) +
", independent releases are files with no group or releaser affiliation." +
`<br><small class="fw-lighter">In the scene's early years,` +
` releasing documents or software cracks under a personal alias or a` +
Expand Down
4 changes: 2 additions & 2 deletions handler/app/render_search.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"strings"

"github.com/Defacto2/releaser"
"github.com/Defacto2/releaser/initialism"
"github.com/Defacto2/server/internal/helper"
"github.com/Defacto2/server/internal/initialism"
"github.com/Defacto2/server/internal/postgres"
"github.com/Defacto2/server/model"
"github.com/labstack/echo/v4"
Expand Down Expand Up @@ -142,7 +142,7 @@ func SearchReleaser(z *zap.SugaredLogger, c echo.Context) error {
id := strings.TrimSpace(v.Name)
slug := helper.Slug(id)
name := releaser.Link(slug)
ism := initialism.Initialism(slug)
ism := initialism.Initialism(initialism.Path(slug))
opt := name
if len(ism) > 0 {
opt = fmt.Sprintf("%s (%s)", name, strings.Join(ism, ", "))
Expand Down
288 changes: 0 additions & 288 deletions internal/initialism/initialism.go

This file was deleted.

0 comments on commit b693446

Please sign in to comment.