Get returns a single entry from ~/.rill/{filename}. It assumes filename identifies a YAML file.
(filename, key string)
| 79 | // Get returns a single entry from ~/.rill/{filename}. |
| 80 | // It assumes filename identifies a YAML file. |
| 81 | func (d DotRill) Get(filename, key string) (string, error) { |
| 82 | conf, err := d.GetAll(filename) |
| 83 | if err != nil { |
| 84 | return "", err |
| 85 | } |
| 86 | |
| 87 | return conf[key], nil |
| 88 | } |
| 89 | |
| 90 | // Set sets a single value in ~/.rill/{filename}. |
| 91 | // It assumes filename identifies a YAML file. |
no test coverage detected