Skip to content

Commit 8ed3b61

Browse files
committed
update the doc
1 parent dcc31d9 commit 8ed3b61

File tree

2 files changed

+21
-7
lines changed

2 files changed

+21
-7
lines changed

doc.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
// Copyright 2021 xgfone
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
115
// Package gconf is an extensible and powerful go configuration manager.
216
//
317
// Features

opt_proxy.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,43 +50,43 @@ func (o *OptProxy) Set(value interface{}) (err error) {
5050
return o.config.Set(o.option.opt.Name, value)
5151
}
5252

53-
// OnUpdate resets the update callback function of the option and returns self.
53+
// OnUpdate resets the update callback function of the option and returns itself.
5454
func (o *OptProxy) OnUpdate(callback func(old, new interface{})) *OptProxy {
5555
o.option.opt.OnUpdate = callback
5656
return o
5757
}
5858

59-
// IsCli resets the cli flag of the option and returns self.
59+
// IsCli resets the cli flag of the option and returns itself.
6060
func (o *OptProxy) IsCli(cli bool) *OptProxy {
6161
o.option.opt.IsCli = cli
6262
return o
6363
}
6464

65-
// Aliases appends the aliases of the option and returns self.
65+
// Aliases appends the aliases of the option and returns itself.
6666
func (o *OptProxy) Aliases(aliases ...string) *OptProxy {
6767
o.option.opt = o.option.opt.As(aliases...)
6868
return o
6969
}
7070

71-
// Short resets the short name of the option and returns self.
71+
// Short resets the short name of the option and returns itself.
7272
func (o *OptProxy) Short(short string) *OptProxy {
7373
o.option.opt = o.option.opt.S(short)
7474
return o
7575
}
7676

77-
// Validators appends the validators of the option and returns self.
77+
// Validators appends the validators of the option and returns itself.
7878
func (o *OptProxy) Validators(validators ...Validator) *OptProxy {
7979
o.option.opt = o.option.opt.V(validators...)
8080
return o
8181
}
8282

83-
// Default resets the default value of the option and returns self.
83+
// Default resets the default value of the option and returns itself.
8484
func (o *OptProxy) Default(_default interface{}) *OptProxy {
8585
o.option.opt = o.option.opt.D(_default)
8686
return o
8787
}
8888

89-
// Parser resets the parser of the option and returns self.
89+
// Parser resets the parser of the option and returns itself.
9090
func (o *OptProxy) Parser(parser Parser) *OptProxy {
9191
o.option.opt = o.option.opt.P(parser)
9292
return o

0 commit comments

Comments
 (0)