Skip to content

Commit

Permalink
remove unfinished implementations & update econ library a little bit …
Browse files Browse the repository at this point in the history
…(breaking api changes)
  • Loading branch information
jxsl13 committed Jan 29, 2024
1 parent b121cd1 commit da519b5
Show file tree
Hide file tree
Showing 27 changed files with 234 additions and 1,151 deletions.
6 changes: 3 additions & 3 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ func NewConfig() Config {
return make(Config, 0, 1)
}

// NewConfigFromText parses a config from a byte slice
func NewConfigFromText(data []byte) (Config, error) {
// ParseConfig parses a config from a byte slice
func ParseConfigBytes(data []byte) (Config, error) {
var c Config
err := c.UnmarshalText(data)
return c, err
}

// NewConfigFromReader parses a config from an io.Reader
func NewConfigFromReader(r io.Reader) (Config, error) {
func ParseConfigReader(r io.Reader) (Config, error) {
var c Config
data, err := io.ReadAll(r)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ func TestParse(t *testing.T) {
t.Fatal(err)
}

c, err := NewConfigFromText(b)
c, err := ParseConfigBytes(b)
if err != nil {
t.Fatal(err)
}
Expand Down
Loading

0 comments on commit da519b5

Please sign in to comment.