refactor: extract gametime package, replace fmt.Printf with zap logging

Move time utilities (TimeAdjusted, TimeMidnight, TimeWeekStart, TimeWeekNext,
TimeGameAbsolute) from channelserver into common/gametime to break the
inappropriate dependency where signserver, entranceserver, and api imported
the 38K-line channelserver package just for time functions.

Replace all fmt.Printf debug logging in sys_session.go and handlers_object.go
with structured zap logging for consistent observability.
This commit is contained in:
Houmgaor
2026-02-17 17:54:51 +01:00
parent fb3e86f429
commit d2b5bb72f8
14 changed files with 258 additions and 264 deletions

View File

@@ -5,27 +5,8 @@ import (
)
// TestClientContext_Exists verifies that the ClientContext type exists
// and can be instantiated, even though it's currently unused.
// and can be instantiated.
func TestClientContext_Exists(t *testing.T) {
// This test documents that ClientContext is currently an empty struct
// and is marked as unused in the codebase.
var ctx ClientContext
// Verify it's a zero-size struct
_ = ctx
// Just verify we can create it
ctx2 := ClientContext{}
_ = ctx2
}
// TestClientContext_IsEmpty verifies that ClientContext has no fields
func TestClientContext_IsEmpty(t *testing.T) {
// The struct should be empty as marked by the comment "// Unused"
// This test documents the current state of the struct
ctx := ClientContext{}
_ = ctx
// If fields are added in the future, this test will need to be updated
// Currently it's just a placeholder/documentation test
}