Changed module name to github Path, and minor changes

This commit is contained in:
Pablu23
2024-04-04 09:55:29 +02:00
parent 58344d4def
commit 56fc884952
6 changed files with 15 additions and 15 deletions

View File

@@ -2,9 +2,9 @@ package main
import ( import (
"fmt" "fmt"
"mangaGetter/internal/database" "github.com/pablu23/mangaGetter/internal/database"
"mangaGetter/internal/provider" "github.com/pablu23/mangaGetter/internal/provider"
"mangaGetter/internal/server" "github.com/pablu23/mangaGetter/internal/server"
"os" "os"
"os/exec" "os/exec"
"os/signal" "os/signal"

2
go.mod
View File

@@ -1,4 +1,4 @@
module mangaGetter module github.com/pablu23/mangaGetter
go 1.22 go 1.22

View File

@@ -19,14 +19,14 @@ func NewSetting(name string, defaultValue string) Setting {
} }
func initSettings(settings *DbTable[string, Setting]) { func initSettings(settings *DbTable[string, Setting]) {
addSettingIfNotExists(NewSetting("theme", "white"), settings) addSettingIfNotExists("theme", "white", settings)
addSettingIfNotExists(NewSetting("order", "title"), settings) addSettingIfNotExists("order", "title", settings)
} }
func addSettingIfNotExists(setting Setting, settings *DbTable[string, Setting]) { func addSettingIfNotExists(name string, value string, settings *DbTable[string, Setting]) {
_, exists := settings.Get(setting.Name) _, exists := settings.Get(name)
if !exists { if !exists {
settings.Set(setting.Name, setting) settings.Set(name, NewSetting(name, value))
} }
} }

View File

@@ -4,11 +4,11 @@ import (
"cmp" "cmp"
_ "embed" _ "embed"
"fmt" "fmt"
"github.com/pablu23/mangaGetter/internal/database"
"github.com/pablu23/mangaGetter/internal/view"
"golang.org/x/text/cases" "golang.org/x/text/cases"
"golang.org/x/text/language" "golang.org/x/text/language"
"html/template" "html/template"
"mangaGetter/internal/database"
"mangaGetter/internal/view"
"net/http" "net/http"
"slices" "slices"
"strconv" "strconv"

View File

@@ -4,10 +4,10 @@ import (
"bytes" "bytes"
_ "embed" _ "embed"
"fmt" "fmt"
"github.com/pablu23/mangaGetter/internal/database"
"github.com/pablu23/mangaGetter/internal/provider"
"github.com/pablu23/mangaGetter/internal/view"
"io" "io"
"mangaGetter/internal/database"
"mangaGetter/internal/provider"
"mangaGetter/internal/view"
"net/http" "net/http"
"path/filepath" "path/filepath"
"strconv" "strconv"

View File

@@ -1,6 +1,6 @@
package view package view
import "mangaGetter/internal/database" import "github.com/pablu23/mangaGetter/internal/database"
type Image struct { type Image struct {
Path string Path string