Closed vlorinc closed 8 months ago
Fix provided in branch fix/routes_json_handler. PR will be opened.
Issue caused by changing key of map from string
to struct
of type Destination
which didn't implement encoding.TextMarshaler
so json was not able to marshal this struct.
MarshalText
and UnmarshalText
methods were added to fix this problem.
Describe the bug
When getting routes in json format from URL []:4712/rotues.json of running metalbond, there is error
Error: json: unsupported type: map[metalbond.Destination][]metalbond.NextHop
Expected behavior
Show current metalbond routes in json format.
Additional contex
Routes in yaml format ([]:4712/rotues.yaml) are shown correctly.