Skip to content

Commit 3098709

Browse files
committed
style: Lint
1 parent c914842 commit 3098709

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

docs/markdown.go

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,10 @@ func (g *Generator) renderTablesAsMarkdown(dir string) error {
3939
return fmt.Errorf("failed to create file %v: %v", outputPath, err)
4040
}
4141
defer f.Close()
42-
f.WriteString(content)
42+
_, err = f.WriteString(content)
43+
if err != nil {
44+
return fmt.Errorf("failed to write content to file %v: %v", outputPath, err)
45+
}
4346
return nil
4447
}
4548

@@ -76,8 +79,11 @@ func (g *Generator) renderTable(dir string, table *schema.Table) error {
7679
return fmt.Errorf("failed to create file %v: %v", outputPath, err)
7780
}
7881
defer f.Close()
79-
f.WriteString(content)
80-
return f.Close()
82+
_, err = f.WriteString(content)
83+
if err != nil {
84+
return fmt.Errorf("failed to write content to file %v: %v", outputPath, err)
85+
}
86+
return nil
8187
}
8288

8389
func formatMarkdown(s string) string {

helpers/remoteoauth/token_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ func setupMockTokenServer(t *testing.T, responses map[string]string) string {
153153

154154
w.Header().Set("Content-Type", "application/json")
155155
w.WriteHeader(http.StatusOK)
156-
w.Write([]byte(resp))
156+
_, _ = w.Write([]byte(resp))
157157
}))
158158
t.Cleanup(func() {
159159
ts.Close()

schema/testdata.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ func (tg TestDataGenerator) getExampleJSON(colName string, dataType arrow.DataTy
385385
for _, binaryType := range binaryTypes {
386386
if arrow.TypeEqual(dataType, binaryType) {
387387
bytes := make([]byte, 4)
388-
rnd.Read(bytes)
388+
_, _ = rnd.Read(bytes)
389389
return `"` + base64.StdEncoding.EncodeToString(bytes) + `"`
390390
}
391391
}

0 commit comments

Comments
 (0)