diff options
author | Alan Pearce | 2024-05-07 11:24:14 +0200 |
---|---|---|
committer | Alan Pearce | 2024-05-07 14:01:32 +0200 |
commit | 9b24b805b45c71bb54dacc1112380357050f48af (patch) | |
tree | 71e88421795b81ef13f241b0f924778a0f33b3e3 | |
parent | 8c1332020d25f74baa463bb1cec0e6783f565034 (diff) | |
download | searchix-9b24b805b45c71bb54dacc1112380357050f48af.tar.lz searchix-9b24b805b45c71bb54dacc1112380357050f48af.tar.zst searchix-9b24b805b45c71bb54dacc1112380357050f48af.zip |
fix: panic on importing darwin options
-rw-r--r-- | internal/options/process.go | 7 |
1 files changed, 6 insertions, 1 deletions
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") |