felipejfc/udpx

View on GitHub

Showing 27 of 27 total issues

Function GetProxy has 9 arguments (exceeds 4 allowed). Consider refactoring.
Open

func GetProxy(debug bool, logger *zap.Logger, bindPort int, bindAddress string, upstreamAddress string, upstreamPort int, bufferSize int, connTimeout time.Duration, resolveTTL time.Duration) *Proxy {
Severity: Major
Found in proxy/proxy.go - About 1 hr to fix

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

    func NewProxyHandler(c echo.Context) error {
        p := new(proxy.ProxyInstance)
        pm := proxy.GetManager()
        if err := c.Bind(p); err != nil {
            return err
    Severity: Major
    Found in api/proxy.go - About 45 mins to fix

      Method Manager.Configure has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      func (p *Manager) Configure(debug bool, logger *zap.Logger, bindAddress string, bufferSize int, defaultClientTimeout int, defaultResolveTTL int) {
      Severity: Minor
      Found in proxy/manager.go - About 45 mins to fix

        exported function HealthCheckHandler should have comment or be unexported
        Open

        func HealthCheckHandler(c echo.Context) error {
        Severity: Minor
        Found in api/healthcheck.go by golint

        exported function IsDirectory should have comment or be unexported
        Open

        func IsDirectory(path string) (bool, error) {
        Severity: Minor
        Found in proxy/proxy_config.go by golint

        exported function GetAPI should have comment or be unexported
        Open

        func GetAPI(bindAddress string, bindPort int, debug bool, logger *zap.Logger) *API {
        Severity: Minor
        Found in api/api.go by golint

        exported function GetManager should have comment or be unexported
        Open

        func GetManager() *Manager {
        Severity: Minor
        Found in proxy/manager.go by golint

        exported method Manager.UnregisterByBindPort should have comment or be unexported
        Open

        func (p *Manager) UnregisterByBindPort(port string) bool {
        Severity: Minor
        Found in proxy/manager.go by golint

        exported function LoadProxyConfigsFromConfigFiles should have comment or be unexported
        Open

        func LoadProxyConfigsFromConfigFiles(configPath string) []ProxyInstance {
        Severity: Minor
        Found in proxy/proxy_config.go by golint

        exported type API should have comment or be unexported
        Open

        type API struct {
        Severity: Minor
        Found in api/api.go by golint

        exported var ProxyStorage should have comment or be unexported
        Open

        var ProxyStorage = make(map[string]*Proxy)
        Severity: Minor
        Found in proxy/manager.go by golint

        exported method Manager.GetConfigByBindPort should have comment or be unexported
        Open

        func (p *Manager) GetConfigByBindPort(port string) *ProxyInstance {
        Severity: Minor
        Found in proxy/manager.go by golint

        exported type ProxyConfig should have comment or be unexported
        Open

        type ProxyConfig struct {
        Severity: Minor
        Found in proxy/proxy_config.go by golint

        exported function NewProxyHandler should have comment or be unexported
        Open

        func NewProxyHandler(c echo.Context) error {
        Severity: Minor
        Found in api/proxy.go by golint

        exported method Manager.Configure should have comment or be unexported
        Open

        func (p *Manager) Configure(debug bool, logger *zap.Logger, bindAddress string, bufferSize int, defaultClientTimeout int, defaultResolveTTL int) {
        Severity: Minor
        Found in proxy/manager.go by golint

        exported type ProxyInstance should have comment or be unexported
        Open

        type ProxyInstance struct {
        Severity: Minor
        Found in proxy/proxy_config.go by golint

        exported method Manager.PersistProxyConfig should have comment or be unexported
        Open

        func (p *Manager) PersistProxyConfig(proxy *ProxyInstance) error {
        Severity: Minor
        Found in proxy/manager.go by golint

        type name will be used as proxy.ProxyConfig by other packages, and that stutters; consider calling this Config
        Open

        type ProxyConfig struct {
        Severity: Minor
        Found in proxy/proxy_config.go by golint

        2: cannot find package "github.com/labstack/echo" in any of:
        Open

            "github.com/labstack/echo"
        Severity: Minor
        Found in api/api.go by govet

        exported function UnregisterProxyByPortHandler should have comment or be unexported
        Open

        func UnregisterProxyByPortHandler(c echo.Context) error {
        Severity: Minor
        Found in api/proxy.go by golint
        Severity
        Category
        Status
        Source
        Language