Skip to content
This repository was archived by the owner on Oct 22, 2024. It is now read-only.

Commit 8deb1ed

Browse files
authored
Merge pull request #1082 from pohly/go-1.19
build: update to Go 1.19
2 parents 9ef94b0 + d22bdd1 commit 8deb1ed

File tree

16 files changed

+52
-55
lines changed

16 files changed

+52
-55
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ARG LINUX_BASE=debian:buster-slim
99
FROM ${LINUX_BASE} AS build
1010
ARG APT_GET="env DEBIAN_FRONTEND=noninteractive apt-get"
1111

12-
ARG GO_VERSION="1.18.1"
12+
ARG GO_VERSION="1.19"
1313

1414
# CACHEBUST is set by the CI when building releases to ensure that apt-get really gets
1515
# run instead of just using some older, cached result.

pkg/imagefile/imagefile.go

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -23,30 +23,29 @@ Furthermore, this file is based on the following code published by Intel under A
2323
/*
2424
Package imagefile contains code to create a file with the following content:
2525
26-
.-----------.----------.---------------.
27-
| 0 - 512 B | 4 - 8 Kb | 2M - ... |
28-
|-----------+----------+---------------+
29-
| MBR #1 | DAX | FS |
30-
'-----------'----------'---------------'
31-
| | ^
32-
| '-data-'
33-
| |
34-
'--fs-partition--'
35-
36-
^ ^
37-
daxHeaderOffset |
38-
HeaderSize
39-
26+
.-----------.----------.---------------.
27+
| 0 - 512 B | 4 - 8 Kb | 2M - ... |
28+
|-----------+----------+---------------+
29+
| MBR #1 | DAX | FS |
30+
'-----------'----------'---------------'
31+
| | ^
32+
| '-data-'
33+
| |
34+
'--fs-partition--'
35+
36+
^ ^
37+
daxHeaderOffset |
38+
HeaderSize
4039
4140
MBR: Master boot record.
4241
DAX: Metadata required by the NVDIMM driver to enable DAX in the guest (struct nd_pfn_sb).
4342
FS: partition that contains a filesystem.
4443
4544
The MBR is useful for working with the image file:
46-
- the `file` utility uses it to determine what the file contains
47-
- when binding the entire file to /dev/loop0, /dev/loop0p1 will be
48-
the file system (beware that partprobe /dev/loop0 might be needed);
49-
alternatively one could bind the file system directly by specifying an offset
45+
- the `file` utility uses it to determine what the file contains
46+
- when binding the entire file to /dev/loop0, /dev/loop0p1 will be
47+
the file system (beware that partprobe /dev/loop0 might be needed);
48+
alternatively one could bind the file system directly by specifying an offset
5049
5150
When such a file is created on a dax-capable filesystem, then it can
5251
be used as backing store for a [QEMU nvdimm

pkg/ndctl/namespace.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ const (
4343
NoneMap MapLocation = "none"
4444
)
4545

46-
//NamespaceType type to represent namespace type
46+
// NamespaceType type to represent namespace type
4747
type NamespaceType string
4848

49-
//NamespaceMode represents mode of the namespace
49+
// NamespaceMode represents mode of the namespace
5050
type NamespaceMode string
5151

5252
func (mode NamespaceMode) toCMode() C.enum_ndctl_namespace_mode {

pkg/ndctl/ndctl.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const (
2121
mib2 uint64 = mib * 2
2222
)
2323

24-
//CreateNamespaceOpts options to create a namespace
24+
// CreateNamespaceOpts options to create a namespace
2525
type CreateNamespaceOpts struct {
2626
Name string
2727
Size uint64

pkg/pmem-csi-driver/pmem-csi-driver.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ func init() {
9393
simpleMetrics.MustRegister(buildInfo)
9494
}
9595

96-
//Config type for driver configuration
96+
// Config type for driver configuration
9797
type Config struct {
9898
//DriverName name of the csi driver
9999
DriverName string

pkg/pmem-csi-operator/controller/deployment/controller_driver.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -240,12 +240,12 @@ type redeployObject struct {
240240

241241
// redeploy creates or patches one sub-object so that it matches
242242
// the PmemCSIDeployment spec.
243-
// 1.
244-
// 2. Retrieve the latest data saved at APIServer for that object.
245-
// 3. Create an objectPatch for that object to record the changes from this point.
246-
// 4. Call ro.modify() to modify the object's data.
247-
// 5. Call objectPatch.Apply() to submit the chanages to the APIServer.
248-
// 6. If the update in step-5 was success, then call the ro.postUpdate() callback
243+
//
244+
// 1. Retrieve the latest data saved at APIServer for that object.
245+
// 2. Create an objectPatch for that object to record the changes from this point.
246+
// 3. Call ro.modify() to modify the object's data.
247+
// 4. Call objectPatch.Apply() to submit the chanages to the APIServer.
248+
// 5. If the update in step 4 was success, then call the ro.postUpdate() callback
249249
// to run any post update steps.
250250
func (d *pmemCSIDeployment) redeploy(ctx context.Context, r *ReconcileDeployment, ro redeployObject) (finalObj client.Object, finalErr error) {
251251
l := klog.FromContext(ctx).WithName("redeploy")

pkg/pmem-csi-operator/controller/deployment/deployment_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ func (r *ReconcileDeployment) RemoveHook(h ReconcileHook) {
368368
delete(r.reconcileHooks, h)
369369
}
370370

371-
//Get tries to retrives the Kubernetes objects
371+
// Get tries to retrives the Kubernetes objects
372372
func (r *ReconcileDeployment) Get(obj client.Object) error {
373373
key := client.ObjectKeyFromObject(obj)
374374
return r.client.Get(r.ctx, key, obj)

pkg/pmem-device-manager/pmd-lvm.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ func listDevices(ctx context.Context, volumeGroups ...string) (map[string]*PmemD
279279
return parseLVSOutput(output)
280280
}
281281

282-
//lvs options "lv_name,lv_path,lv_size,lv_free"
282+
// lvs options "lv_name,lv_path,lv_size,lv_free"
283283
func parseLVSOutput(output string) (map[string]*PmemDeviceInfo, error) {
284284
devices := map[string]*PmemDeviceInfo{}
285285
lines := strings.Split(output, "\n")

pkg/pmem-device-manager/pmd-manager.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ type PmemDeviceCapacity interface {
7171
GetCapacity(ctx context.Context) (Capacity, error)
7272
}
7373

74-
//PmemDeviceManager interface to manage the PMEM block devices
74+
// PmemDeviceManager interface to manage the PMEM block devices
7575
type PmemDeviceManager interface {
7676
PmemDeviceCapacity
7777

pkg/pmem-device-manager/pmd-ndctl.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ var _ PmemDeviceManager = &pmemNdctl{}
3030
// our locking strategy.
3131
var ndctlMutex = &sync.Mutex{}
3232

33-
//NewPmemDeviceManagerNdctl Instantiates a new ndctl based pmem device manager
33+
// NewPmemDeviceManagerNdctl Instantiates a new ndctl based pmem device manager
3434
// FIXME(avalluri): consider pmemPercentage while calculating available space
3535
func newPmemDeviceManagerNdctl(ctx context.Context, pmemPercentage uint) (PmemDeviceManager, error) {
3636
ctx, _ = pmemlog.WithName(ctx, "ndctl-New")

0 commit comments

Comments
 (0)