You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A question about repositories.ListForAccount() method.
Is it normal that this method is returning an interface{} ? Note : I would expect to have a []string with repo names.
Maybe it is because this method is not finalized ? Any other reasons ?
In order to get the list of repo names, I did the following ugly code (just for testing). But maybe there is another smart way or magic method to get this ?
res2, err2:=c.Repositories.ListForTeam(opt2)
iferr2!=nil {
panic(err2)
}
repos:=show_repo(res2)
fmt.Printf("%#v\n", repos) // Just to debug content
funcshow_repo(datainterface{}) []string {
varoutput []string// New slicerepos:=data.(map[string]interface{})["values"].([]interface{})
// Loop on slicefori:=0; i<len(repos); i++ {
output=append(output, repos[i].(map[string]interface{})["name"].(string))
}
returnoutput
}
The text was updated successfully, but these errors were encountered:
@ktrysmt thx. In fact the underlying question is will you accept PR that will change the behavior of these methods ? If yes we (@Xx-Parks-xX and I) will open a couple of PRs.
Hello @ktrysmt ,
A question about repositories.ListForAccount() method.
Is it normal that this method is returning an interface{} ?
Note : I would expect to have a []string with repo names.
Maybe it is because this method is not finalized ? Any other reasons ?
In order to get the list of repo names, I did the following ugly code (just for testing). But maybe there is another smart way or magic method to get this ?
The text was updated successfully, but these errors were encountered: