From b589ca89c114fce5bc2842926b50ce5414c23a71 Mon Sep 17 00:00:00 2001 From: Darien Raymond Date: Thu, 7 Sep 2017 22:58:10 +0200 Subject: [PATCH] refactor --- proxy/socks/config.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/proxy/socks/config.go b/proxy/socks/config.go index 595c9949..0d380bd2 100644 --- a/proxy/socks/config.go +++ b/proxy/socks/config.go @@ -2,22 +2,22 @@ package socks import "v2ray.com/core/common/protocol" -func (v *Account) Equals(another protocol.Account) bool { +func (a *Account) Equals(another protocol.Account) bool { if account, ok := another.(*Account); ok { - return v.Username == account.Username + return a.Username == account.Username } return false } -func (v *Account) AsAccount() (protocol.Account, error) { - return v, nil +func (a *Account) AsAccount() (protocol.Account, error) { + return a, nil } -func (v *ServerConfig) HasAccount(username, password string) bool { - if v.Accounts == nil { +func (c *ServerConfig) HasAccount(username, password string) bool { + if c.Accounts == nil { return false } - storedPassed, found := v.Accounts[username] + storedPassed, found := c.Accounts[username] if !found { return false }