diff options
author | Ruben Pollan <meskio@sindominio.net> | 2019-02-04 23:23:16 +0100 |
---|---|---|
committer | Ruben Pollan <meskio@sindominio.net> | 2019-02-04 23:23:16 +0100 |
commit | b9ef49b51c6e2570ef3aae824ab44374997b6b25 (patch) | |
tree | 5fcfcc4931d35b72b1853dff005f0eaca25d00d4 /pkg/bitmask | |
parent | 51a4d191669aaf5e23ec4e1f61aab71419603003 (diff) |
[feat] add -disable-autostart flag and config
Make possible to disable the autostart configuration for the next run. I
can be done by configuring "DisableAustostart" to true in the
systra.json or by passing the '-disable-autostart' flag to the binary.
To make that possible I have rework how the Config struct work
separating the file configuration with the runtime configuration.
- Resolves: #100
Diffstat (limited to 'pkg/bitmask')
-rw-r--r-- | pkg/bitmask/autostart.go | 6 | ||||
-rw-r--r-- | pkg/bitmask/bitmaskd.go | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/pkg/bitmask/autostart.go b/pkg/bitmask/autostart.go index ebab428..32b931a 100644 --- a/pkg/bitmask/autostart.go +++ b/pkg/bitmask/autostart.go @@ -21,12 +21,12 @@ type Autostart interface { Enable() error } -type dummyAutostart struct{} +type DummyAutostart struct{} -func (a *dummyAutostart) Disable() error { +func (a *DummyAutostart) Disable() error { return nil } -func (a *dummyAutostart) Enable() error { +func (a *DummyAutostart) Enable() error { return nil } diff --git a/pkg/bitmask/bitmaskd.go b/pkg/bitmask/bitmaskd.go index 04b965c..a8c4e5d 100644 --- a/pkg/bitmask/bitmaskd.go +++ b/pkg/bitmask/bitmaskd.go @@ -40,5 +40,5 @@ func Init(printer *message.Printer) (Bitmask, error) { // NewAutostart creates a handler for the autostart of your platform func NewAutostart(appName string, iconPath string) Autostart { - return &dummyAutostart{} + return &DummyAutostart{} } |