From 9b24b805b45c71bb54dacc1112380357050f48af Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Tue, 7 May 2024 11:24:14 +0200 Subject: fix: panic on importing darwin options --- internal/options/process.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'internal') diff --git a/internal/options/process.go b/internal/options/process.go index f15757a..32a76a2 100644 --- a/internal/options/process.go +++ b/internal/options/process.go @@ -156,7 +156,12 @@ func Process(inpath string, outpath string, channel string, revision string) err } decls = append(decls, link) case reflect.Map: - decls = append(decls, decl.Convert(reflect.TypeFor[Link]()).Interface().(*Link)) + v := decl.Interface().(map[string]interface{}) + link := Link{ + Name: v["name"].(string), + URL: v["url"].(string), + } + decls = append(decls, &link) default: println("kind", decl.Kind().String()) panic("unexpected object type") -- cgit 1.4.1