docs: add doc.go files and godoc comments to all packages

Add package-level documentation (doc.go) to all 22 first-party
packages and godoc comments to ~150 previously undocumented
exported symbols across common/, network/, and server/.
This commit is contained in:
Houmgaor
2026-02-18 21:39:13 +01:00
parent b9cb274ced
commit 2bd5f98f32
81 changed files with 342 additions and 0 deletions

View File

@@ -7,6 +7,7 @@ import (
"time"
)
// Course represents an active subscription course with its ID and expiry time.
type Course struct {
ID uint16
Expiry time.Time
@@ -39,10 +40,12 @@ var aliases = map[uint16][]string{
// 30 = Real NetCafe course
}
// Aliases returns the human-readable names for this course (e.g. "HunterLife", "HL").
func (c Course) Aliases() []string {
return aliases[c.ID]
}
// Courses returns all 32 possible course slots with zero-value expiry times.
func Courses() []Course {
courses := make([]Course, 32)
for i := range courses {
@@ -51,6 +54,7 @@ func Courses() []Course {
return courses
}
// Value returns the bitmask value for this course (2^ID).
func (c Course) Value() uint32 {
return uint32(math.Pow(2, float64(c.ID)))
}