mirror of
https://github.com/taigrr/log-socket
synced 2025-01-18 04:53:14 -08:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
f114098a8c
|
|||
|
|
2571dbe347 | ||
|
80b80758de
|
|||
|
0fa4de7961
|
|||
|
50c507c8f4
|
24
.github/workflows/ci.yaml
vendored
Normal file
24
.github/workflows/ci.yaml
vendored
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
name: Go package
|
||||||
|
|
||||||
|
on: [push]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Set up Go
|
||||||
|
uses: actions/setup-go@v4
|
||||||
|
with:
|
||||||
|
go-version: '1.16'
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: go get .
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: go build -v ./...
|
||||||
|
|
||||||
|
- name: Test
|
||||||
|
run: go test -v ./...
|
||||||
2
go.mod
2
go.mod
@@ -1,5 +1,5 @@
|
|||||||
module github.com/taigrr/log-socket
|
module github.com/taigrr/log-socket
|
||||||
|
|
||||||
go 1.16
|
go 1.21
|
||||||
|
|
||||||
require github.com/gorilla/websocket v1.5.0
|
require github.com/gorilla/websocket v1.5.0
|
||||||
|
|||||||
@@ -7,6 +7,10 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
func Default() *Logger {
|
||||||
|
return &Logger{FileInfoDepth: 0}
|
||||||
|
}
|
||||||
|
|
||||||
func (l *Logger) SetInfoDepth(depth int) {
|
func (l *Logger) SetInfoDepth(depth int) {
|
||||||
l.FileInfoDepth = depth
|
l.FileInfoDepth = depth
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user