diff --git a/.air.toml b/.air.toml deleted file mode 100644 index e6e0dbb..0000000 --- a/.air.toml +++ /dev/null @@ -1,52 +0,0 @@ -root = "." -testdata_dir = "testdata" -tmp_dir = "tmp" - -[build] - args_bin = [] - bin = "webapp" - cmd = "make build" - delay = 1000 - exclude_dir = ["assets", "pages", "static", "views", "public", "tmp", "vendor", "testdata"] - exclude_file = [] - exclude_regex = ["_test.go"] - exclude_unchanged = false - follow_symlink = false - full_bin = "" - include_dir = [] - include_ext = ["go", "tpl", "tmpl", "html", "css", "js"] - include_file = [] - kill_delay = "0s" - log = "build-errors.log" - poll = false - poll_interval = 0 - post_cmd = [] - pre_cmd = [] - rerun = false - rerun_delay = 500 - send_interrupt = false - stop_on_error = false - -[color] - app = "" - build = "yellow" - main = "magenta" - runner = "green" - watcher = "cyan" - -[log] - main_only = false - silent = false - time = false - -[misc] - clean_on_exit = false - -[proxy] - app_port = 7001 - enabled = true - proxy_port = 7002 - -[screen] - clear_on_rebuild = false - keep_scroll = true diff --git a/Makefile b/Makefile index 164342e..f149fb2 100644 --- a/Makefile +++ b/Makefile @@ -48,7 +48,7 @@ tailwind_install: sudo mv tailwindcss-linux-x64 /usr/local/bin/tailwindcss dev: all - go tool air -build.stop_on_error "true" + ./webapp coverage: go build -cover -o webapp diff --git a/README.md b/README.md index 3cf16ff..f09d064 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,3 @@ -# Go Web Starter Kit +# Twitter For Coders -This is a fairly complete web development starter kit in Go. It tries to -be as simple as possible without leaving out modern features like reactive UIs and database -migrations. A primary thing that's included is working authentication, since that's the main thing -holding people back when they first start, and also the easiest to get wrong. - -In fact, if you look at how I do it in this first version it is _WRONG_ so do not use this in -production yet until I can make it correct. Just use it to learn for now. - -## Getting Started - -Programmers hate duplication so if you want the instructions read the [index.md file in -pages](pages/index.md). +No idea what this will be, just mostly a demo/starter-kit for my Go course. diff --git a/admin/db.go b/admin/db.go index 356d415..89b7735 100644 --- a/admin/db.go +++ b/admin/db.go @@ -3,7 +3,7 @@ package admin import ( "reflect" "fmt" - "zedshaw.games/webapp/data" + "MY/webapp/data" _ "github.com/mattn/go-sqlite3" sq "github.com/Masterminds/squirrel" ) diff --git a/admin/handlers.go b/admin/handlers.go index 8539fcd..be693cc 100644 --- a/admin/handlers.go +++ b/admin/handlers.go @@ -5,9 +5,9 @@ import ( "reflect" "fmt" "github.com/gofiber/fiber/v2" - "zedshaw.games/webapp/data" - "zedshaw.games/webapp/api" - . "zedshaw.games/webapp/common" + "MY/webapp/data" + "MY/webapp/api" + . "MY/webapp/common" ) func GetApiTableIndex(c *fiber.Ctx) error { diff --git a/api/auth.go b/api/auth.go index fec99a6..15e980c 100644 --- a/api/auth.go +++ b/api/auth.go @@ -10,8 +10,8 @@ import ( sq "github.com/Masterminds/squirrel" "github.com/gofiber/fiber/v2/middleware/session" - "zedshaw.games/webapp/data" - "zedshaw.games/webapp/config" + "MY/webapp/data" + "MY/webapp/config" ) func IsAdmin(user *data.User) bool { diff --git a/api/handlers.go b/api/handlers.go index 7be1417..b419d82 100644 --- a/api/handlers.go +++ b/api/handlers.go @@ -9,8 +9,8 @@ import ( sq "github.com/Masterminds/squirrel" "github.com/gofiber/fiber/v2/middleware/session" - "zedshaw.games/webapp/data" - . "zedshaw.games/webapp/common" + "MY/webapp/data" + . "MY/webapp/common" ) var STORE *session.Store diff --git a/go.mod b/go.mod index c59a265..947cbdd 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ -module zedshaw.games/webapp +module MY/webapp -go 1.25 +go 1.24.2 require ( github.com/BurntSushi/toml v1.5.0 diff --git a/main.go b/main.go index dd8ba1a..f7f085f 100644 --- a/main.go +++ b/main.go @@ -12,10 +12,10 @@ import ( _ "github.com/mattn/go-sqlite3" recov "github.com/gofiber/fiber/v2/middleware/recover" - "zedshaw.games/webapp/api" - "zedshaw.games/webapp/data" - "zedshaw.games/webapp/config" - "zedshaw.games/webapp/admin" + "MY/webapp/api" + "MY/webapp/data" + "MY/webapp/config" + "MY/webapp/admin" ) func main() { diff --git a/pages/layouts/main.html b/pages/layouts/main.html index 7e4ca50..4b7e80a 100644 --- a/pages/layouts/main.html +++ b/pages/layouts/main.html @@ -5,12 +5,12 @@ - + - ZedShaw.games + Twitter For Coders
diff --git a/tests/admin_test.go b/tests/admin_test.go index 269e41c..60405bf 100644 --- a/tests/admin_test.go +++ b/tests/admin_test.go @@ -5,8 +5,8 @@ import ( "fmt" "reflect" "github.com/stretchr/testify/require" - "zedshaw.games/webapp/data" - "zedshaw.games/webapp/admin" + "MY/webapp/data" + "MY/webapp/admin" sq "github.com/Masterminds/squirrel" ) diff --git a/tests/admin_ui_tests.go b/tests/admin_ui_tests.go index 2a935a4..dd8b64c 100644 --- a/tests/admin_ui_tests.go +++ b/tests/admin_ui_tests.go @@ -3,7 +3,7 @@ package tests import ( "testing" // "github.com/stretchr/testify/require" - // "zedshaw.games/webapp/data" + // "MY/webapp/data" // sq "github.com/Masterminds/squirrel" ) diff --git a/tests/base_test.go b/tests/base_test.go index 8a7ec43..59a1825 100644 --- a/tests/base_test.go +++ b/tests/base_test.go @@ -3,7 +3,7 @@ package tests import ( "testing" // "github.com/stretchr/testify/require" - "zedshaw.games/webapp/data" + "MY/webapp/data" sq "github.com/Masterminds/squirrel" )