Documentation ¶
Index ¶
Constants ¶
View Source
const Name = "clash"
Variables ¶
View Source
var ExecutableDir = getExecutableDir()
View Source
var Path = func() *path { homeDir, err := os.UserHomeDir() if err != nil { homeDir, _ = os.Getwd() } homeDir = P.Join(homeDir, ".config", Name) return &path{homeDir: homeDir, configFile: "config.yaml"} }()
Path is used to get the configuration path
Functions ¶
func ExtractZipFile ¶ added in v0.1.1
func InitResourcesIfNotExist ¶ added in v0.1.1
func InitResourcesIfNotExist()
func MakeRequest ¶
func MakeRequest(c *Config) *resty.Client
func ResolveExecutableResourcesDir ¶ added in v0.1.1
Types ¶
type Config ¶
type Config struct { ExternalController string `yaml:"external-controller" json:"external-controller"` ExternalUI string `yaml:"external-ui" json:"external-ui"` Secret string `yaml:"secret" json:"secret"` }
func ParseConfig ¶
func ParseWithPath ¶
Click to show internal directories.
Click to hide internal directories.