🔨 Small refactoring

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

View File

@ -13,7 +13,7 @@ import (
// to keep individual author names and profile links for each of their
// channels. On success, returns an Account object with the regular fields and
// an additional access_token field.
func CreateAccount(shortName string, authorName string, authorURL string) (*Account, error) {
func CreateAccount(shortName, authorName, authorURL string) (*Account, error) {
var args http.Args
// Account name, helps users with several accounts remember which they are

View File

@ -106,7 +106,7 @@ func domToNode(domNode *html.Node) interface{} {
return nodeElement
}
func parseEmbed(service string, url string) map[string]string {
func parseEmbed(service, url string) map[string]string {
return map[string]string{
"src": fmt.Sprint("/embed/", service, "?url=", url),
"width": "640",

View File

@ -126,7 +126,7 @@ func GetPage(path string, returnContent bool) (*Page, error) {
// GetPageList get a list of pages belonging to a Telegraph account. Returns
// a PageList object, sorted by most recently created pages first.
func (account *Account) GetPageList(offset int, limit int) (*PageList, error) {
func (account *Account) GetPageList(offset, limit int) (*PageList, error) {
var args http.Args
// Access token of the Telegraph account.
@ -155,7 +155,7 @@ func (account *Account) GetPageList(offset int, limit int) (*PageList, error) {
// GetViews get the number of views for a Telegraph article. By default, the
// total number of page views will be returned. Returns a PageViews object
// on success.
func GetViews(path string, hour int, day int, month int, year int) (*PageViews, error) {
func GetViews(path string, hour, day, month, year int) (*PageViews, error) {
var args http.Args
if hour > -1 {