Open atc0005 opened 3 years ago
Optional methods to append to existing field content.
Example:
nagiosExitState.LongServiceOutput = fmt.Sprintf( "* Paths: %v%s"+ "* Recursive: %v%s"+ "* Plugin: %v%s", cfg.Paths(), nagios.CheckOutputEOL, cfg.Recursive(), nagios.CheckOutputEOL, cfg.Version(), nagios.CheckOutputEOL, )
Instead of having to perform an "is string not empty" check before adding to the variable later, a method such as nagiosExitState.AppendLongServiceOutput (or nagiosExitState.AppendLSO or ...) could be used to handle that sort of logic.
nagiosExitState.AppendLongServiceOutput
nagiosExitState.AppendLSO
Optional methods to append to existing field content.
Example:
Instead of having to perform an "is string not empty" check before adding to the variable later, a method such as
nagiosExitState.AppendLongServiceOutput
(ornagiosExitState.AppendLSO
or ...) could be used to handle that sort of logic.