fix: export fields of struct credentials

This commit is contained in:
Alexander Ng 2024-01-12 03:29:25 -08:00
parent 7d846f1405
commit ed0fa7ff1f
No known key found for this signature in database
GPG Key ID: 54CA3BAC2DBFEE4C

View File

@ -7,8 +7,8 @@ import (
)
type credentials struct {
username string `json:"username"`
password string `json:"password"`
Username string `json:"username"`
Password string `json:"password"`
}
func parseCredentials(credsString string) (socks5.StaticCredentials, error) {
@ -20,7 +20,7 @@ func parseCredentials(credsString string) (socks5.StaticCredentials, error) {
var credsMap socks5.StaticCredentials
for _, cred := range creds {
credsMap[cred.username] = cred.password
credsMap[cred.Username] = cred.Password
}
return credsMap, nil