mirror of
https://github.com/felixangell/phi.git
synced 2024-10-05 20:27:17 +03:00
fixed toml dependency; used toml-go instead of BurntSushi
BurntSushi implementation isn't actively maintained and doesn't support hex literals in the implementation yet
This commit is contained in:
parent
bcd6e40eaa
commit
39f895334f
@ -12,9 +12,8 @@ import (
|
||||
"runtime"
|
||||
"strings"
|
||||
|
||||
// fork of BurntSushi with hexadecimal support.
|
||||
"github.com/felixangell/strife"
|
||||
"github.com/felixangell/toml"
|
||||
"github.com/pelletier/go-toml"
|
||||
)
|
||||
|
||||
// TODO:
|
||||
@ -63,8 +62,8 @@ func loadSyntaxDef(lang string) *LanguageSyntaxConfig {
|
||||
return nil
|
||||
}
|
||||
|
||||
var conf = &LanguageSyntaxConfig{}
|
||||
if _, err := toml.Decode(string(syntaxTomlData), conf); err != nil {
|
||||
conf := &LanguageSyntaxConfig{}
|
||||
if err := toml.Unmarshal(syntaxTomlData, conf); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
@ -310,8 +309,8 @@ func Setup() TomlConfig {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
var conf TomlConfig
|
||||
if _, err := toml.Decode(string(configTomlData), &conf); err != nil {
|
||||
conf := TomlConfig{}
|
||||
if err := toml.Unmarshal(configTomlData, &conf); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user