go-ipfs-config: config: rename profile.Unapply to Revert
License: MIT Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
Łukasz Magiera committed
Nov 5, 2017 at 14:21 UTC
c2a74652fac692d1c9fd5d9071fc61439d2aa0d5
1 file changed
+5
-5
config/profile.go
+5
-5
@@ -5,8 +5,8 @@ type Transformer func(c *Config) error
5
6
// Profile applies some set of changes to the configuration
7
type Profile struct {
8
- Apply Transformer
9
- Unapply Transformer
8
+ Apply Transformer
9
+ Revert Transformer
10
}
11
12
// Profiles is a map holding configuration transformers. Docs are in docs/config.md
@@ -39,7 +39,7 @@ var Profiles = map[string]*Profile{
39
c.Discovery.MDNS.Enabled = false
40
return nil
41
},
42
- Unapply: func(c *Config) error {
42
+ Revert: func(c *Config) error {
43
c.Addresses.NoAnnounce = []string{}
44
c.Swarm.AddrFilters = []string{}
45
c.Discovery.MDNS.Enabled = true
@@ -60,7 +60,7 @@ var Profiles = map[string]*Profile{
60
c.Discovery.MDNS.Enabled = false
61
return nil
62
},
63
- Unapply: func(c *Config) error {
63
+ Revert: func(c *Config) error {
64
c.Addresses = addressesConfig()
65
66
c.Swarm.DisableNatPortMap = false
@@ -80,7 +80,7 @@ var Profiles = map[string]*Profile{
80
}
81
return nil
82
},
83
- Unapply: func(c *Config) error {
83
+ Revert: func(c *Config) error {
84
c.Datastore.Spec = DefaultDatastoreConfig().Spec
85
return nil
86
},