fix: export fields of struct credentials
This commit is contained in:
parent
7d846f1405
commit
ed0fa7ff1f
@ -7,8 +7,8 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type credentials struct {
|
type credentials struct {
|
||||||
username string `json:"username"`
|
Username string `json:"username"`
|
||||||
password string `json:"password"`
|
Password string `json:"password"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func parseCredentials(credsString string) (socks5.StaticCredentials, error) {
|
func parseCredentials(credsString string) (socks5.StaticCredentials, error) {
|
||||||
@ -20,7 +20,7 @@ func parseCredentials(credsString string) (socks5.StaticCredentials, error) {
|
|||||||
|
|
||||||
var credsMap socks5.StaticCredentials
|
var credsMap socks5.StaticCredentials
|
||||||
for _, cred := range creds {
|
for _, cred := range creds {
|
||||||
credsMap[cred.username] = cred.password
|
credsMap[cred.Username] = cred.Password
|
||||||
}
|
}
|
||||||
|
|
||||||
return credsMap, nil
|
return credsMap, nil
|
||||||
|
Loading…
Reference in New Issue
Block a user