Changed module name to github Path, and minor changes
This commit is contained in:
@@ -2,9 +2,9 @@ package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"mangaGetter/internal/database"
|
||||
"mangaGetter/internal/provider"
|
||||
"mangaGetter/internal/server"
|
||||
"github.com/pablu23/mangaGetter/internal/database"
|
||||
"github.com/pablu23/mangaGetter/internal/provider"
|
||||
"github.com/pablu23/mangaGetter/internal/server"
|
||||
"os"
|
||||
"os/exec"
|
||||
"os/signal"
|
||||
|
||||
@@ -19,14 +19,14 @@ func NewSetting(name string, defaultValue string) Setting {
|
||||
}
|
||||
|
||||
func initSettings(settings *DbTable[string, Setting]) {
|
||||
addSettingIfNotExists(NewSetting("theme", "white"), settings)
|
||||
addSettingIfNotExists(NewSetting("order", "title"), settings)
|
||||
addSettingIfNotExists("theme", "white", settings)
|
||||
addSettingIfNotExists("order", "title", settings)
|
||||
}
|
||||
|
||||
func addSettingIfNotExists(setting Setting, settings *DbTable[string, Setting]) {
|
||||
_, exists := settings.Get(setting.Name)
|
||||
func addSettingIfNotExists(name string, value string, settings *DbTable[string, Setting]) {
|
||||
_, exists := settings.Get(name)
|
||||
if !exists {
|
||||
settings.Set(setting.Name, setting)
|
||||
settings.Set(name, NewSetting(name, value))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,11 +4,11 @@ import (
|
||||
"cmp"
|
||||
_ "embed"
|
||||
"fmt"
|
||||
"github.com/pablu23/mangaGetter/internal/database"
|
||||
"github.com/pablu23/mangaGetter/internal/view"
|
||||
"golang.org/x/text/cases"
|
||||
"golang.org/x/text/language"
|
||||
"html/template"
|
||||
"mangaGetter/internal/database"
|
||||
"mangaGetter/internal/view"
|
||||
"net/http"
|
||||
"slices"
|
||||
"strconv"
|
||||
|
||||
@@ -4,10 +4,10 @@ import (
|
||||
"bytes"
|
||||
_ "embed"
|
||||
"fmt"
|
||||
"github.com/pablu23/mangaGetter/internal/database"
|
||||
"github.com/pablu23/mangaGetter/internal/provider"
|
||||
"github.com/pablu23/mangaGetter/internal/view"
|
||||
"io"
|
||||
"mangaGetter/internal/database"
|
||||
"mangaGetter/internal/provider"
|
||||
"mangaGetter/internal/view"
|
||||
"net/http"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package view
|
||||
|
||||
import "mangaGetter/internal/database"
|
||||
import "github.com/pablu23/mangaGetter/internal/database"
|
||||
|
||||
type Image struct {
|
||||
Path string
|
||||
|
||||
Reference in New Issue
Block a user