felipejfc/udpx

View on GitHub
proxy/manager.go

Summary

Maintainability
A
45 mins
Test Coverage

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 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 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 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 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

    exported type Manager should have comment or be unexported
    Open

    type Manager struct {
    Severity: Minor
    Found in proxy/manager.go by golint

    exported var ProxyConfigStorage should have comment or be unexported
    Open

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

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

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

    There are no issues that match your filters.

    Category
    Status