libpayload: configs: Add new config.featuretest to broaden CI
[coreboot.git] / util / board_status / go / src / kconfig / kconfig.go
blob6ce308e61d706590d3858778669020c4ddcec670
1 package kconfig
3 import (
4 "bufio"
5 "bytes"
6 "strings"
9 func ParseKConfig(raw []byte) map[string]string {
10 buffer := bytes.NewBuffer(raw)
12 scanner := bufio.NewScanner(buffer)
13 ret := map[string]string{}
14 for scanner.Scan() {
15 line := scanner.Text()
16 if line[0] == '#' {
17 continue
19 idx := strings.Index(line, "=")
20 if idx < 0 {
21 continue
23 ret[line[0:idx]] = line[idx+1:]
25 return ret
28 func UnQuote(in string) string {
29 return in[1 : len(in)-1]