From 7b615b3c71825b5b229b78509a16db37e1d3f38d Mon Sep 17 00:00:00 2001 From: Thomas Karpiniec Date: Wed, 23 Oct 2024 00:22:38 +1100 Subject: [PATCH] Simplify package names --- {broadcaster-radio => radio}/config.go | 0 {broadcaster-radio => radio}/files_machine.go | 0 {broadcaster-radio => radio}/gpio.go | 0 {broadcaster-radio => radio}/main.go | 0 {broadcaster-radio => radio}/status.go | 0 {broadcaster-server => server}/command.go | 0 {broadcaster-server => server}/config.go | 0 {broadcaster-server => server}/database.go | 0 {broadcaster-server => server}/files.go | 0 {broadcaster-server => server}/main.go | 8 ++++---- {broadcaster-server => server}/model.go | 0 {broadcaster-server => server}/playlist.go | 0 {broadcaster-server => server}/radio_sync.go | 0 {broadcaster-server => server}/session.go | 0 {broadcaster-server => server}/status.go | 0 .../templates/change_password.html | 0 {broadcaster-server => server}/templates/files.html | 0 {broadcaster-server => server}/templates/footer.html | 0 {broadcaster-server => server}/templates/header.html | 4 +--- {broadcaster-server => server}/templates/index.html | 0 {broadcaster-server => server}/templates/login.html | 0 {broadcaster-server => server}/templates/logout.html | 0 {broadcaster-server => server}/templates/playlist.html | 0 {broadcaster-server => server}/templates/playlists.html | 0 {broadcaster-server => server}/templates/radio.html | 0 {broadcaster-server => server}/templates/radios.html | 0 .../templates/radios.partial.html | 0 {broadcaster-server => server}/user.go | 0 {broadcaster-server => server}/web_sync.go | 0 29 files changed, 5 insertions(+), 7 deletions(-) rename {broadcaster-radio => radio}/config.go (100%) rename {broadcaster-radio => radio}/files_machine.go (100%) rename {broadcaster-radio => radio}/gpio.go (100%) rename {broadcaster-radio => radio}/main.go (100%) rename {broadcaster-radio => radio}/status.go (100%) rename {broadcaster-server => server}/command.go (100%) rename {broadcaster-server => server}/config.go (100%) rename {broadcaster-server => server}/database.go (100%) rename {broadcaster-server => server}/files.go (100%) rename {broadcaster-server => server}/main.go (99%) rename {broadcaster-server => server}/model.go (100%) rename {broadcaster-server => server}/playlist.go (100%) rename {broadcaster-server => server}/radio_sync.go (100%) rename {broadcaster-server => server}/session.go (100%) rename {broadcaster-server => server}/status.go (100%) rename {broadcaster-server => server}/templates/change_password.html (100%) rename {broadcaster-server => server}/templates/files.html (100%) rename {broadcaster-server => server}/templates/footer.html (100%) rename {broadcaster-server => server}/templates/header.html (96%) rename {broadcaster-server => server}/templates/index.html (100%) rename {broadcaster-server => server}/templates/login.html (100%) rename {broadcaster-server => server}/templates/logout.html (100%) rename {broadcaster-server => server}/templates/playlist.html (100%) rename {broadcaster-server => server}/templates/playlists.html (100%) rename {broadcaster-server => server}/templates/radio.html (100%) rename {broadcaster-server => server}/templates/radios.html (100%) rename {broadcaster-server => server}/templates/radios.partial.html (100%) rename {broadcaster-server => server}/user.go (100%) rename {broadcaster-server => server}/web_sync.go (100%) diff --git a/broadcaster-radio/config.go b/radio/config.go similarity index 100% rename from broadcaster-radio/config.go rename to radio/config.go diff --git a/broadcaster-radio/files_machine.go b/radio/files_machine.go similarity index 100% rename from broadcaster-radio/files_machine.go rename to radio/files_machine.go diff --git a/broadcaster-radio/gpio.go b/radio/gpio.go similarity index 100% rename from broadcaster-radio/gpio.go rename to radio/gpio.go diff --git a/broadcaster-radio/main.go b/radio/main.go similarity index 100% rename from broadcaster-radio/main.go rename to radio/main.go diff --git a/broadcaster-radio/status.go b/radio/status.go similarity index 100% rename from broadcaster-radio/status.go rename to radio/status.go diff --git a/broadcaster-server/command.go b/server/command.go similarity index 100% rename from broadcaster-server/command.go rename to server/command.go diff --git a/broadcaster-server/config.go b/server/config.go similarity index 100% rename from broadcaster-server/config.go rename to server/config.go diff --git a/broadcaster-server/database.go b/server/database.go similarity index 100% rename from broadcaster-server/database.go rename to server/database.go diff --git a/broadcaster-server/files.go b/server/files.go similarity index 100% rename from broadcaster-server/files.go rename to server/files.go diff --git a/broadcaster-server/main.go b/server/main.go similarity index 99% rename from broadcaster-server/main.go rename to server/main.go index 5a3cbb9..8f76cbf 100644 --- a/broadcaster-server/main.go +++ b/server/main.go @@ -2,7 +2,7 @@ package main import ( "bufio" - _ "embed" + "embed" "flag" "fmt" "golang.org/x/net/websocket" @@ -20,9 +20,9 @@ import ( const version = "v1.0.0" const formatString = "2006-01-02T15:04" -// //go:embed templates/* -//var content embed.FS -var content = os.DirFS("../broadcaster-server/") +//go:embed templates/* +var content embed.FS +//var content = os.DirFS("../broadcaster-server/") var config ServerConfig = NewServerConfig() diff --git a/broadcaster-server/model.go b/server/model.go similarity index 100% rename from broadcaster-server/model.go rename to server/model.go diff --git a/broadcaster-server/playlist.go b/server/playlist.go similarity index 100% rename from broadcaster-server/playlist.go rename to server/playlist.go diff --git a/broadcaster-server/radio_sync.go b/server/radio_sync.go similarity index 100% rename from broadcaster-server/radio_sync.go rename to server/radio_sync.go diff --git a/broadcaster-server/session.go b/server/session.go similarity index 100% rename from broadcaster-server/session.go rename to server/session.go diff --git a/broadcaster-server/status.go b/server/status.go similarity index 100% rename from broadcaster-server/status.go rename to server/status.go diff --git a/broadcaster-server/templates/change_password.html b/server/templates/change_password.html similarity index 100% rename from broadcaster-server/templates/change_password.html rename to server/templates/change_password.html diff --git a/broadcaster-server/templates/files.html b/server/templates/files.html similarity index 100% rename from broadcaster-server/templates/files.html rename to server/templates/files.html diff --git a/broadcaster-server/templates/footer.html b/server/templates/footer.html similarity index 100% rename from broadcaster-server/templates/footer.html rename to server/templates/footer.html diff --git a/broadcaster-server/templates/header.html b/server/templates/header.html similarity index 96% rename from broadcaster-server/templates/header.html rename to server/templates/header.html index ae59b16..49d734f 100644 --- a/broadcaster-server/templates/header.html +++ b/server/templates/header.html @@ -51,8 +51,6 @@ display: flex; flex-grow: 1; flex-direction: column; - /* border: black solid; */ - /* border-width: 0px 2px 0px 0px; */ text-align: center; } .menu-item { @@ -113,7 +111,7 @@ {{if .Username}}
Logged in as:
{{.Username}}
{{end}} - + {{end}}
diff --git a/broadcaster-server/templates/index.html b/server/templates/index.html similarity index 100% rename from broadcaster-server/templates/index.html rename to server/templates/index.html diff --git a/broadcaster-server/templates/login.html b/server/templates/login.html similarity index 100% rename from broadcaster-server/templates/login.html rename to server/templates/login.html diff --git a/broadcaster-server/templates/logout.html b/server/templates/logout.html similarity index 100% rename from broadcaster-server/templates/logout.html rename to server/templates/logout.html diff --git a/broadcaster-server/templates/playlist.html b/server/templates/playlist.html similarity index 100% rename from broadcaster-server/templates/playlist.html rename to server/templates/playlist.html diff --git a/broadcaster-server/templates/playlists.html b/server/templates/playlists.html similarity index 100% rename from broadcaster-server/templates/playlists.html rename to server/templates/playlists.html diff --git a/broadcaster-server/templates/radio.html b/server/templates/radio.html similarity index 100% rename from broadcaster-server/templates/radio.html rename to server/templates/radio.html diff --git a/broadcaster-server/templates/radios.html b/server/templates/radios.html similarity index 100% rename from broadcaster-server/templates/radios.html rename to server/templates/radios.html diff --git a/broadcaster-server/templates/radios.partial.html b/server/templates/radios.partial.html similarity index 100% rename from broadcaster-server/templates/radios.partial.html rename to server/templates/radios.partial.html diff --git a/broadcaster-server/user.go b/server/user.go similarity index 100% rename from broadcaster-server/user.go rename to server/user.go diff --git a/broadcaster-server/web_sync.go b/server/web_sync.go similarity index 100% rename from broadcaster-server/web_sync.go rename to server/web_sync.go -- 2.39.5