refactor(config): rename package _config to config with cfg alias

The config package used `package _config` with a leading underscore,
which is unconventional in Go. Rename to `package config` (matching the
directory name) and use `cfg` as the standard import alias across all
93 importing files.
This commit is contained in:
Houmgaor
2026-02-21 13:20:15 +01:00
parent ad73f2fb55
commit f17cb96b52
98 changed files with 719 additions and 719 deletions

View File

@@ -3,7 +3,7 @@ package network
import (
"encoding/hex"
"errors"
"erupe-ce/config"
cfg "erupe-ce/config"
"erupe-ce/network/crypto"
"io"
"net"
@@ -26,7 +26,7 @@ type Conn interface {
type CryptConn struct {
logger *zap.Logger
conn net.Conn
realClientMode _config.Mode
realClientMode cfg.Mode
readKeyRot uint32
sendKeyRot uint32
sentPackets int32
@@ -35,7 +35,7 @@ type CryptConn struct {
}
// NewCryptConn creates a new CryptConn with proper default values.
func NewCryptConn(conn net.Conn, mode _config.Mode, logger *zap.Logger) *CryptConn {
func NewCryptConn(conn net.Conn, mode cfg.Mode, logger *zap.Logger) *CryptConn {
if logger == nil {
logger = zap.NewNop()
}
@@ -69,7 +69,7 @@ func (cc *CryptConn) ReadPacket() ([]byte, error) {
var encryptedPacketBody []byte
// Don't know when support for this was added, works in Forward.4, doesn't work in Season 6.0
if cc.realClientMode < _config.F1 {
if cc.realClientMode < cfg.F1 {
encryptedPacketBody = make([]byte, cph.DataSize)
} else {
encryptedPacketBody = make([]byte, uint32(cph.DataSize)+(uint32(cph.Pf0-0x03)*0x1000))