- 重构 sysconf 为文档模型 INI Parser 与 Config Framework - 强化 hosts 解析、插入校验、写回与异常输入处理 - 完善 StarCmd 生命周期、等待 API、流式输出与 IO 重定向 - 扩展跨平台文件时间、文件锁、内存、进程与网络能力 - 将 Windows 进程适配更新到 b612.me/wincmd v0.1.0 - 移除本地 wincmd/win32api replace,改用发布版依赖 - 将最低 Go 版本提升到 1.18 - 补充 hosts、sysconf、FileLock、StarCmd 与平台适配回归测试
29 lines
500 B
Go
29 lines
500 B
Go
package sysconf
|
|
|
|
import "strconv"
|
|
|
|
func (s *Section) Uint64(key string) uint64 {
|
|
v, _ := strconv.ParseUint(s.Get(key), 10, 64)
|
|
return v
|
|
}
|
|
|
|
func (s *Section) MustInt(key string) int {
|
|
return s.Int(key)
|
|
}
|
|
|
|
func (s *Section) MustInt64(key string) int64 {
|
|
return s.Int64(key)
|
|
}
|
|
|
|
func (s *Section) MustUint64(key string) uint64 {
|
|
return s.Uint64(key)
|
|
}
|
|
|
|
func (s *Section) MustBool(key string) bool {
|
|
return s.Bool(key)
|
|
}
|
|
|
|
func (s *Section) MustFloat64(key string) float64 {
|
|
return s.Float64(key)
|
|
}
|