mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-18 15:10:13 +02:00
fix: nil dereference on marshalling service health
This commit is contained in:
@@ -22,7 +22,10 @@ type JSONRepresentation struct {
|
||||
}
|
||||
|
||||
func (jsonRepr *JSONRepresentation) MarshalMap() map[string]any {
|
||||
url := jsonRepr.URL.String()
|
||||
var url string
|
||||
if jsonRepr.URL != nil {
|
||||
url = jsonRepr.URL.String()
|
||||
}
|
||||
if url == "http://:0" {
|
||||
url = ""
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user