Skip to content

Commit

Permalink
Fix godoc (#540)
Browse files Browse the repository at this point in the history
Fix godoc for `WithHTTPClient` and `WithEndpoint`.

- Fix pebble template
- Run `python3 generate-code.py`

Fixes #539.
  • Loading branch information
178inaba authored Feb 12, 2025
1 parent 63f3874 commit 3c283b7
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,15 @@ func (client *{{ classname }}) Url(endpointPath string) string {
return u.String()
}

// WithHTTPClient function
// With{{ classname contains "Blob" ? "Blob" : "" }}HTTPClient function
func With{{ classname contains "Blob" ? "Blob" : "" }}HTTPClient(c *http.Client) {{classname}}Option {
return func(client *{{ classname }}) error {
client.httpClient = c
return nil
}
}

// WithEndpointClient function
// With{{ classname contains "Blob" ? "Blob" : "" }}Endpoint function
func With{{ classname contains "Blob" ? "Blob" : "" }}Endpoint(endpoint string) {{classname}}Option {
return func(client *{{ classname }}) error {
u, err := url.ParseRequestURI(endpoint)
Expand Down
2 changes: 1 addition & 1 deletion linebot/channel_access_token/api_channel_access_token.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func WithHTTPClient(c *http.Client) ChannelAccessTokenAPIOption {
}
}

// WithEndpointClient function
// WithEndpoint function
func WithEndpoint(endpoint string) ChannelAccessTokenAPIOption {
return func(client *ChannelAccessTokenAPI) error {
u, err := url.ParseRequestURI(endpoint)
Expand Down
2 changes: 1 addition & 1 deletion linebot/insight/api_insight.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func WithHTTPClient(c *http.Client) InsightAPIOption {
}
}

// WithEndpointClient function
// WithEndpoint function
func WithEndpoint(endpoint string) InsightAPIOption {
return func(client *InsightAPI) error {
u, err := url.ParseRequestURI(endpoint)
Expand Down
2 changes: 1 addition & 1 deletion linebot/liff/api_liff.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ func WithHTTPClient(c *http.Client) LiffAPIOption {
}
}

// WithEndpointClient function
// WithEndpoint function
func WithEndpoint(endpoint string) LiffAPIOption {
return func(client *LiffAPI) error {
u, err := url.ParseRequestURI(endpoint)
Expand Down
2 changes: 1 addition & 1 deletion linebot/manage_audience/api_manage_audience.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ func WithHTTPClient(c *http.Client) ManageAudienceAPIOption {
}
}

// WithEndpointClient function
// WithEndpoint function
func WithEndpoint(endpoint string) ManageAudienceAPIOption {
return func(client *ManageAudienceAPI) error {
u, err := url.ParseRequestURI(endpoint)
Expand Down
4 changes: 2 additions & 2 deletions linebot/manage_audience/api_manage_audience_blob.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,15 @@ func (client *ManageAudienceBlobAPI) Url(endpointPath string) string {
return u.String()
}

// WithHTTPClient function
// WithBlobHTTPClient function
func WithBlobHTTPClient(c *http.Client) ManageAudienceBlobAPIOption {
return func(client *ManageAudienceBlobAPI) error {
client.httpClient = c
return nil
}
}

// WithEndpointClient function
// WithBlobEndpoint function
func WithBlobEndpoint(endpoint string) ManageAudienceBlobAPIOption {
return func(client *ManageAudienceBlobAPI) error {
u, err := url.ParseRequestURI(endpoint)
Expand Down
2 changes: 1 addition & 1 deletion linebot/messaging_api/api_messaging_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ func WithHTTPClient(c *http.Client) MessagingApiAPIOption {
}
}

// WithEndpointClient function
// WithEndpoint function
func WithEndpoint(endpoint string) MessagingApiAPIOption {
return func(client *MessagingApiAPI) error {
u, err := url.ParseRequestURI(endpoint)
Expand Down
4 changes: 2 additions & 2 deletions linebot/messaging_api/api_messaging_api_blob.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,15 @@ func (client *MessagingApiBlobAPI) Url(endpointPath string) string {
return u.String()
}

// WithHTTPClient function
// WithBlobHTTPClient function
func WithBlobHTTPClient(c *http.Client) MessagingApiBlobAPIOption {
return func(client *MessagingApiBlobAPI) error {
client.httpClient = c
return nil
}
}

// WithEndpointClient function
// WithBlobEndpoint function
func WithBlobEndpoint(endpoint string) MessagingApiBlobAPIOption {
return func(client *MessagingApiBlobAPI) error {
u, err := url.ParseRequestURI(endpoint)
Expand Down
2 changes: 1 addition & 1 deletion linebot/module/api_line_module.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ func WithHTTPClient(c *http.Client) LineModuleAPIOption {
}
}

// WithEndpointClient function
// WithEndpoint function
func WithEndpoint(endpoint string) LineModuleAPIOption {
return func(client *LineModuleAPI) error {
u, err := url.ParseRequestURI(endpoint)
Expand Down
2 changes: 1 addition & 1 deletion linebot/module_attach/api_line_module_attach.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func WithHTTPClient(c *http.Client) LineModuleAttachAPIOption {
}
}

// WithEndpointClient function
// WithEndpoint function
func WithEndpoint(endpoint string) LineModuleAttachAPIOption {
return func(client *LineModuleAttachAPI) error {
u, err := url.ParseRequestURI(endpoint)
Expand Down
2 changes: 1 addition & 1 deletion linebot/shop/api_shop.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func WithHTTPClient(c *http.Client) ShopAPIOption {
}
}

// WithEndpointClient function
// WithEndpoint function
func WithEndpoint(endpoint string) ShopAPIOption {
return func(client *ShopAPI) error {
u, err := url.ParseRequestURI(endpoint)
Expand Down

0 comments on commit 3c283b7

Please sign in to comment.