aboutsummaryrefslogtreecommitdiff
path: root/internal/confyg/map_output.go
blob: 5358f99f171dd8fb1d01aeee54eeef4c53207bce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package confyg

import (
	"bytes"
	"strings"
)

// MapConfig is a simple wrapper around a map.
type MapConfig map[string][]string

// Allow accepts everything.
func (mc MapConfig) Allow(verb string, block bool) bool {
	return true
}

func (mc MapConfig) Read(errs *bytes.Buffer, fs *FileSyntax, line *Line, verb string, args []string) {
	mc[verb] = append(mc[verb], strings.Join(args, " "))
}