refactor(pkg): refactor Plugin
to make it easier to test
Writing the plugin's output string and exiting the program will no longer take place in the plugin status itself. It will only be done in the main program.
This commit is contained in:
parent
b3aa7dfcad
commit
5432360f0e
5 changed files with 30 additions and 19 deletions
cmd/sslcert
|
@ -215,9 +215,9 @@ func NewProgram() program.Program {
|
|||
return program
|
||||
}
|
||||
|
||||
// Terminate the monitoring check program.
|
||||
func (program *checkProgram) Done() {
|
||||
program.plugin.Done()
|
||||
// Return the program's output value.
|
||||
func (program *checkProgram) Output() *plugin.Plugin {
|
||||
return program.plugin
|
||||
}
|
||||
|
||||
// Check the values that were specified from the command line. Returns true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue