Skip to content

Commit e11c382

Browse files
committed
linter
1 parent 462e653 commit e11c382

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

internal/api/icon.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ import (
3535

3636
const (
3737
appIconMethod = "apps.hosted.icon"
38-
// AppIconSetMethod is the API method for setting app icons for non-hosted apps.
38+
// appIconSetMethod is the API method for setting app icons for non-hosted apps.
3939
appIconSetMethod = "apps.icon.set"
4040
)
4141

@@ -56,7 +56,7 @@ func (c *Client) Icon(ctx context.Context, fs afero.Fs, token, appID, iconFilePa
5656

5757
// IconSet sets a Slack App's icon using the apps.icon.set API method.
5858
func (c *Client) IconSet(ctx context.Context, fs afero.Fs, token, appID, iconFilePath string) (IconResult, error) {
59-
return c.uploadIcon(ctx, fs, token, appID, iconFilePath, AppIconSetMethod, "icon")
59+
return c.uploadIcon(ctx, fs, token, appID, iconFilePath, appIconSetMethod, "icon")
6060
}
6161

6262
// uploadIcon uploads an icon to the given API method.

internal/api/icon_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ func TestClient_IconSetErrorIfMissingArgs(t *testing.T) {
7070
ctx := slackcontext.MockContext(t.Context())
7171
fs := afero.NewMemMapFs()
7272
c, teardown := NewFakeClient(t, FakeClientParams{
73-
ExpectedMethod: AppIconSetMethod,
73+
ExpectedMethod: appIconSetMethod,
7474
})
7575
defer teardown()
7676
_, err := c.IconSet(ctx, fs, "token", "", "")
@@ -82,7 +82,7 @@ func TestClient_IconSetErrorNoFile(t *testing.T) {
8282
ctx := slackcontext.MockContext(t.Context())
8383
fs := afero.NewMemMapFs()
8484
c, teardown := NewFakeClient(t, FakeClientParams{
85-
ExpectedMethod: AppIconSetMethod,
85+
ExpectedMethod: appIconSetMethod,
8686
})
8787
defer teardown()
8888
_, err := c.IconSet(ctx, fs, "token", "12345", imgFile)
@@ -105,7 +105,7 @@ func TestClient_IconSetErrorResponse(t *testing.T) {
105105
err := png.Encode(myfile, myimage)
106106
require.NoError(t, err)
107107
c, teardown := NewFakeClient(t, FakeClientParams{
108-
ExpectedMethod: AppIconSetMethod,
108+
ExpectedMethod: appIconSetMethod,
109109
Response: `{"ok":false,"error":"invalid_app"}`,
110110
})
111111
defer teardown()
@@ -130,7 +130,7 @@ func TestClient_IconSetSuccess(t *testing.T) {
130130
err := png.Encode(myfile, myimage)
131131
require.NoError(t, err)
132132
c, teardown := NewFakeClient(t, FakeClientParams{
133-
ExpectedMethod: AppIconSetMethod,
133+
ExpectedMethod: appIconSetMethod,
134134
Response: `{"ok":true}`,
135135
})
136136
defer teardown()

internal/pkg/apps/install.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ func updateIcon(ctx context.Context, clients *shared.ClientFactory, iconPath, ap
660660

661661
// var iconResp apiclient.IconResult
662662
var err error
663-
_, err = clients.API().SetIcon(ctx, clients.Fs, token, appID, iconPath)
663+
_, err = clients.API().IconSet(ctx, clients.Fs, token, appID, iconPath)
664664
if err != nil {
665665
// TODO: separate the icon upload into a different function because if an error is returned
666666
// the new app_id might be ignored and next time we'll create another app.

0 commit comments

Comments
 (0)