🐛 Fix panic at adding services

This commit is contained in:
LittleSheep 2024-07-23 17:33:38 +08:00
parent d64743162f
commit 7541292f68

View File

@ -3,6 +3,7 @@ package grpc
import (
"context"
"fmt"
"git.solsynth.dev/hydrogen/dealer/pkg/internal/directory"
"git.solsynth.dev/hydrogen/dealer/pkg/proto"
"github.com/rs/zerolog/log"
@ -10,6 +11,9 @@ import (
)
func warpServiceInstanceToInfo(in *directory.ServiceInstance) *proto.ServiceInfo {
if in == nil {
return nil
}
return &proto.ServiceInfo{
Id: in.ID,
Type: in.Type,