Skip to content
Snippets Groups Projects
Commit 29027de1 authored by Pratik Lagaskar's avatar Pratik Lagaskar
Browse files

main does not create bindings

parent aaab10c9
Branches
No related tags found
1 merge request!3Fixed entry point for the library
package alter
import (
"fmt"
)
var ErrShutdown = fmt.Errorf("vpnhole was shutdown gracefully")
type Config struct {
Addr string
SubscriptionsFilename string
Upstream string
Start func() error
Stop func() error
}
func (c Config) String() string {
return fmt.Sprintf("Config{Addr: %s, SubscriptionsFilename: %s, Upstream: %s}", c.Addr, c.SubscriptionsFilename, c.Upstream)
}
// parse the flags and return the config struct with the values
func ParseFlags() Config {
return Config{
Addr: ":53",
SubscriptionsFilename: "subs.list",
Upstream: "1.1.1.1:53",
Start: func() error {
return nil
},
Stop: func() error {
return nil
},
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment