diff options
author | Arthur Zamarin <arthurzam@gentoo.org> | 2024-06-27 22:36:40 +0300 |
---|---|---|
committer | Arthur Zamarin <arthurzam@gentoo.org> | 2024-06-27 22:36:40 +0300 |
commit | f7e25c6d0c6e99f00131cc7837f02ff62913ca6f (patch) | |
tree | 00872a693579389b4a1c74876cfb707706060acb | |
parent | about: add link to commit when showing soko's current commit id (diff) | |
download | soko-f7e25c6d0c6e99f00131cc7837f02ff62913ca6f.tar.gz soko-f7e25c6d0c6e99f00131cc7837f02ff62913ca6f.tar.bz2 soko-f7e25c6d0c6e99f00131cc7837f02ff62913ca6f.zip |
templ: fmt imports
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
28 files changed, 174 insertions, 118 deletions
diff --git a/pkg/api/graphql/graphiql/graphiql.templ b/pkg/api/graphql/graphiql/graphiql.templ index c392a54..e84226e 100644 --- a/pkg/api/graphql/graphiql/graphiql.templ +++ b/pkg/api/graphql/graphiql/graphiql.templ @@ -1,7 +1,9 @@ package graphiql -import "net/http" -import "soko/pkg/config" +import ( + "net/http" + "soko/pkg/config" +) templ show() { <!DOCTYPE html> diff --git a/pkg/app/handler/about/feedback.templ b/pkg/app/handler/about/feedback.templ index f29117e..0bf6b2c 100644 --- a/pkg/app/handler/about/feedback.templ +++ b/pkg/app/handler/about/feedback.templ @@ -1,7 +1,9 @@ package about -import "net/http" -import "soko/pkg/app/layout" +import ( + "net/http" + "soko/pkg/app/layout" +) templ feedback() { <div class="container mb-5"> diff --git a/pkg/app/handler/about/feeds.templ b/pkg/app/handler/about/feeds.templ index 0116ee6..af61c7f 100644 --- a/pkg/app/handler/about/feeds.templ +++ b/pkg/app/handler/about/feeds.templ @@ -1,7 +1,9 @@ package about -import "net/http" -import "soko/pkg/app/layout" +import ( + "net/http" + "soko/pkg/app/layout" +) templ feeds() { <div class="container mb-5"> diff --git a/pkg/app/handler/about/help.templ b/pkg/app/handler/about/help.templ index 5ef1209..e00ef8c 100644 --- a/pkg/app/handler/about/help.templ +++ b/pkg/app/handler/about/help.templ @@ -1,7 +1,9 @@ package about -import "net/http" -import "soko/pkg/app/layout" +import ( + "net/http" + "soko/pkg/app/layout" +) templ help() { <div class="container mb-5"> diff --git a/pkg/app/handler/about/index.templ b/pkg/app/handler/about/index.templ index 16a0b5f..aa5130d 100644 --- a/pkg/app/handler/about/index.templ +++ b/pkg/app/handler/about/index.templ @@ -1,9 +1,11 @@ package about -import "net/http" -import "runtime/debug" -import "soko/pkg/app/layout" -import "soko/pkg/config" +import ( + "net/http" + "runtime/debug" + "soko/pkg/app/layout" + "soko/pkg/config" +) func getCommitId() string { if info, ok := debug.ReadBuildInfo(); ok { diff --git a/pkg/app/handler/about/status.templ b/pkg/app/handler/about/status.templ index 9829345..f669ec4 100644 --- a/pkg/app/handler/about/status.templ +++ b/pkg/app/handler/about/status.templ @@ -1,10 +1,12 @@ package about -import "net/http" -import "soko/pkg/app/layout" -import "soko/pkg/database" -import "soko/pkg/models" -import "time" +import ( + "net/http" + "soko/pkg/app/layout" + "soko/pkg/database" + "soko/pkg/models" + "time" +) templ status(applications []*models.Application) { <div class="container mb-5"> diff --git a/pkg/app/handler/arches/changedVersions.templ b/pkg/app/handler/arches/changedVersions.templ index 6063452..224076c 100644 --- a/pkg/app/handler/arches/changedVersions.templ +++ b/pkg/app/handler/arches/changedVersions.templ @@ -1,9 +1,11 @@ package arches -import "net/http" -import "soko/pkg/app/layout" -import "soko/pkg/app/utils" -import "soko/pkg/models" +import ( + "net/http" + "soko/pkg/app/layout" + "soko/pkg/app/utils" + "soko/pkg/models" +) templ changedVersions(currentArch string, feedName string, versions []*models.Version) { <div class="container mb-5"> diff --git a/pkg/app/handler/categories/index.templ b/pkg/app/handler/categories/index.templ index 683e58d..790be00 100644 --- a/pkg/app/handler/categories/index.templ +++ b/pkg/app/handler/categories/index.templ @@ -1,8 +1,10 @@ package categories -import "net/http" -import "soko/pkg/database" -import "soko/pkg/models" +import ( + "net/http" + "soko/pkg/database" + "soko/pkg/models" +) templ index(categories []*models.Category) { <div class="container mb-5"> diff --git a/pkg/app/handler/categories/show.templ b/pkg/app/handler/categories/show.templ index 639dd14..5065809 100644 --- a/pkg/app/handler/categories/show.templ +++ b/pkg/app/handler/categories/show.templ @@ -1,10 +1,12 @@ package categories -import "net/http" -import "strconv" -import "strings" -import "soko/pkg/app/layout" -import "soko/pkg/models" +import ( + "net/http" + "soko/pkg/app/layout" + "soko/pkg/models" + "strconv" + "strings" +) func packageLetter(name string) string { return strings.ToLower(strings.TrimLeft(name, "_")[:1]) diff --git a/pkg/app/handler/index/index.templ b/pkg/app/handler/index/index.templ index 7e23b0f..98101cb 100644 --- a/pkg/app/handler/index/index.templ +++ b/pkg/app/handler/index/index.templ @@ -1,10 +1,12 @@ package index -import "net/http" -import "soko/pkg/app/layout" -import "soko/pkg/app/utils" -import "soko/pkg/database" -import "soko/pkg/models" +import ( + "net/http" + "soko/pkg/app/layout" + "soko/pkg/app/utils" + "soko/pkg/database" + "soko/pkg/models" +) templ header(packageCount int) { <div class="col-12"> diff --git a/pkg/app/handler/maintainer/browse.templ b/pkg/app/handler/maintainer/browse.templ index b217b95..64b2586 100644 --- a/pkg/app/handler/maintainer/browse.templ +++ b/pkg/app/handler/maintainer/browse.templ @@ -1,9 +1,11 @@ package maintainer -import "soko/pkg/models" -import "soko/pkg/app/layout" -import "net/http" -import "soko/pkg/database" +import ( + "net/http" + "soko/pkg/app/layout" + "soko/pkg/database" + "soko/pkg/models" +) templ browsePage(maintainers []*models.Maintainer) { <div class="container mb-5"> diff --git a/pkg/app/handler/maintainer/show.templ b/pkg/app/handler/maintainer/show.templ index 317ce70..0061788 100644 --- a/pkg/app/handler/maintainer/show.templ +++ b/pkg/app/handler/maintainer/show.templ @@ -1,9 +1,11 @@ package maintainer -import "strconv" -import "strings" -import "soko/pkg/app/layout" -import "soko/pkg/models" +import ( + "soko/pkg/app/layout" + "soko/pkg/models" + "strconv" + "strings" +) func showViewTabs(email string, packagesCount int, info *models.MaintainerPackagesInformation) []layout.SubTab { return []layout.SubTab{ diff --git a/pkg/app/handler/packages/changed_versions.templ b/pkg/app/handler/packages/changed_versions.templ index 1f0af89..4d2a6c5 100644 --- a/pkg/app/handler/packages/changed_versions.templ +++ b/pkg/app/handler/packages/changed_versions.templ @@ -1,12 +1,14 @@ package packages -import "net/http" -import "soko/pkg/app/handler/categories" -import "soko/pkg/app/handler/feeds" -import "soko/pkg/app/handler/packages/components" -import "soko/pkg/app/utils" -import "soko/pkg/database" -import "soko/pkg/models" +import ( + "net/http" + "soko/pkg/app/handler/categories" + "soko/pkg/app/handler/feeds" + "soko/pkg/app/handler/packages/components" + "soko/pkg/app/utils" + "soko/pkg/database" + "soko/pkg/models" +) templ changedVersionsPage(pageType string, versions []*models.Version) { <div class="container mb-5"> diff --git a/pkg/app/handler/packages/components/bugs.templ b/pkg/app/handler/packages/components/bugs.templ index b601903..f0ae391 100644 --- a/pkg/app/handler/packages/components/bugs.templ +++ b/pkg/app/handler/packages/components/bugs.templ @@ -1,7 +1,9 @@ package components -import "soko/pkg/models" -import "strconv" +import ( + "soko/pkg/models" + "strconv" +) templ bugsList(title string, component models.BugComponent, bugs []*models.Bug, titleClass, id string) { <h3 id={ id } class={ titleClass }>{ title }</h3> diff --git a/pkg/app/handler/packages/components/changelog.templ b/pkg/app/handler/packages/components/changelog.templ index 9e86328..3a1f2b0 100644 --- a/pkg/app/handler/packages/components/changelog.templ +++ b/pkg/app/handler/packages/components/changelog.templ @@ -1,9 +1,11 @@ package components -import "crypto/md5" -import "encoding/hex" -import "time" -import "soko/pkg/models" +import ( + "crypto/md5" + "encoding/hex" + "soko/pkg/models" + "time" +) func gravatar(email string) string { hasher := md5.Sum([]byte(email)) diff --git a/pkg/app/handler/packages/components/pullrequests.templ b/pkg/app/handler/packages/components/pullrequests.templ index 0f2cc2a..29e53ee 100644 --- a/pkg/app/handler/packages/components/pullrequests.templ +++ b/pkg/app/handler/packages/components/pullrequests.templ @@ -1,7 +1,9 @@ package components -import "soko/pkg/models" -import "strconv" +import ( + "soko/pkg/models" + "strconv" +) css badgeColor(color string) { font-weight: normal; diff --git a/pkg/app/handler/packages/eapi.templ b/pkg/app/handler/packages/eapi.templ index 5a476a0..fef1e96 100644 --- a/pkg/app/handler/packages/eapi.templ +++ b/pkg/app/handler/packages/eapi.templ @@ -1,10 +1,12 @@ package packages -import "net/http" -import "strconv" -import "soko/pkg/database" -import "soko/pkg/models" -import "soko/pkg/app/handler/categories" +import ( + "net/http" + "soko/pkg/app/handler/categories" + "soko/pkg/database" + "soko/pkg/models" + "strconv" +) type eapiPackage struct { Category string diff --git a/pkg/app/handler/packages/overview.templ b/pkg/app/handler/packages/overview.templ index 43632e2..7237914 100644 --- a/pkg/app/handler/packages/overview.templ +++ b/pkg/app/handler/packages/overview.templ @@ -1,10 +1,12 @@ package packages -import "slices" -import "strings" -import "time" -import "soko/pkg/app/utils" -import "soko/pkg/models" +import ( + "slices" + "soko/pkg/app/utils" + "soko/pkg/models" + "strings" + "time" +) func overviewSlotText(version *models.Version) string { if version.Subslot != "" { diff --git a/pkg/app/handler/packages/show.templ b/pkg/app/handler/packages/show.templ index 64d99c9..5abc2a1 100644 --- a/pkg/app/handler/packages/show.templ +++ b/pkg/app/handler/packages/show.templ @@ -1,9 +1,11 @@ package packages -import "strconv" -import "soko/pkg/app/handler/packages/components" -import "soko/pkg/app/layout" -import "soko/pkg/models" +import ( + "soko/pkg/app/handler/packages/components" + "soko/pkg/app/layout" + "soko/pkg/models" + "strconv" +) func showViewTabs(pkg *models.Package) []layout.SubTab { securityBugs, nonSecurityBugs := countBugs(pkg) diff --git a/pkg/app/handler/useflags/expand.templ b/pkg/app/handler/useflags/expand.templ index c73d95b..0b7a8df 100644 --- a/pkg/app/handler/useflags/expand.templ +++ b/pkg/app/handler/useflags/expand.templ @@ -1,9 +1,11 @@ package useflags -import "net/http" -import "soko/pkg/database" -import "soko/pkg/models" -import "github.com/go-pg/pg/v10" +import ( + "github.com/go-pg/pg/v10" + "net/http" + "soko/pkg/database" + "soko/pkg/models" +) templ expand(useflags []models.Useflag) { <div class="container mb-5"> diff --git a/pkg/app/handler/useflags/global.templ b/pkg/app/handler/useflags/global.templ index edfcda2..0289dbb 100644 --- a/pkg/app/handler/useflags/global.templ +++ b/pkg/app/handler/useflags/global.templ @@ -1,9 +1,11 @@ package useflags -import "net/http" -import "soko/pkg/database" -import "soko/pkg/models" -import "github.com/go-pg/pg/v10" +import ( + "github.com/go-pg/pg/v10" + "net/http" + "soko/pkg/database" + "soko/pkg/models" +) templ global(useflags []models.Useflag) { <div class="container mb-5"> diff --git a/pkg/app/handler/useflags/local.templ b/pkg/app/handler/useflags/local.templ index cdc4a53..138b493 100644 --- a/pkg/app/handler/useflags/local.templ +++ b/pkg/app/handler/useflags/local.templ @@ -1,9 +1,11 @@ package useflags -import "net/http" -import "soko/pkg/database" -import "soko/pkg/models" -import "github.com/go-pg/pg/v10" +import ( + "github.com/go-pg/pg/v10" + "net/http" + "soko/pkg/database" + "soko/pkg/models" +) templ local(useflags []models.Useflag) { <div class="container mb-5"> diff --git a/pkg/app/handler/useflags/search.templ b/pkg/app/handler/useflags/search.templ index bcfa88a..d989f91 100644 --- a/pkg/app/handler/useflags/search.templ +++ b/pkg/app/handler/useflags/search.templ @@ -1,9 +1,11 @@ package useflags -import "net/http" -import "soko/pkg/database" -import "soko/pkg/models" -import "github.com/go-pg/pg/v10" +import ( + "github.com/go-pg/pg/v10" + "net/http" + "soko/pkg/database" + "soko/pkg/models" +) css searchButton() { border-top-right-radius: 0.25rem !important; diff --git a/pkg/app/handler/useflags/show.templ b/pkg/app/handler/useflags/show.templ index 9a2d104..ab1c861 100644 --- a/pkg/app/handler/useflags/show.templ +++ b/pkg/app/handler/useflags/show.templ @@ -1,12 +1,14 @@ package useflags -import "net/http" -import "strconv" -import "strings" -import "soko/pkg/app/layout" -import "soko/pkg/database" -import "soko/pkg/models" -import "github.com/go-pg/pg/v10" +import ( + "github.com/go-pg/pg/v10" + "net/http" + "soko/pkg/app/layout" + "soko/pkg/database" + "soko/pkg/models" + "strconv" + "strings" +) templ showUseflagHeader(useflag models.Useflag) { <div class="kk-header-container"> diff --git a/pkg/app/handler/user/general.templ b/pkg/app/handler/user/general.templ index c908295..ee6d688 100644 --- a/pkg/app/handler/user/general.templ +++ b/pkg/app/handler/user/general.templ @@ -1,11 +1,13 @@ package user -import "encoding/base64" -import "encoding/json" -import "net/http" -import "time" -import "soko/pkg/app/utils" -import "soko/pkg/models" +import ( + "encoding/base64" + "encoding/json" + "net/http" + "soko/pkg/app/utils" + "soko/pkg/models" + "time" +) templ general(preferences models.GeneralPreferences) { <form method="post" action="/user/preferences/general/layout"> diff --git a/pkg/app/handler/user/maintainers.templ b/pkg/app/handler/user/maintainers.templ index a12c913..10d4b9c 100644 --- a/pkg/app/handler/user/maintainers.templ +++ b/pkg/app/handler/user/maintainers.templ @@ -1,13 +1,15 @@ package user -import "encoding/base64" -import "encoding/json" -import "net/http" -import "time" -import "soko/pkg/app/utils" -import "soko/pkg/models" -import "slices" -import "soko/pkg/database" +import ( + "encoding/base64" + "encoding/json" + "net/http" + "slices" + "soko/pkg/app/utils" + "soko/pkg/database" + "soko/pkg/models" + "time" +) func splitAllProjects() [][]models.Project { var projects []models.Project diff --git a/pkg/app/handler/user/preferences.templ b/pkg/app/handler/user/preferences.templ index 2c39bad..01805e2 100644 --- a/pkg/app/handler/user/preferences.templ +++ b/pkg/app/handler/user/preferences.templ @@ -1,11 +1,13 @@ package user -import "net/http" -import "time" -import "soko/pkg/app/layout" -import "soko/pkg/app/utils" -import "soko/pkg/config" -import "soko/pkg/models" +import ( + "net/http" + "soko/pkg/app/layout" + "soko/pkg/app/utils" + "soko/pkg/config" + "soko/pkg/models" + "time" +) var viewTabs = []layout.SubTab{ { diff --git a/pkg/app/utils/changedVersion.templ b/pkg/app/utils/changedVersion.templ index b23269d..80cee68 100644 --- a/pkg/app/utils/changedVersion.templ +++ b/pkg/app/utils/changedVersion.templ @@ -1,9 +1,11 @@ package utils -import "slices" -import "soko/pkg/models" -import "strings" -import "time" +import ( + "slices" + "soko/pkg/models" + "strings" + "time" +) templ ChangedVersionsTable(versions []*models.Version) { for _, version := range versions { |