1
0
Fork 0
mirror of synced 2025-04-04 21:53:37 +03:00

ci & examples fixes

This commit is contained in:
Pavel 2025-03-21 14:20:22 +03:00
parent ecaadad665
commit 45c2f1aaf5
4 changed files with 16 additions and 13 deletions

View file

@ -18,12 +18,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Set up Go 1.17
uses: actions/setup-go@v2
uses: actions/checkout@v4
- name: Set up Go 1.24
uses: actions/setup-go@v5
with:
# TODO: Should migrate to 1.18 later
go-version: '1.17'
go-version: '1.24'
- name: Get dependencies
run: go mod tidy
- name: Lint code with golangci-lint
@ -36,14 +35,14 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ['1.13', '1.14', '1.15', '1.16', '1.17']
go-version: ['1.13', '1.14', '1.15', '1.16', '1.17', '1.18', '1.19', '1.20', '1.21', '1.22', '1.23', '1.24']
steps:
- name: Set up Go ${{ matrix.go-version }}
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Check out code into the Go module directory
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Get dependencies
run: go mod tidy
- name: Tests

View file

@ -48,7 +48,8 @@ func main() {
fmt.Println("Something went wrong!", err)
}
r.Text(fmt.Sprintf("Hello, %v!", p.FirstName), messenger.ResponseType, "")
r.Text(fmt.Sprintf("Hello, %v!", p.FirstName),
messenger.ResponseType, "", messenger.NotificationRegularType)
})
// Setup a handler to be triggered when a message is delivered

View file

@ -57,7 +57,8 @@ func main() {
fmt.Println("Something went wrong!", err)
}
r.Text(fmt.Sprintf("Hello, %v!", p.FirstName), messenger.ResponseType, "")
r.Text(fmt.Sprintf("Hello, %v!", p.FirstName), messenger.ResponseType,
"", messenger.NotificationRegularType)
})
addr := fmt.Sprintf("%s:%d", *host, *port)

View file

@ -84,7 +84,8 @@ func main() {
text = "You've been logged out of your account."
}
if _, err := r.Text(text, messenger.ResponseType, ""); err != nil {
if _, err := r.Text(text, messenger.ResponseType,
"", messenger.NotificationRegularType); err != nil {
log.Println("Failed to send account linking feedback")
}
})
@ -134,7 +135,8 @@ func logoutButton(r *messenger.Response) error {
// greeting salutes the user.
func greeting(p messenger.Profile, r *messenger.Response) error {
_, err := r.Text(fmt.Sprintf("Hello, %v!", p.FirstName), messenger.ResponseType, "")
_, err := r.Text(fmt.Sprintf("Hello, %v!", p.FirstName), messenger.ResponseType,
"", messenger.NotificationRegularType)
return err
}
@ -156,7 +158,7 @@ func help(p messenger.Profile, r *messenger.Response) error {
},
}
_, err := r.TextWithReplies(text, replies, messenger.ResponseType, "")
_, err := r.TextWithReplies(text, replies, messenger.ResponseType, "", messenger.NotificationRegularType)
return err
}