treefmt/internal/format/config.go

13 lines
238 B
Go
Raw Normal View History

2023-12-23 15:50:47 +03:00
package format
import "github.com/BurntSushi/toml"
type Config struct {
Formatters map[string]*Formatter `toml:"formatter"`
}
func ReadConfigFile(path string) (cfg *Config, err error) {
_, err = toml.DecodeFile(path, &cfg)
return
}