Update go1.21 and CI (#315)

* Update to go 1.21

Use `atomic.Bool` stdlib instead of including our own.

Include `tools\mkwinsyscall` updates from go-winio/283 to switch to
`syscallN`.
Note: removed `// TODO` about `print`/`ln`, since the latter adds spaces
between args when printing, which is undesired.

Also update CI to run steps on windows-2022 instead of windows-2019,
similar to our hcsshim CI.

Signed-off-by: Hamza El-Saawy <hamzaelsaawy@microsoft.com>

* PR: simplify type checking

Signed-off-by: Hamza El-Saawy <hamzaelsaawy@microsoft.com>

---------

Signed-off-by: Hamza El-Saawy <hamzaelsaawy@microsoft.com>
This commit is contained in:
Hamza El-Saawy
2024-04-09 16:07:04 -04:00
committed by GitHub
parent 008bc6ea43
commit 3c9576c934
20 changed files with 125 additions and 227 deletions
+1 -1
View File
@@ -507,7 +507,7 @@ func SmartField(name string, v interface{}) FieldOpt {
case reflect.Float32:
return SmartField(name, float32(rv.Float()))
case reflect.Float64:
return SmartField(name, float64(rv.Float())) //nolint:unconvert // make look consistent
return SmartField(name, float64(rv.Float()))
case reflect.String:
return SmartField(name, rv.String())
case reflect.Struct: