Compare commits

14 Commits

Author SHA1 Message Date
brian 7df6eb3bd5 adding back some supplementary files 2026-05-19 15:44:37 -06:00
brian fc0629090e starting over after doing some planning 2026-05-19 15:42:39 -06:00
brian 8f03b92bc4 wip: a list command 2026-05-12 21:05:34 -06:00
brian 66fc781260 wip: moving things around to logically group them 2026-05-12 21:05:03 -06:00
brian a7eaa45869 wip: a list command 2026-05-12 20:39:19 -06:00
brian 928a6024ad empty out changelog 2026-05-12 20:24:41 -06:00
brian 9b23688ee4 using Cobra for cli stuff 2026-05-09 09:59:42 -06:00
brian 3b5e133773 now reading mimetype, poorly 2026-05-09 09:41:49 -06:00
brian 96dd4949c2 finally getting info on files 2026-05-09 09:31:04 -06:00
brian 56fd10bccf only keep certain files for testing 2026-05-09 09:30:30 -06:00
brian 3d61c4fc4b updated dummy files 2026-05-09 09:29:33 -06:00
brian b6c4698fa9 must use full path for files 2026-05-09 08:49:51 -06:00
brian af4ab7d655 updating gitignore 2026-05-09 07:46:56 -06:00
brian 1c312f4358 adding a struct to manage file nodes 2026-05-07 19:25:57 -06:00
9 changed files with 39 additions and 73 deletions
-5
View File
@@ -1,5 +0,0 @@
# HTTP Settings
PORT=8080
# App Settings
STORAGE_PATH=files
+33 -10
View File
@@ -1,14 +1,21 @@
# ---> Go
# 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
#
### Project Specific
# Files
.env
.env.bak
.env.backup
.env.production
.forgent.json
.container_id
.session_id
*.log
docker-compose.override.yml
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib
drogobox
# Test binary, built with `go test -c`
@@ -17,13 +24,29 @@ drogobox
# Output of the go coverage tool, specifically when used with LiteIDE
*.out
# Dependency directories (remove the comment below to include it)
# vendor/
# Go workspace file
go.work
go.work.sum
# env file
.env
# Directories
### Editor Specific
# Files
/*.sublime-project
/*.sublime-workspace
# Directories
/.fleet
/.idea
/.nova
/.vscode
/.zed
### System Specific
# Files
.DS_Store
Thumbs.db
# Directories
__MACOSX
+3 -4
View File
@@ -9,16 +9,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- v1.1 German Translation
-
### Changed
- Use frontmatter title & description in each language version template
-
### Removed
- Trademark sign previously shown after the project description in version
0.3.0
-
## [0.0.0] - 2000-01-01
+3
View File
@@ -9,3 +9,6 @@ vet: fmt
build: vet
go build -o drogobox internal/app/main.go
test:
go test ./tests/...
View File
View File
-5
View File
@@ -1,5 +0,0 @@
module drogobox.com/drogobox
go 1.25.9
require github.com/joho/godotenv v1.5.1 // indirect
-2
View File
@@ -1,2 +0,0 @@
github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0=
github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4=
-47
View File
@@ -1,47 +0,0 @@
package main
import (
"fmt"
"log"
"os"
"github.com/joho/godotenv"
)
func resolveFileStorePath(file_store_path string) {
err := os.MkdirAll(file_store_path, os.ModePerm)
if err != nil {
log.Fatal(err)
}
}
func readFilesFromFileStorePath(file_store_path string) {
files, err := os.ReadDir(file_store_path)
if err != nil {
log.Fatal(err)
}
for _, file := range files {
if !file.IsDir() {
fmt.Println(file.Name())
}
}
}
func main() {
err := godotenv.Load()
if err != nil {
log.Fatal("Error loading .env file")
}
port := os.Getenv("PORT")
file_store_path := os.Getenv("STORAGE_PATH")
resolveFileStorePath(file_store_path)
fmt.Printf("in the future I will listen on port: %s\n", port)
fmt.Printf("Reading files from: %s\n", file_store_path)
readFilesFromFileStorePath(file_store_path)
}