From f8500ea5aba73bec2fcfc395d0b8079dfce0dc2b Mon Sep 17 00:00:00 2001 From: Abdhilahi Wabwire <124460109+AbdhilahiRWabwire@users.noreply.github.com> Date: Tue, 14 Jan 2025 03:00:23 -0700 Subject: [PATCH] Restruture Project --- .github/workflows/go.yml | 15 +++++++-- .gitignore | 26 ++++++++++++++++ README.md | 2 +- data-interchange.Dockerfile | 8 +++-- server/go.mod => go.mod | 0 server/.gitignore | 31 ------------------- .../command/argument_lexer.go | 0 .../command/argument_parser.go | 0 .../command/argument_tokenizer.go | 0 .../source => source}/command/user_input.go | 0 {server/source => source}/main.go | 0 .../network/serve_application.go | 0 .../utility/print_version.go | 0 {server/source => source}/yaml/yaml.go | 0 {server/test => test}/test.go | 0 web/.gitignore | 5 +++ {server => web}/CHANGELOG.md | 0 {source => web}/index.html | 0 {source => web}/main.js | 0 {source => web}/markup/accordian.html | 0 {source => web}/markup/alert-dialogue.html | 0 {source => web}/markup/alert.html | 0 {source => web}/markup/breadcrumb.html | 0 {source => web}/markup/button.html | 0 {source => web}/markup/carousel.html | 0 {source => web}/markup/checkbox.html | 0 {source => web}/markup/combobox.html | 0 {source => web}/markup/date-picker.html | 0 {source => web}/markup/disclosure.html | 0 {source => web}/markup/menu-button.html | 0 {source => web}/markup/meter.html | 0 {source => web}/markup/modal-dialogue.html | 0 {source => web}/markup/navigation-menu.html | 0 {source => web}/markup/radio-group.html | 0 {source => web}/markup/switch.html | 0 {source => web}/markup/tabs.html | 0 {source => web}/markup/toolbar.html | 0 {source => web}/styles/accordian.css | 0 {source => web}/styles/alert-dialogue.css | 0 {source => web}/styles/alert.css | 0 {source => web}/styles/breadcrumb.css | 0 {source => web}/styles/button.css | 0 {source => web}/styles/carousel.css | 0 {source => web}/styles/checkbox.css | 0 {source => web}/styles/combobox.css | 0 {source => web}/styles/date-picker.css | 0 {source => web}/styles/disclosure.css | 0 {source => web}/styles/menu-button.css | 0 {source => web}/styles/meter.css | 0 {source => web}/styles/modal-dialogue.css | 0 {source => web}/styles/navigation-menu.css | 0 {source => web}/styles/radio-group.css | 0 {source => web}/styles/switch.css | 0 {source => web}/styles/tabs.css | 0 {source => web}/styles/toolbar.css | 0 {source => web}/theme/theme.css | 0 {source => web}/widgets/accordian.js | 0 {source => web}/widgets/alert.js | 0 {source => web}/widgets/alert_dialogue.js | 0 {source => web}/widgets/button.js | 0 {source => web}/widgets/carousel.js | 0 {source => web}/widgets/checkbox.js | 0 {source => web}/widgets/combobox.js | 0 {source => web}/widgets/date_picker.js | 0 {source => web}/widgets/disclosure.js | 0 {source => web}/widgets/menu_button.js | 0 {source => web}/widgets/meter.js | 0 {source => web}/widgets/modal_dialogue.js | 0 {source => web}/widgets/navigation_menu.js | 0 {source => web}/widgets/radio_group.js | 0 {source => web}/widgets/switch.js | 0 {source => web}/widgets/tabs.js | 0 {source => web}/widgets/toolbar.js | 0 73 files changed, 50 insertions(+), 37 deletions(-) rename server/go.mod => go.mod (100%) delete mode 100755 server/.gitignore rename {server/source => source}/command/argument_lexer.go (100%) rename {server/source => source}/command/argument_parser.go (100%) rename {server/source => source}/command/argument_tokenizer.go (100%) rename {server/source => source}/command/user_input.go (100%) rename {server/source => source}/main.go (100%) rename {server/source => source}/network/serve_application.go (100%) rename {server/source => source}/utility/print_version.go (100%) rename {server/source => source}/yaml/yaml.go (100%) rename {server/test => test}/test.go (100%) create mode 100755 web/.gitignore rename {server => web}/CHANGELOG.md (100%) rename {source => web}/index.html (100%) rename {source => web}/main.js (100%) rename {source => web}/markup/accordian.html (100%) rename {source => web}/markup/alert-dialogue.html (100%) rename {source => web}/markup/alert.html (100%) rename {source => web}/markup/breadcrumb.html (100%) rename {source => web}/markup/button.html (100%) rename {source => web}/markup/carousel.html (100%) rename {source => web}/markup/checkbox.html (100%) rename {source => web}/markup/combobox.html (100%) rename {source => web}/markup/date-picker.html (100%) rename {source => web}/markup/disclosure.html (100%) rename {source => web}/markup/menu-button.html (100%) rename {source => web}/markup/meter.html (100%) rename {source => web}/markup/modal-dialogue.html (100%) rename {source => web}/markup/navigation-menu.html (100%) rename {source => web}/markup/radio-group.html (100%) rename {source => web}/markup/switch.html (100%) rename {source => web}/markup/tabs.html (100%) rename {source => web}/markup/toolbar.html (100%) rename {source => web}/styles/accordian.css (100%) rename {source => web}/styles/alert-dialogue.css (100%) rename {source => web}/styles/alert.css (100%) rename {source => web}/styles/breadcrumb.css (100%) rename {source => web}/styles/button.css (100%) rename {source => web}/styles/carousel.css (100%) rename {source => web}/styles/checkbox.css (100%) rename {source => web}/styles/combobox.css (100%) rename {source => web}/styles/date-picker.css (100%) rename {source => web}/styles/disclosure.css (100%) rename {source => web}/styles/menu-button.css (100%) rename {source => web}/styles/meter.css (100%) rename {source => web}/styles/modal-dialogue.css (100%) rename {source => web}/styles/navigation-menu.css (100%) rename {source => web}/styles/radio-group.css (100%) rename {source => web}/styles/switch.css (100%) rename {source => web}/styles/tabs.css (100%) rename {source => web}/styles/toolbar.css (100%) rename {source => web}/theme/theme.css (100%) rename {source => web}/widgets/accordian.js (100%) rename {source => web}/widgets/alert.js (100%) rename {source => web}/widgets/alert_dialogue.js (100%) rename {source => web}/widgets/button.js (100%) rename {source => web}/widgets/carousel.js (100%) rename {source => web}/widgets/checkbox.js (100%) rename {source => web}/widgets/combobox.js (100%) rename {source => web}/widgets/date_picker.js (100%) rename {source => web}/widgets/disclosure.js (100%) rename {source => web}/widgets/menu_button.js (100%) rename {source => web}/widgets/meter.js (100%) rename {source => web}/widgets/modal_dialogue.js (100%) rename {source => web}/widgets/navigation_menu.js (100%) rename {source => web}/widgets/radio_group.js (100%) rename {source => web}/widgets/switch.js (100%) rename {source => web}/widgets/tabs.js (100%) rename {source => web}/widgets/toolbar.js (100%) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index e93e283..7e95c8d 100755 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -25,9 +25,18 @@ jobs: - name: Environment Information run: go env - + + - name: List Packages or Modules + run: go list + - name: Report Mistakes in Package - run: go vet ./server/source/main.go + run: go vet + + - name: Update Package to New APIs + run: go fix + + - name: Format Package + run: go fmt - name: Compile Package and Dependencies - run: GOOS=linux GOARCH=amd64 go build -o ./binary/htdinet ./server/source/main.go + run: GOOS=linux GOARCH=amd64 go build -o ./binary/htdinet ./source/main.go diff --git a/.gitignore b/.gitignore index 489d44f..81e3303 100755 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,29 @@ .build/ build/ **/build/ + +# If you prefer the allow list template instead of the deny list, see community template: +# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore +# +# Binaries for programs and plugins +*.exe +*.exe~ +*.dll +*.so +*.dylib + +# Test binary, built with `go test -c` +*.test + +# Output of the go coverage tool +*.out + +# Dependency directories (remove the comment below to include it) +# vendor/ + +# Go workspace file +go.work +go.work.sum + +# env file +.env \ No newline at end of file diff --git a/README.md b/README.md index f84ca35..85ab0fc 100755 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ Data Interchange is a Network Application Programming Interface Development Plat ```shell git clone -GOOS=linux GOARCH=amd64 go build -o ./binary/htdinet ./server/source/main.go +GOOS=linux GOARCH=amd64 go build -o ./binary/htdinet ./source/main.go ``` ## Install Web Server diff --git a/data-interchange.Dockerfile b/data-interchange.Dockerfile index 8ad6d9b..cdc26dc 100755 --- a/data-interchange.Dockerfile +++ b/data-interchange.Dockerfile @@ -14,5 +14,9 @@ RUN echo 'export PATH="$PATH:/usr/bin/go/bin"' >> ~/.bashrc && echo 'export PATH RUN wget https://go.dev/dl/go1.23.4.linux-amd64.tar.gz && tar --extract --file ./*.gz --verbose RUN mv ./go1.23.4.linux-amd64/go /usr/bin RUN go env -RUN go vet ./server/source/main.go -RUN GOOS=linux GOARCH=amd64 go build -o ./binary/htdinet ./server/source/main.go +RUN go list +RUN go vet +RUN go fix +RUN go fmt +RUN go vet +RUN GOOS=linux GOARCH=amd64 go build -o ./binary/htdinet ./source/main.go diff --git a/server/go.mod b/go.mod similarity index 100% rename from server/go.mod rename to go.mod diff --git a/server/.gitignore b/server/.gitignore deleted file mode 100755 index 81e3303..0000000 --- a/server/.gitignore +++ /dev/null @@ -1,31 +0,0 @@ -# Build Directories -/binary -.build/ -build/ -**/build/ - -# If you prefer the allow list template instead of the deny list, see community template: -# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore -# -# Binaries for programs and plugins -*.exe -*.exe~ -*.dll -*.so -*.dylib - -# Test binary, built with `go test -c` -*.test - -# Output of the go coverage tool -*.out - -# Dependency directories (remove the comment below to include it) -# vendor/ - -# Go workspace file -go.work -go.work.sum - -# env file -.env \ No newline at end of file diff --git a/server/source/command/argument_lexer.go b/source/command/argument_lexer.go similarity index 100% rename from server/source/command/argument_lexer.go rename to source/command/argument_lexer.go diff --git a/server/source/command/argument_parser.go b/source/command/argument_parser.go similarity index 100% rename from server/source/command/argument_parser.go rename to source/command/argument_parser.go diff --git a/server/source/command/argument_tokenizer.go b/source/command/argument_tokenizer.go similarity index 100% rename from server/source/command/argument_tokenizer.go rename to source/command/argument_tokenizer.go diff --git a/server/source/command/user_input.go b/source/command/user_input.go similarity index 100% rename from server/source/command/user_input.go rename to source/command/user_input.go diff --git a/server/source/main.go b/source/main.go similarity index 100% rename from server/source/main.go rename to source/main.go diff --git a/server/source/network/serve_application.go b/source/network/serve_application.go similarity index 100% rename from server/source/network/serve_application.go rename to source/network/serve_application.go diff --git a/server/source/utility/print_version.go b/source/utility/print_version.go similarity index 100% rename from server/source/utility/print_version.go rename to source/utility/print_version.go diff --git a/server/source/yaml/yaml.go b/source/yaml/yaml.go similarity index 100% rename from server/source/yaml/yaml.go rename to source/yaml/yaml.go diff --git a/server/test/test.go b/test/test.go similarity index 100% rename from server/test/test.go rename to test/test.go diff --git a/web/.gitignore b/web/.gitignore new file mode 100755 index 0000000..489d44f --- /dev/null +++ b/web/.gitignore @@ -0,0 +1,5 @@ +# Build Directories +/binary +.build/ +build/ +**/build/ diff --git a/server/CHANGELOG.md b/web/CHANGELOG.md similarity index 100% rename from server/CHANGELOG.md rename to web/CHANGELOG.md diff --git a/source/index.html b/web/index.html similarity index 100% rename from source/index.html rename to web/index.html diff --git a/source/main.js b/web/main.js similarity index 100% rename from source/main.js rename to web/main.js diff --git a/source/markup/accordian.html b/web/markup/accordian.html similarity index 100% rename from source/markup/accordian.html rename to web/markup/accordian.html diff --git a/source/markup/alert-dialogue.html b/web/markup/alert-dialogue.html similarity index 100% rename from source/markup/alert-dialogue.html rename to web/markup/alert-dialogue.html diff --git a/source/markup/alert.html b/web/markup/alert.html similarity index 100% rename from source/markup/alert.html rename to web/markup/alert.html diff --git a/source/markup/breadcrumb.html b/web/markup/breadcrumb.html similarity index 100% rename from source/markup/breadcrumb.html rename to web/markup/breadcrumb.html diff --git a/source/markup/button.html b/web/markup/button.html similarity index 100% rename from source/markup/button.html rename to web/markup/button.html diff --git a/source/markup/carousel.html b/web/markup/carousel.html similarity index 100% rename from source/markup/carousel.html rename to web/markup/carousel.html diff --git a/source/markup/checkbox.html b/web/markup/checkbox.html similarity index 100% rename from source/markup/checkbox.html rename to web/markup/checkbox.html diff --git a/source/markup/combobox.html b/web/markup/combobox.html similarity index 100% rename from source/markup/combobox.html rename to web/markup/combobox.html diff --git a/source/markup/date-picker.html b/web/markup/date-picker.html similarity index 100% rename from source/markup/date-picker.html rename to web/markup/date-picker.html diff --git a/source/markup/disclosure.html b/web/markup/disclosure.html similarity index 100% rename from source/markup/disclosure.html rename to web/markup/disclosure.html diff --git a/source/markup/menu-button.html b/web/markup/menu-button.html similarity index 100% rename from source/markup/menu-button.html rename to web/markup/menu-button.html diff --git a/source/markup/meter.html b/web/markup/meter.html similarity index 100% rename from source/markup/meter.html rename to web/markup/meter.html diff --git a/source/markup/modal-dialogue.html b/web/markup/modal-dialogue.html similarity index 100% rename from source/markup/modal-dialogue.html rename to web/markup/modal-dialogue.html diff --git a/source/markup/navigation-menu.html b/web/markup/navigation-menu.html similarity index 100% rename from source/markup/navigation-menu.html rename to web/markup/navigation-menu.html diff --git a/source/markup/radio-group.html b/web/markup/radio-group.html similarity index 100% rename from source/markup/radio-group.html rename to web/markup/radio-group.html diff --git a/source/markup/switch.html b/web/markup/switch.html similarity index 100% rename from source/markup/switch.html rename to web/markup/switch.html diff --git a/source/markup/tabs.html b/web/markup/tabs.html similarity index 100% rename from source/markup/tabs.html rename to web/markup/tabs.html diff --git a/source/markup/toolbar.html b/web/markup/toolbar.html similarity index 100% rename from source/markup/toolbar.html rename to web/markup/toolbar.html diff --git a/source/styles/accordian.css b/web/styles/accordian.css similarity index 100% rename from source/styles/accordian.css rename to web/styles/accordian.css diff --git a/source/styles/alert-dialogue.css b/web/styles/alert-dialogue.css similarity index 100% rename from source/styles/alert-dialogue.css rename to web/styles/alert-dialogue.css diff --git a/source/styles/alert.css b/web/styles/alert.css similarity index 100% rename from source/styles/alert.css rename to web/styles/alert.css diff --git a/source/styles/breadcrumb.css b/web/styles/breadcrumb.css similarity index 100% rename from source/styles/breadcrumb.css rename to web/styles/breadcrumb.css diff --git a/source/styles/button.css b/web/styles/button.css similarity index 100% rename from source/styles/button.css rename to web/styles/button.css diff --git a/source/styles/carousel.css b/web/styles/carousel.css similarity index 100% rename from source/styles/carousel.css rename to web/styles/carousel.css diff --git a/source/styles/checkbox.css b/web/styles/checkbox.css similarity index 100% rename from source/styles/checkbox.css rename to web/styles/checkbox.css diff --git a/source/styles/combobox.css b/web/styles/combobox.css similarity index 100% rename from source/styles/combobox.css rename to web/styles/combobox.css diff --git a/source/styles/date-picker.css b/web/styles/date-picker.css similarity index 100% rename from source/styles/date-picker.css rename to web/styles/date-picker.css diff --git a/source/styles/disclosure.css b/web/styles/disclosure.css similarity index 100% rename from source/styles/disclosure.css rename to web/styles/disclosure.css diff --git a/source/styles/menu-button.css b/web/styles/menu-button.css similarity index 100% rename from source/styles/menu-button.css rename to web/styles/menu-button.css diff --git a/source/styles/meter.css b/web/styles/meter.css similarity index 100% rename from source/styles/meter.css rename to web/styles/meter.css diff --git a/source/styles/modal-dialogue.css b/web/styles/modal-dialogue.css similarity index 100% rename from source/styles/modal-dialogue.css rename to web/styles/modal-dialogue.css diff --git a/source/styles/navigation-menu.css b/web/styles/navigation-menu.css similarity index 100% rename from source/styles/navigation-menu.css rename to web/styles/navigation-menu.css diff --git a/source/styles/radio-group.css b/web/styles/radio-group.css similarity index 100% rename from source/styles/radio-group.css rename to web/styles/radio-group.css diff --git a/source/styles/switch.css b/web/styles/switch.css similarity index 100% rename from source/styles/switch.css rename to web/styles/switch.css diff --git a/source/styles/tabs.css b/web/styles/tabs.css similarity index 100% rename from source/styles/tabs.css rename to web/styles/tabs.css diff --git a/source/styles/toolbar.css b/web/styles/toolbar.css similarity index 100% rename from source/styles/toolbar.css rename to web/styles/toolbar.css diff --git a/source/theme/theme.css b/web/theme/theme.css similarity index 100% rename from source/theme/theme.css rename to web/theme/theme.css diff --git a/source/widgets/accordian.js b/web/widgets/accordian.js similarity index 100% rename from source/widgets/accordian.js rename to web/widgets/accordian.js diff --git a/source/widgets/alert.js b/web/widgets/alert.js similarity index 100% rename from source/widgets/alert.js rename to web/widgets/alert.js diff --git a/source/widgets/alert_dialogue.js b/web/widgets/alert_dialogue.js similarity index 100% rename from source/widgets/alert_dialogue.js rename to web/widgets/alert_dialogue.js diff --git a/source/widgets/button.js b/web/widgets/button.js similarity index 100% rename from source/widgets/button.js rename to web/widgets/button.js diff --git a/source/widgets/carousel.js b/web/widgets/carousel.js similarity index 100% rename from source/widgets/carousel.js rename to web/widgets/carousel.js diff --git a/source/widgets/checkbox.js b/web/widgets/checkbox.js similarity index 100% rename from source/widgets/checkbox.js rename to web/widgets/checkbox.js diff --git a/source/widgets/combobox.js b/web/widgets/combobox.js similarity index 100% rename from source/widgets/combobox.js rename to web/widgets/combobox.js diff --git a/source/widgets/date_picker.js b/web/widgets/date_picker.js similarity index 100% rename from source/widgets/date_picker.js rename to web/widgets/date_picker.js diff --git a/source/widgets/disclosure.js b/web/widgets/disclosure.js similarity index 100% rename from source/widgets/disclosure.js rename to web/widgets/disclosure.js diff --git a/source/widgets/menu_button.js b/web/widgets/menu_button.js similarity index 100% rename from source/widgets/menu_button.js rename to web/widgets/menu_button.js diff --git a/source/widgets/meter.js b/web/widgets/meter.js similarity index 100% rename from source/widgets/meter.js rename to web/widgets/meter.js diff --git a/source/widgets/modal_dialogue.js b/web/widgets/modal_dialogue.js similarity index 100% rename from source/widgets/modal_dialogue.js rename to web/widgets/modal_dialogue.js diff --git a/source/widgets/navigation_menu.js b/web/widgets/navigation_menu.js similarity index 100% rename from source/widgets/navigation_menu.js rename to web/widgets/navigation_menu.js diff --git a/source/widgets/radio_group.js b/web/widgets/radio_group.js similarity index 100% rename from source/widgets/radio_group.js rename to web/widgets/radio_group.js diff --git a/source/widgets/switch.js b/web/widgets/switch.js similarity index 100% rename from source/widgets/switch.js rename to web/widgets/switch.js diff --git a/source/widgets/tabs.js b/web/widgets/tabs.js similarity index 100% rename from source/widgets/tabs.js rename to web/widgets/tabs.js diff --git a/source/widgets/toolbar.js b/web/widgets/toolbar.js similarity index 100% rename from source/widgets/toolbar.js rename to web/widgets/toolbar.js