Skip to content

Commit

Permalink
Tweaks for Go 1.17.1
Browse files Browse the repository at this point in the history
- Use a buffered channel for signal handling.  Unbuffered channels
  aren't supported for signals anymore, apparently.
- Syntax tweak for build conditionals.
  • Loading branch information
zorchenhimer committed Oct 2, 2021
1 parent 3396761 commit 7e8126d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions common/logging_dev.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build dev
// +build dev

package common
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ func main() {
}

func handleInterrupt(exit chan bool) {
ch := make(chan os.Signal)
ch := make(chan os.Signal, 5)
signal.Notify(ch, os.Interrupt)
<-ch
common.LogInfoln("Closing server")
Expand Down
1 change: 1 addition & 0 deletions wasm/main.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build js && wasm
// +build js,wasm

package main
Expand Down
1 change: 1 addition & 0 deletions wasm/suggestions.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build js && wasm
// +build js,wasm

package main
Expand Down

0 comments on commit 7e8126d

Please sign in to comment.