Allow duplicate service names as long as they're in a different group (#13)

This commit is contained in:
TwinProduction
2020-11-30 08:44:58 -05:00
parent f034bd15de
commit 43504913b4
4 changed files with 21 additions and 13 deletions

View File

@ -2,6 +2,9 @@ package core
// ServiceStatus contains the evaluation Results of a Service
type ServiceStatus struct {
// Name of the service
Name string `json:"name,omitempty"`
// Group the service is a part of. Used for grouping multiple services together on the front end.
Group string `json:"group,omitempty"`
@ -12,6 +15,7 @@ type ServiceStatus struct {
// NewServiceStatus creates a new ServiceStatus
func NewServiceStatus(service *Service) *ServiceStatus {
return &ServiceStatus{
Name: service.Name,
Group: service.Group,
Results: make([]*Result, 0),
}