Skip to content

Commit

Permalink
fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
sbchaos committed Dec 16, 2024
1 parent 513b309 commit f69ada0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions ext/sheets/gsheet/sheet_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ var (

type SheetsInfo struct {
SheetID string
Gid string
GID string
}

func FromURL(u1 string) (*SheetsInfo, error) {
Expand All @@ -29,6 +29,6 @@ func FromURL(u1 string) (*SheetsInfo, error) {

return &SheetsInfo{
SheetID: res[1],
Gid: gid,
GID: gid,
}, nil
}
4 changes: 2 additions & 2 deletions ext/sheets/gsheet/sheet_info_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ func TestSheetInfo(t *testing.T) {
info, err := gsheet.FromURL(u1)
assert.Nil(t, err)
assert.Equal(t, info.SheetID, "abcedefgh")
assert.Equal(t, info.Gid, "")
assert.Equal(t, info.GID, "")
})
t.Run("return sheet info with sid and gid", func(t *testing.T) {
u1 := "https://docs.google.com/spreadsheets/d/abcdeghi/edit#gid=3726"

info, err := gsheet.FromURL(u1)
assert.Nil(t, err)
assert.Equal(t, info.SheetID, "abcdeghi")
assert.Equal(t, info.Gid, "3726")
assert.Equal(t, info.GID, "3726")
})
}

0 comments on commit f69ada0

Please sign in to comment.