Skip to content

Commit

Permalink
templ: fmt imports
Browse files Browse the repository at this point in the history
Signed-off-by: Arthur Zamarin <[email protected]>
  • Loading branch information
arthurzam committed Jun 27, 2024
1 parent 81dd954 commit f7e25c6
Show file tree
Hide file tree
Showing 28 changed files with 174 additions and 118 deletions.
6 changes: 4 additions & 2 deletions pkg/api/graphql/graphiql/graphiql.templ
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package graphiql

import "net/http"
import "soko/pkg/config"
import (
"net/http"
"soko/pkg/config"
)

templ show() {
<!DOCTYPE html>
Expand Down
6 changes: 4 additions & 2 deletions pkg/app/handler/about/feedback.templ
Original file line number Diff line number Diff line change
@@ -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">
Expand Down
6 changes: 4 additions & 2 deletions pkg/app/handler/about/feeds.templ
Original file line number Diff line number Diff line change
@@ -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">
Expand Down
6 changes: 4 additions & 2 deletions pkg/app/handler/about/help.templ
Original file line number Diff line number Diff line change
@@ -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">
Expand Down
10 changes: 6 additions & 4 deletions pkg/app/handler/about/index.templ
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
12 changes: 7 additions & 5 deletions pkg/app/handler/about/status.templ
Original file line number Diff line number Diff line change
@@ -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">
Expand Down
10 changes: 6 additions & 4 deletions pkg/app/handler/arches/changedVersions.templ
Original file line number Diff line number Diff line change
@@ -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">
Expand Down
8 changes: 5 additions & 3 deletions pkg/app/handler/categories/index.templ
Original file line number Diff line number Diff line change
@@ -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">
Expand Down
12 changes: 7 additions & 5 deletions pkg/app/handler/categories/show.templ
Original file line number Diff line number Diff line change
@@ -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])
Expand Down
12 changes: 7 additions & 5 deletions pkg/app/handler/index/index.templ
Original file line number Diff line number Diff line change
@@ -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">
Expand Down
10 changes: 6 additions & 4 deletions pkg/app/handler/maintainer/browse.templ
Original file line number Diff line number Diff line change
@@ -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">
Expand Down
10 changes: 6 additions & 4 deletions pkg/app/handler/maintainer/show.templ
Original file line number Diff line number Diff line change
@@ -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{
Expand Down
16 changes: 9 additions & 7 deletions pkg/app/handler/packages/changed_versions.templ
Original file line number Diff line number Diff line change
@@ -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">
Expand Down
6 changes: 4 additions & 2 deletions pkg/app/handler/packages/components/bugs.templ
Original file line number Diff line number Diff line change
@@ -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>
Expand Down
10 changes: 6 additions & 4 deletions pkg/app/handler/packages/components/changelog.templ
Original file line number Diff line number Diff line change
@@ -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))
Expand Down
6 changes: 4 additions & 2 deletions pkg/app/handler/packages/components/pullrequests.templ
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package components

import "soko/pkg/models"
import "strconv"
import (
"soko/pkg/models"
"strconv"
)

css badgeColor(color string) {
font-weight: normal;
Expand Down
12 changes: 7 additions & 5 deletions pkg/app/handler/packages/eapi.templ
Original file line number Diff line number Diff line change
@@ -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
Expand Down
12 changes: 7 additions & 5 deletions pkg/app/handler/packages/overview.templ
Original file line number Diff line number Diff line change
@@ -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 != "" {
Expand Down
10 changes: 6 additions & 4 deletions pkg/app/handler/packages/show.templ
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
10 changes: 6 additions & 4 deletions pkg/app/handler/useflags/expand.templ
Original file line number Diff line number Diff line change
@@ -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">
Expand Down
10 changes: 6 additions & 4 deletions pkg/app/handler/useflags/global.templ
Original file line number Diff line number Diff line change
@@ -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">
Expand Down
10 changes: 6 additions & 4 deletions pkg/app/handler/useflags/local.templ
Original file line number Diff line number Diff line change
@@ -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">
Expand Down
10 changes: 6 additions & 4 deletions pkg/app/handler/useflags/search.templ
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
16 changes: 9 additions & 7 deletions pkg/app/handler/useflags/show.templ
Original file line number Diff line number Diff line change
@@ -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">
Expand Down
14 changes: 8 additions & 6 deletions pkg/app/handler/user/general.templ
Original file line number Diff line number Diff line change
@@ -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">
Expand Down
Loading

0 comments on commit f7e25c6

Please sign in to comment.