mirror of
https://github.com/yusing/godoxy.git
synced 2025-05-19 20:32:35 +02:00
fix: nil dereference on marshalling service health
This commit is contained in:
parent
fa16f4150a
commit
a2e253591c
1 changed files with 4 additions and 1 deletions
|
@ -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 = ""
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue