👽 ...string instead []string

This commit is contained in:
Maxim Lebedev 2017-05-05 02:07:51 +05:00
parent ec22d34bfc
commit a7791254d7
No known key found for this signature in database
GPG Key ID: F8978F46FF0FFA4F
3 changed files with 3 additions and 3 deletions

View File

@ -79,7 +79,7 @@ func (account *Account) EditAccountInfo(update *Account) (*Account, error) {
// GetAccountInfo get information about a Telegraph account. Returns an
// Account object on success.
func (account *Account) GetAccountInfo(fields []string) (*Account, error) {
func (account *Account) GetAccountInfo(fields ...string) (*Account, error) {
var args http.Args
// Access token of the Telegraph account.

View File

@ -53,7 +53,7 @@ func TestEditInvalidPage(t *testing.T) {
func TestGetInvalidAccountInfo(t *testing.T) {
var account Account
_, err := account.GetAccountInfo([]string{"short_name", "page_count"})
_, err := account.GetAccountInfo("short_name", "page_count")
if err == nil {
t.Error()
}

View File

@ -91,7 +91,7 @@ func TestEditValidPage(t *testing.T) {
}
func TestGetValidAccountInfo(t *testing.T) {
account, err := demoAccount.GetAccountInfo([]string{"short_name", "page_count"})
account, err := demoAccount.GetAccountInfo("short_name", "page_count")
if err != nil {
t.Error(err)
}