1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-01-03 15:55:20 -05:00

rename 'this'

This commit is contained in:
Darien Raymond
2016-11-27 21:39:09 +01:00
parent d00f8eef56
commit f95c322677
135 changed files with 2351 additions and 2351 deletions

View File

@@ -11,12 +11,12 @@ var (
ErrUnknownAccountType = errors.New("Unknown account type.")
)
func (this *User) GetTypedAccount() (Account, error) {
if this.GetAccount() == nil {
func (v *User) GetTypedAccount() (Account, error) {
if v.GetAccount() == nil {
return nil, ErrAccountMissing
}
rawAccount, err := this.Account.GetInstance()
rawAccount, err := v.Account.GetInstance()
if err != nil {
return nil, err
}
@@ -26,14 +26,14 @@ func (this *User) GetTypedAccount() (Account, error) {
if account, ok := rawAccount.(Account); ok {
return account, nil
}
return nil, errors.New("Unknown account type: " + this.Account.Type)
return nil, errors.New("Unknown account type: " + v.Account.Type)
}
func (this *User) GetSettings() UserSettings {
func (v *User) GetSettings() UserSettings {
settings := UserSettings{
PayloadReadTimeout: 120,
}
if this.Level > 0 {
if v.Level > 0 {
settings.PayloadReadTimeout = 0
}
return settings