mirror of
https://github.com/taigrr/log-socket
synced 2026-03-20 14:52:27 -07:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
41aad10e6c
|
|||
| 64ab2564c1 |
3
.github/workflows/ci.yaml
vendored
3
.github/workflows/ci.yaml
vendored
@@ -4,7 +4,6 @@ on: [push]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
@@ -12,7 +11,7 @@ jobs:
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: '1.16'
|
||||
go-version: "1.21"
|
||||
|
||||
- name: Install dependencies
|
||||
run: go get .
|
||||
|
||||
@@ -10,6 +10,10 @@ import (
|
||||
|
||||
var upgrader = websocket.Upgrader{} // use default options
|
||||
|
||||
func SetUpgrader(u websocket.Upgrader) {
|
||||
upgrader = u
|
||||
}
|
||||
|
||||
func LogSocketHandler(w http.ResponseWriter, r *http.Request) {
|
||||
c, err := upgrader.Upgrade(w, r, nil)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user