pkg/handler/tools.go
Function Complete
has 55 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func Complete(ctx context.Context, route *core.Route) error {
if v, ok := os.LookupEnv(config.EnvInboundPodTunIPv4); !ok || v != "" {
return nil
}
Function Complete
has 8 return statements (exceeds 4 allowed). Open
Open
func Complete(ctx context.Context, route *core.Route) error {
if v, ok := os.LookupEnv(config.EnvInboundPodTunIPv4); !ok || v != "" {
return nil
}
Function getDHCPServerClient
has 5 return statements (exceeds 4 allowed). Open
Open
func getDHCPServerClient(ctx context.Context, namespace string) (rpc.DHCPClient, error) {
cert, ok := os.LookupEnv(config.TLSCertKey)
if !ok {
return nil, fmt.Errorf("can not get %s from env", config.TLSCertKey)
}