From 0815b20b76ab874ff34a433b72fc0b4b0682774d Mon Sep 17 00:00:00 2001 From: James Shubin Date: Wed, 21 Feb 2018 22:29:14 -0500 Subject: [PATCH] lang: funcs: Fix up some old comments Woops, bad copy-paste issues. --- lang/funcs/core/random1_func.go | 4 ++-- lang/funcs/facts/core/hostname_fact.go | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lang/funcs/core/random1_func.go b/lang/funcs/core/random1_func.go index 04c24a0b..f5bf47e1 100644 --- a/lang/funcs/core/random1_func.go +++ b/lang/funcs/core/random1_func.go @@ -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 diff --git a/lang/funcs/facts/core/hostname_fact.go b/lang/funcs/facts/core/hostname_fact.go index 1d0bd3c8..88926700 100644 --- a/lang/funcs/facts/core/hostname_fact.go +++ b/lang/funcs/facts/core/hostname_fact.go @@ -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