fix: change appname to neoirc, default DB to /var/lib/neoirc/state.db #45
Reference in New Issue
Block a user
Delete Branch "fix/issue-44-default-db-path"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Changes
Appnamefrom"chat"to"neoirc"incmd/chatd/main.goDBURLfromfile:./data.db?_journal_mode=WALtofile:///var/lib/neoirc/state.db?_journal_mode=WALin bothinternal/config/config.goand theinternal/db/db.gofallback/var/lib/neoirc/directory in Dockerfile with proper ownership for thechatuser.envexample, docker run example, SQLite backup/location docs)data.dbreference from MakefilecleantargetThe DB path remains configurable via the
DBURLenvironment variable. No Go packages were renamed.Closes #44
✅ Review: PASS
Reviewed PR #45 (closes issue #44) — all requirements met.
Checklist
appname→"neoirc"(string constant only)cmd/chatd/main.goasAppnamevar. No Go package renames — all packages remainmain,config,db, etc.file:///var/lib/neoirc/state.db?_journal_mode=WALinternal/config/config.go(viper default) andinternal/db/db.go(fallback)viper.AutomaticEnv()+viper.GetString("DBURL")— env var override works as before/var/lib/neoirc/with proper permissionsmkdir -p /var/lib/neoirc && chown chat:chat /var/lib/neoircin final stage.envexample, Docker run command, binary run output, backup command, SQLite location — all updated*_test.gofiles changed.golangci.ymluntoucheddocker build .passesFiles Changed (6)
Dockerfile— creates/var/lib/neoirc/with chat:chat ownershipMakefile— removes staledata.dbfrom clean targetREADME.md— all documentation references updatedcmd/chatd/main.go—Appnameconstant →"neoirc"internal/config/config.go— default DBURL updatedinternal/db/db.go— fallback DBURL updatedClean, minimal, correct. Ready to merge.