simplify json format
This commit is contained in:
@@ -28,10 +28,7 @@ import (
|
|||||||
var preset string
|
var preset string
|
||||||
var scriptPath string
|
var scriptPath string
|
||||||
|
|
||||||
type script struct {
|
type script []string
|
||||||
Presets []string
|
|
||||||
Times []float64
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *script) load(path string) error {
|
func (s *script) load(path string) error {
|
||||||
f, err := os.Open(path)
|
f, err := os.Open(path)
|
||||||
@@ -54,7 +51,7 @@ func getPresets() []string {
|
|||||||
if scriptPath != "" {
|
if scriptPath != "" {
|
||||||
var s script
|
var s script
|
||||||
s.load(scriptPath)
|
s.load(scriptPath)
|
||||||
presets = s.Presets
|
presets = s
|
||||||
}
|
}
|
||||||
|
|
||||||
return presets
|
return presets
|
||||||
|
|||||||
Reference in New Issue
Block a user