👽 ...string instead []string
This commit is contained in:
parent
ec22d34bfc
commit
a7791254d7
|
@ -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.
|
||||
|
|
|
@ -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()
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue