🎨 Format of the comments width in structures to 80
This commit is contained in:
parent
acc34522b5
commit
fa8b7ccd77
|
@ -17,12 +17,12 @@ type (
|
||||||
// NodeElement represents a DOM element node.
|
// NodeElement represents a DOM element node.
|
||||||
NodeElement struct {
|
NodeElement struct {
|
||||||
// Name of the DOM element.
|
// Name of the DOM element.
|
||||||
// Available tags: a, aside, b, blockquote, br, code, em, figcaption, figure, h3, h4, hr, i,
|
// Available tags: a, aside, b, blockquote, br, code, em, figcaption, figure, h3,
|
||||||
// iframe, img, li, ol, p, pre, s, strong, u, ul, video.
|
// h4, hr, i, iframe, img, li, ol, p, pre, s, strong, u, ul, video.
|
||||||
Tag string `json:"tag"`
|
Tag string `json:"tag"`
|
||||||
|
|
||||||
// Attributes of the DOM element. Key of object represents name of attribute, value
|
// Attributes of the DOM element. Key of object represents name of attribute,
|
||||||
// represents value of attribute.
|
// value represents value of attribute.
|
||||||
// Available attributes: href, src.
|
// Available attributes: href, src.
|
||||||
Attrs map[string]string `json:"attrs,omitempty"` // optional
|
Attrs map[string]string `json:"attrs,omitempty"` // optional
|
||||||
|
|
||||||
|
|
|
@ -7,24 +7,24 @@ import (
|
||||||
|
|
||||||
// Account represents a Telegraph account.
|
// Account represents a Telegraph account.
|
||||||
type Account struct {
|
type Account struct {
|
||||||
// Only returned by the createAccount and revokeAccessToken method. Access token of the Telegraph
|
// Only returned by the createAccount and revokeAccessToken method. Access token
|
||||||
// account.
|
// of the Telegraph account.
|
||||||
AccessToken string `json:"access_token"` // optional
|
AccessToken string `json:"access_token"` // optional
|
||||||
|
|
||||||
// URL to authorize a browser on telegra.ph and connect it to a Telegraph account. This URL is
|
// URL to authorize a browser on telegra.ph and connect it to a Telegraph
|
||||||
// valid for only one use and for 5 minutes only.
|
// account. This URL is valid for only one use and for 5 minutes only.
|
||||||
AuthURL string `json:"auth_url,omitempty"` // optional
|
AuthURL string `json:"auth_url,omitempty"` // optional
|
||||||
|
|
||||||
// Account name, helps users with several accounts remember which they are currently using.
|
// Account name, helps users with several accounts remember which they are
|
||||||
// Displayed to the user above the "Edit/Publish" button on Telegra.ph, other users don't see
|
// currently using. Displayed to the user above the "Edit/Publish" button on
|
||||||
// this name.
|
// Telegra.ph, other users don't see this name.
|
||||||
ShortName string `json:"short_name"`
|
ShortName string `json:"short_name"`
|
||||||
|
|
||||||
// Default author name used when creating new articles.
|
// Default author name used when creating new articles.
|
||||||
AuthorName string `json:"author_name"`
|
AuthorName string `json:"author_name"`
|
||||||
|
|
||||||
// Profile link, opened when users click on the author's name below the title. Can be any link,
|
// Profile link, opened when users click on the author's name below the title.
|
||||||
// not necessarily to a Telegram profile or channel.
|
// Can be any link, not necessarily to a Telegram profile or channel.
|
||||||
AuthorURL string `json:"author_url"`
|
AuthorURL string `json:"author_url"`
|
||||||
|
|
||||||
// Number of pages belonging to the Telegraph account.
|
// Number of pages belonging to the Telegraph account.
|
||||||
|
|
|
@ -24,8 +24,8 @@ type Page struct {
|
||||||
// Name of the author, displayed below the title.
|
// Name of the author, displayed below the title.
|
||||||
AuthorName string `json:"author_name,omitempty"` // optional
|
AuthorName string `json:"author_name,omitempty"` // optional
|
||||||
|
|
||||||
// Profile link, opened when users click on the author's name below the title. Can be any link,
|
// Profile link, opened when users click on the author's name below the title.
|
||||||
// not necessarily to a Telegram profile or channel.
|
// Can be any link, not necessarily to a Telegram profile or channel.
|
||||||
AuthorURL string `json:"author_url,omitempty"` // optional
|
AuthorURL string `json:"author_url,omitempty"` // optional
|
||||||
|
|
||||||
// Image URL of the page.
|
// Image URL of the page.
|
||||||
|
@ -37,7 +37,8 @@ type Page struct {
|
||||||
// Number of page views for the page.
|
// Number of page views for the page.
|
||||||
Views int `json:"views"`
|
Views int `json:"views"`
|
||||||
|
|
||||||
// Only returned if access_token passed. True, if the target Telegraph account can edit the page.
|
// Only returned if access_token passed. True, if the target Telegraph account
|
||||||
|
// can edit the page.
|
||||||
CanEdit bool `json:"can_edit,omitempty"` // optional
|
CanEdit bool `json:"can_edit,omitempty"` // optional
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,12 +18,12 @@ const (
|
||||||
// FieldAuthorURL used as GetAccountInfo argument for getting profile link.
|
// FieldAuthorURL used as GetAccountInfo argument for getting profile link.
|
||||||
FieldAuthorURL = "author_url"
|
FieldAuthorURL = "author_url"
|
||||||
|
|
||||||
// FieldAuthURL used as GetAccountInfo argument for getting URL to authorize a browser on
|
// FieldAuthURL used as GetAccountInfo argument for getting URL to authorize
|
||||||
// telegra.ph.
|
// a browser on telegra.ph.
|
||||||
FieldAuthURL = "auth_url"
|
FieldAuthURL = "auth_url"
|
||||||
|
|
||||||
// FieldPageCount used as GetAccountInfo argument for getting number of pages belonging to the
|
// FieldPageCount used as GetAccountInfo argument for getting number of pages
|
||||||
// Telegraph account.
|
// belonging to the Telegraph account.
|
||||||
FieldPageCount = "page_count"
|
FieldPageCount = "page_count"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue