Mining/pkg/mining/version.go
snider d61a8aff8b refactor: Remove unused code and fix nil dereference issues
- Remove unused exported functions from pkg/database (session tracking,
  bulk hashrate inserts, various query helpers)
- Remove unused exported functions from pkg/node (identity management,
  bundle operations, controller methods)
- Make internal-only functions unexported in config_manager.go and database.go
- Remove unused EventProfile* constants from events.go
- Add GetCommit() and GetBuildDate() to expose version.go variables
- Fix potential nil dereference issues flagged by Qodana:
  - Add nil checks for GetIdentity() in controller.go, transport.go, worker.go
  - Add nil checks for GetPeer() in peer_test.go
  - Add nil checks in worker_test.go

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31 09:24:12 +00:00

22 lines
348 B
Go

package mining
var (
version = "dev"
commit = "none"
date = "unknown"
)
// GetVersion returns the version of the application
func GetVersion() string {
return version
}
// GetCommit returns the git commit hash
func GetCommit() string {
return commit
}
// GetBuildDate returns the build date
func GetBuildDate() string {
return date
}