hongbo-miao/hongbomiao.com

View on GitHub
api-go/internal/graphql_server/utils/get_me.go

Summary

Maintainability
A
2 hrs
Test Coverage

Function GetMe has 71 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func GetMe(id string) (*Me, error) {
    config := GetConfig()
    conn, err := grpc.NewClient(
        config.DgraphHost+":"+config.DgraphGRPCPort,
        grpc.WithUnaryInterceptor(apmgrpc.NewUnaryClientInterceptor()),
Severity: Minor
Found in api-go/internal/graphql_server/utils/get_me.go - About 1 hr to fix

    Function GetMe has 7 return statements (exceeds 4 allowed).
    Open

    func GetMe(id string) (*Me, error) {
        config := GetConfig()
        conn, err := grpc.NewClient(
            config.DgraphHost+":"+config.DgraphGRPCPort,
            grpc.WithUnaryInterceptor(apmgrpc.NewUnaryClientInterceptor()),
    Severity: Major
    Found in api-go/internal/graphql_server/utils/get_me.go - About 45 mins to fix

      There are no issues that match your filters.

      Category
      Status