Skip to content

Commit 458b399

Browse files
authored
Merge pull request #406 from bgilbert/go
workflows: add Go 1.19; update actions versions
2 parents f5f8d59 + 3de1c61 commit 458b399

File tree

4 files changed

+22
-19
lines changed

4 files changed

+22
-19
lines changed

.github/workflows/go.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
---
21
name: Go
3-
"on":
2+
on:
43
push:
54
branches: [main]
65
pull_request:
@@ -11,22 +10,22 @@ permissions:
1110

1211
env:
1312
# Minimum supported Go toolchain
14-
ACTION_MINIMUM_TOOLCHAIN: "1.12"
13+
ACTION_MINIMUM_TOOLCHAIN: "1.12.x"
1514

1615
jobs:
1716
build:
1817
name: "Build"
1918
runs-on: ubuntu-latest
2019
strategy:
2120
matrix:
22-
go: ['1.17', '1.18']
21+
go: ['1.17.x', '1.18.x', '1.19.x']
2322
steps:
2423
- run: sudo apt-get -qq update
2524
- name: Install libsystemd-dev
2625
run: sudo apt-get install libsystemd-dev
27-
- uses: actions/checkout@v2
26+
- uses: actions/checkout@v3
2827
- name: Setup go
29-
uses: actions/setup-go@v1
28+
uses: actions/setup-go@v3
3029
with:
3130
go-version: ${{ matrix.go }}
3231
- name: Go fmt
@@ -44,9 +43,9 @@ jobs:
4443
- run: sudo apt-get -qq update
4544
- name: Install libsystemd-dev
4645
run: sudo apt-get install libsystemd-dev
47-
- uses: actions/checkout@v2
46+
- uses: actions/checkout@v3
4847
- name: Setup go
49-
uses: actions/setup-go@v1
48+
uses: actions/setup-go@v3
5049
with:
5150
go-version: ${{ env['ACTION_MINIMUM_TOOLCHAIN'] }}
5251
- name: Go fmt

daemon/watchdog.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ import (
3030
// It returns one of the following:
3131
// (0, nil) - watchdog isn't enabled or we aren't the watched PID.
3232
// (0, err) - an error happened (e.g. error converting time).
33-
// (time, nil) - watchdog is enabled and we can send ping.
34-
// time is delay before inactive service will be killed.
33+
// (time, nil) - watchdog is enabled and we can send ping. time is delay
34+
// before inactive service will be killed.
3535
func SdWatchdogEnabled(unsetEnvironment bool) (time.Duration, error) {
3636
wusec := os.Getenv("WATCHDOG_USEC")
3737
wpid := os.Getenv("WATCHDOG_PID")

internal/dlopen/dlopen_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
14+
1415
package dlopen
1516

1617
import (

unit/escape.go

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,15 @@ const (
2727
)
2828

2929
// If isPath is true:
30-
// We remove redundant '/'s, the leading '/', and trailing '/'.
31-
// If the result is empty, a '/' is inserted.
30+
//
31+
// We remove redundant '/'s, the leading '/', and trailing '/'.
32+
// If the result is empty, a '/' is inserted.
3233
//
3334
// We always:
34-
// Replace the following characters with `\x%x`:
35-
// Leading `.`
36-
// `-`, `\`, and anything not in this set: `:-_.\[0-9a-zA-Z]`
37-
// Replace '/' with '-'.
35+
//
36+
// Replace the following characters with `\x%x`: Leading `.`,
37+
// `-`, `\`, and anything not in this set: `:-_.\[0-9a-zA-Z]`
38+
// Replace '/' with '-'.
3839
func escape(unescaped string, isPath bool) string {
3940
e := []byte{}
4041
inSlashes := false
@@ -69,11 +70,13 @@ func escape(unescaped string, isPath bool) string {
6970
}
7071

7172
// If isPath is true:
72-
// We always return a string beginning with '/'.
73+
//
74+
// We always return a string beginning with '/'.
7375
//
7476
// We always:
75-
// Replace '-' with '/'.
76-
// Replace `\x%x` with the value represented in hex.
77+
//
78+
// Replace '-' with '/'.
79+
// Replace `\x%x` with the value represented in hex.
7780
func unescape(escaped string, isPath bool) string {
7881
u := []byte{}
7982
for i := 0; i < len(escaped); i++ {

0 commit comments

Comments
 (0)