aboutsummaryrefslogtreecommitdiff
path: root/state/state.go
diff options
context:
space:
mode:
authorJulien Dessaux2020-02-22 11:57:50 +0100
committerJulien Dessaux2020-02-22 11:57:50 +0100
commitbcfaffac240d74cd79bec3c2a9d3c144d215b495 (patch)
treeedd2c5f1e011afee759970323042fcf35bf68962 /state/state.go
parentImproved tests for job package (diff)
downloadbareos-zabbix-check-bcfaffac240d74cd79bec3c2a9d3c144d215b495.tar.gz
bareos-zabbix-check-bcfaffac240d74cd79bec3c2a9d3c144d215b495.tar.bz2
bareos-zabbix-check-bcfaffac240d74cd79bec3c2a9d3c144d215b495.zip
Added tests to the state package, and reworked the code around that
Diffstat (limited to '')
-rw-r--r--state/state.go21
1 files changed, 0 insertions, 21 deletions
diff --git a/state/state.go b/state/state.go
deleted file mode 100644
index d28a701..0000000
--- a/state/state.go
+++ /dev/null
@@ -1,21 +0,0 @@
-package state
-
-import (
- "bareos-zabbix-check/config"
- "bareos-zabbix-check/job"
-)
-
-// maxNameLength : the maximum length of a string, hard coded in bareos
-const maxNameLength = 128
-
-// State is an object for manipulating a bareos state file
-type State struct {
- config *config.Config
- header header
- jobs []job.Job
-}
-
-// Jobs returns the jobs from the state file
-func (s *State) Jobs() []job.Job {
- return s.jobs
-}