aboutsummaryrefslogtreecommitdiff
path: root/connector/config.go
blob: d719b493fa57ff4f1d7ec083feb35ff30bfbb68e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package connector

import (
	"strconv"
)

type Configuration map[string]string

func (c Configuration) GetString(k string) string {
	if ss, ok := c[k]; ok {
		return ss
	}
	return ""
}

func (c Configuration) GetInt(k string) (int, error) {
	if ss, ok := c[k]; ok {
		return strconv.Atoi(ss)
	}
	return 0, nil
}