From 93c90cd70588bc9ef6743fdb8f12a20bf84267d4 Mon Sep 17 00:00:00 2001 From: Christian Schwarz Date: Thu, 11 Oct 2018 13:07:52 +0200 Subject: [PATCH] pruning: fix YAML representation of PruneKeepRegex --- config/config.go | 4 ++-- config/samples/pull_ssh.yml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/config/config.go b/config/config.go index 55fdfa6..add4a65 100644 --- a/config/config.go +++ b/config/config.go @@ -218,7 +218,7 @@ type PruneKeepLastN struct { type PruneKeepRegex struct { // FIXME rename to KeepRegex Type string `yaml:"type"` - Regex string `yaml:"prefix"` + Regex string `yaml:"regex"` } type LoggingOutletEnum struct { @@ -341,7 +341,7 @@ func (t *PruningEnum) UnmarshalYAML(u func(interface{}, bool) error) (err error) "not_replicated": &PruneKeepNotReplicated{}, "last_n": &PruneKeepLastN{}, "grid": &PruneGrid{}, - "prefix": &PruneKeepRegex{}, + "regex": &PruneKeepRegex{}, }) return } diff --git a/config/samples/pull_ssh.yml b/config/samples/pull_ssh.yml index 920f237..be5229b 100644 --- a/config/samples/pull_ssh.yml +++ b/config/samples/pull_ssh.yml @@ -21,8 +21,8 @@ jobs: grid: 1x1h(keep=all) | 24x1h | 14x1d regex: "^zrepl_.*" keep_receiver: - - type: prefix - prefix: keep_ + - type: regex + regex: keep_ - type: grid grid: 1x1h(keep=all) | 24x1h | 35x1d | 6x30d - regex: "^zrepl_.*" \ No newline at end of file + regex: "^zrepl_.*"