From 0bc9032edb6f779e2aeef8cb901f466861a09b56 Mon Sep 17 00:00:00 2001 From: Hiroki SHIROKURA Date: Tue, 1 Nov 2022 12:15:09 +0900 Subject: [PATCH] Update config.go --- pkg/ipfix/config.go | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pkg/ipfix/config.go b/pkg/ipfix/config.go index 573a499..60e2e30 100644 --- a/pkg/ipfix/config.go +++ b/pkg/ipfix/config.go @@ -52,8 +52,7 @@ type Hook struct { // ## Example // ``` // hooks: - // - command: - // cmd: /usr/bin/cmd1 + // - command: /usr/bin/cmd1 // ``` Command *hook.Command `yaml:"command"` // Shell is the backend that executes the external program. It is similar to @@ -63,10 +62,10 @@ type Hook struct { // and so on. // // ## Example ``` hooks: - name: test hook1 - // shell: - // shell: | - // #!/bin/sh - // echo `cat` | jq --arg hostname $(hostname) '. + {hostname: $hostname}' + // hooks: + // - shell: | + // #!/bin/sh + // echo `cat` | jq --arg hostname $(hostname) '. + {hostname: $hostname}' // ``` Shell *hook.Shell `yaml:"shell"` }