Skip to content

Commit 685e6b2

Browse files
committed
Run gofmt on all go files
1 parent 95d0a45 commit 685e6b2

File tree

11 files changed

+57
-57
lines changed

11 files changed

+57
-57
lines changed

bench/checksum_write_back/types.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ func (t Time) Value() (driver.Value, error) {
7272
// values! However, the most common mysql database driver does not support
7373
// uint64 at all.
7474
//
75-
// https://github.com/go-sql-driver/mysql/issues/715
75+
// https://github.com/go-sql-driver/mysql/issues/715
7676
type NullUint64 struct {
7777
Uint64 uint64
7878
Valid bool

cmd/lsdf-checksum-worker/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ import (
88

99
"golang.org/x/sys/unix"
1010

11+
"github.com/alecthomas/kingpin/v2"
1112
"github.com/apex/log"
1213
"github.com/apex/log/handlers/json"
1314
"github.com/apex/log/handlers/logfmt"
1415
"github.com/apex/log/handlers/text"
15-
"github.com/alecthomas/kingpin/v2"
1616
"gopkg.in/yaml.v3"
1717

1818
"git.scc.kit.edu/sdm/lsdf-checksum/worker"

master/medasync/queries.go

+34-34
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,16 @@ const truncateInsertsQuery = meda.GenericQuery(`
2121
//
2222
// The query requires several parameters:
2323
//
24-
// previous_id - The ID previously returned by the query, i.e. the last ID
25-
// of the previous chunk. For the first query, this should be
26-
// set to 0.
27-
// chunk_size - Number of records to be included in the chunk.
24+
// previous_id - The ID previously returned by the query, i.e. the last ID
25+
// of the previous chunk. For the first query, this should be
26+
// set to 0.
27+
// chunk_size - Number of records to be included in the chunk.
2828
//
2929
// The query outputs zero or a single row with one column. After the query has
3030
// returned the last chunk, subsequent queries (with previous_id = last row ID
3131
// of last chunk) return no rows.
3232
//
33-
// id - The ID of the last row included in the chunk.
33+
// id - The ID of the last row included in the chunk.
3434
const nextInsertsChunkQuery = meda.GenericQuery(`
3535
(
3636
SELECT
@@ -51,16 +51,16 @@ const nextInsertsChunkQuery = meda.GenericQuery(`
5151
//
5252
// The query requires several parameters:
5353
//
54-
// previous_id - The ID previously returned by the query, i.e. the last ID
55-
// of the previous chunk. For the first query, this should be
56-
// set to 0.
57-
// chunk_size - Number of records to be included in the chunk.
54+
// previous_id - The ID previously returned by the query, i.e. the last ID
55+
// of the previous chunk. For the first query, this should be
56+
// set to 0.
57+
// chunk_size - Number of records to be included in the chunk.
5858
//
5959
// The query outputs zero or a single row with one column. After the query has
6060
// returned the last chunk, subsequent queries (with previous_id = last row ID
6161
// of last chunk) return no rows.
6262
//
63-
// id - The ID of the last row included in the chunk.
63+
// id - The ID of the last row included in the chunk.
6464
const nextFilesChunkQuery = meda.GenericQuery(`
6565
(
6666
SELECT
@@ -80,18 +80,18 @@ const nextFilesChunkQuery = meda.GenericQuery(`
8080
//
8181
// The query requires several parameters:
8282
//
83-
// run_id - The ID of the run for which the synchronisation
84-
// takes place.
85-
// incremental_mode - 1 if the synchronisation takes place in incremental
86-
// mode, 0 otherwise.
87-
// incremental_mode - 1 if the synchronisation takes place in incremental
88-
// mode, 0 otherwise.
89-
// run_id - The ID of the run for which the synchronisation
90-
// takes place.
91-
// prev_inserts_id - The last ID of the inserts table included in the
92-
// previous chunk.
93-
// last_inserts_id - The last ID of the inserts table included in the
94-
// current chunk.
83+
// run_id - The ID of the run for which the synchronisation
84+
// takes place.
85+
// incremental_mode - 1 if the synchronisation takes place in incremental
86+
// mode, 0 otherwise.
87+
// incremental_mode - 1 if the synchronisation takes place in incremental
88+
// mode, 0 otherwise.
89+
// run_id - The ID of the run for which the synchronisation
90+
// takes place.
91+
// prev_inserts_id - The last ID of the inserts table included in the
92+
// previous chunk.
93+
// last_inserts_id - The last ID of the inserts table included in the
94+
// current chunk.
9595
//
9696
// The to_be_read field is set to 1 if not running in incremental mode. In
9797
// incremental mode the field is set to 1 if the modification_time differs.
@@ -151,12 +151,12 @@ const updateQuery = meda.GenericQuery(`
151151
//
152152
// The query requires one parameter:
153153
//
154-
// run_id - The ID of the run for which the synchronisation takes
155-
// place.
156-
// prev_inserts_id - The last ID of the inserts table included in the
157-
// previous chunk.
158-
// last_inserts_id - The last ID of the inserts table included in the
159-
// current chunk.
154+
// run_id - The ID of the run for which the synchronisation takes
155+
// place.
156+
// prev_inserts_id - The last ID of the inserts table included in the
157+
// previous chunk.
158+
// last_inserts_id - The last ID of the inserts table included in the
159+
// current chunk.
160160
//
161161
// After execution, the number of inserted / copied rows can be retrieved
162162
// using RowsAffected().
@@ -181,12 +181,12 @@ const insertQuery = meda.GenericQuery(`
181181
//
182182
// The query requires one parameter:
183183
//
184-
// run_id - The ID of the run for which the synchronisation takes
185-
// place.
186-
// prev_files_id - The last ID of the files table included in the previous
187-
// chunk.
188-
// last_files_id - The last ID of the files table included in the current
189-
// chunk.
184+
// run_id - The ID of the run for which the synchronisation takes
185+
// place.
186+
// prev_files_id - The last ID of the files table included in the previous
187+
// chunk.
188+
// last_files_id - The last ID of the files table included in the current
189+
// chunk.
190190
//
191191
// After execution, the number of deleted rows can be retrieved using
192192
// RowsAffected().

master/workqueue/writebacker.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ func (w *WriteBacker) issueChecksumWarning(ctx context.Context, file *meda.File,
383383
if err != nil {
384384
err = pkgErrors.Wrap(err, "(*WriteBacker).issueChecksumWarning")
385385
fieldLogger.WithError(err).WithFields(log.Fields{
386-
"action": "escalating",
386+
"action": "escalating",
387387
}).Error("Encountered error while issuing checksum warning")
388388
}
389389

meda/types.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ func (t Time) Value() (driver.Value, error) {
8181
// values! However, the most common mysql database driver does not support
8282
// uint64 at all.
8383
//
84-
// https://github.com/go-sql-driver/mysql/issues/715
84+
// https://github.com/go-sql-driver/mysql/issues/715
8585
type NullUint64 struct {
8686
Uint64 uint64
8787
Valid bool

scaleadpt/driver_cli.go

+10-10
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const gpfsMountType = "gpfs"
4040
// The implementation is an adapted copy of the gofsutil's
4141
// defaultEntryScanFunc, see:
4242
//
43-
// https://github.com/akutz/gofsutil/blob/master/gofsutil_mount.go#L99
43+
// https://github.com/akutz/gofsutil/blob/master/gofsutil_mount.go#L99
4444
func gpfsEntryScan(ctx context.Context, entry gofsutil.Entry, cache map[string]gofsutil.Entry) (gofsutil.Info, bool, error) {
4545
var info gofsutil.Info
4646

@@ -105,8 +105,8 @@ var _ error = &CLIGPFSError{}
105105

106106
// CLIGPFSError is an error type containing GPFS specific information.
107107
//
108-
// https://www.ibm.com/support/knowledgecenter/en/STXKQY_4.2.3/com.ibm.spectrum.scale.v4r23.doc/bl1pdg_message.htm
109-
// https://www.ibm.com/support/knowledgecenter/STXKQY_4.2.3/com.ibm.spectrum.scale.v4r23.doc/bl1pdg_messageseveritytags.htm
108+
// https://www.ibm.com/support/knowledgecenter/en/STXKQY_4.2.3/com.ibm.spectrum.scale.v4r23.doc/bl1pdg_message.htm
109+
// https://www.ibm.com/support/knowledgecenter/STXKQY_4.2.3/com.ibm.spectrum.scale.v4r23.doc/bl1pdg_messageseveritytags.htm
110110
type CLIGPFSError struct {
111111
CLIError
112112

@@ -716,14 +716,14 @@ func (g *gpfsCmdOutReader) ReadRow() ([]string, error) {
716716
//
717717
// Scan allows simplified access similar to bufio.Scanner.
718718
//
719-
// for reader.Scan() {
720-
// row := reader.Row()
719+
// for reader.Scan() {
720+
// row := reader.Row()
721721
//
722-
// // do something with row
723-
// }
724-
// if err = reader.Err(); err != nil {
725-
// return nil, err
726-
// }
722+
// // do something with row
723+
// }
724+
// if err = reader.Err(); err != nil {
725+
// return nil, err
726+
// }
727727
func (g *gpfsCmdOutReader) Scan() bool {
728728
row, err := g.ReadRow()
729729
if err != nil {

scaleadpt/filelist/unescapeurl.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ func appendUnescapeUrl(dst, in []byte) ([]byte, error) {
3030
}
3131

3232
dst = append(dst, in[:ind]...)
33-
if ind + 2 >= len(in) {
33+
if ind+2 >= len(in) {
3434
return dst, errInvalidEscape
3535
}
36-
dst = append(dst, hexToInt(in[ind+1])<<4 + hexToInt(in[ind+2]))
36+
dst = append(dst, hexToInt(in[ind+1])<<4+hexToInt(in[ind+2]))
3737

3838
in = in[ind+3:]
3939
}

scaleadpt/snapshot.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ func (s *Snapshot) Delete() error {
2727
// It contains all information in the output of the mmsnapdir command, see the
2828
// reference for more details:
2929
//
30-
// https://www.ibm.com/support/knowledgecenter/en/STXKQY_4.2.3/com.ibm.spectrum.scale.v4r23.doc/bl1adm_mmsnapdir.htm
30+
// https://www.ibm.com/support/knowledgecenter/en/STXKQY_4.2.3/com.ibm.spectrum.scale.v4r23.doc/bl1adm_mmsnapdir.htm
3131
type SnapshotDirsInfo struct {
3232
// Global is the name of the global snapshots subdirectory.
3333
Global string

tools/e2e-tester/main.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import (
99
"os/exec"
1010
"path/filepath"
1111

12-
"gopkg.in/yaml.v3"
1312
_ "github.com/go-sql-driver/mysql"
13+
"gopkg.in/yaml.v3"
1414

1515
"git.scc.kit.edu/sdm/lsdf-checksum/scaleadpt"
1616
)
@@ -168,7 +168,7 @@ func clearDatabase(driver, dataSourceName string) error {
168168
}
169169
}
170170

171-
_, err = tx.ExecContext(ctx, "SET FOREIGN_KEY_CHECKS = 1;");
171+
_, err = tx.ExecContext(ctx, "SET FOREIGN_KEY_CHECKS = 1;")
172172
if err != nil {
173173
return fmt.Errorf("clearDatabase: enable foreign key checks: %w", err)
174174
}

workqueue/scheduler/oderbook.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
type orderBookOrder struct {
99
total int
1010
fulfilled int
11-
book *orderBook
11+
book *orderBook
1212
}
1313

1414
func (o *orderBookOrder) Total() int {
@@ -133,7 +133,7 @@ func (o *orderBook) AcquireOrder(ctx context.Context, max uint) (orderBookOrder,
133133
}
134134
return orderBookOrder{
135135
total: int(c),
136-
book: o,
136+
book: o,
137137
}, nil
138138
}
139139
}

workqueue/scheduler/scheduler.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ type Scheduler[T workqueue.JobPayload] struct {
8585

8686
func New[T workqueue.JobPayload](queue *workqueue.QueueClient[T], config Config) *Scheduler[T] {
8787
return &Scheduler[T]{
88-
config: config,
89-
queue: queue,
88+
config: config,
89+
queue: queue,
9090
orderBook: *newOrderBook(),
9191
}
9292
}

0 commit comments

Comments
 (0)