lang: funcs: Fix up some old comments
Woops, bad copy-paste issues.
This commit is contained in:
@@ -94,7 +94,7 @@ func generate(length uint16) (string, error) {
|
|||||||
return output, nil
|
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 {
|
func (obj *Random1Func) Init(init *interfaces.Init) error {
|
||||||
obj.init = init
|
obj.init = init
|
||||||
obj.closeChan = make(chan struct{})
|
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 {
|
func (obj *Random1Func) Close() error {
|
||||||
close(obj.closeChan)
|
close(obj.closeChan)
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
@@ -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 {
|
func (obj *HostnameFact) Init(init *facts.Init) error {
|
||||||
obj.init = init
|
obj.init = init
|
||||||
obj.closeChan = make(chan struct{})
|
obj.closeChan = make(chan struct{})
|
||||||
return nil
|
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 {
|
func (obj *HostnameFact) Stream() error {
|
||||||
select {
|
select {
|
||||||
case obj.init.Output <- &types.StrValue{
|
case obj.init.Output <- &types.StrValue{
|
||||||
@@ -67,7 +67,7 @@ func (obj *HostnameFact) Stream() error {
|
|||||||
return nil
|
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 {
|
func (obj *HostnameFact) Close() error {
|
||||||
close(obj.closeChan)
|
close(obj.closeChan)
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
Reference in New Issue
Block a user