lang: funcs: Fix up some old comments

Woops, bad copy-paste issues.
This commit is contained in:
James Shubin
2018-02-21 22:29:14 -05:00
parent cffdb06181
commit 0815b20b76
2 changed files with 5 additions and 5 deletions

View File

@@ -94,7 +94,7 @@ func generate(length uint16) (string, error) {
return output, nil
}
// Init runs some startup code for this const.
// Init runs some startup code for this function.
func (obj *Random1Func) Init(init *interfaces.Init) error {
obj.init = init
obj.closeChan = make(chan struct{})
@@ -148,7 +148,7 @@ func (obj *Random1Func) Stream() error {
}
}
// Close runs some shutdown code for this const and turns off the stream.
// Close runs some shutdown code for this function and turns off the stream.
func (obj *Random1Func) Close() error {
close(obj.closeChan)
return nil

View File

@@ -46,14 +46,14 @@ func (obj *HostnameFact) Info() *facts.Info {
}
}
// Init runs some startup code for this const.
// Init runs some startup code for this fact.
func (obj *HostnameFact) Init(init *facts.Init) error {
obj.init = init
obj.closeChan = make(chan struct{})
return nil
}
// Stream returns the single value that this const has, and then closes.
// Stream returns the single value that this fact has, and then closes.
func (obj *HostnameFact) Stream() error {
select {
case obj.init.Output <- &types.StrValue{
@@ -67,7 +67,7 @@ func (obj *HostnameFact) Stream() error {
return nil
}
// Close runs some shutdown code for this const and turns off the stream.
// Close runs some shutdown code for this fact and turns off the stream.
func (obj *HostnameFact) Close() error {
close(obj.closeChan)
return nil