mirror of
https://github.com/xvzc/SpoofDPI.git
synced 2024-12-22 14:26:31 +00:00
refactor
This commit is contained in:
parent
cb122ff3da
commit
1581f9c4d1
@ -1,8 +1,8 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"sync"
|
||||
"runtime"
|
||||
"sync"
|
||||
)
|
||||
|
||||
type Config struct {
|
||||
@ -22,16 +22,16 @@ func InitConfig(port string, dns string, debug bool) error {
|
||||
once.Do(func() {
|
||||
|
||||
config = &Config{
|
||||
Port : port,
|
||||
DNS : dns,
|
||||
OS : runtime.GOOS,
|
||||
Debug : debug,
|
||||
Port: port,
|
||||
DNS: dns,
|
||||
OS: runtime.GOOS,
|
||||
Debug: debug,
|
||||
}
|
||||
})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func GetConfig() (*Config) {
|
||||
func GetConfig() *Config {
|
||||
return config
|
||||
}
|
||||
|
@ -5,7 +5,6 @@ import (
|
||||
"github.com/xvzc/SpoofDPI/config"
|
||||
)
|
||||
|
||||
|
||||
func PrintWelcome() {
|
||||
cyan := pterm.NewLettersFromStringWithStyle("Spoof", pterm.NewStyle(pterm.FgCyan))
|
||||
purple := pterm.NewLettersFromStringWithStyle("DPI", pterm.NewStyle(pterm.FgLightMagenta))
|
||||
|
Loading…
Reference in New Issue
Block a user