Update dependencies and build to go1.22 (#2113)
* Update dependencies and build to go1.22 * Fix api changes wrt to dependencies * Update golangci config
This commit is contained in:
28
vendor/github.com/lrstanley/girc/.golangci.yml
generated
vendored
28
vendor/github.com/lrstanley/girc/.golangci.yml
generated
vendored
@@ -62,7 +62,6 @@ linters:
|
||||
- godot # checks if comments end in a period
|
||||
- godox # detects FIXME, TODO and other comment keywords
|
||||
- goimports # in addition to fixing imports, goimports also formats your code in the same style as gofmt
|
||||
- gomnd # detects magic numbers
|
||||
- gomoddirectives # manages the use of 'replace', 'retract', and 'excludes' directives in go.mod
|
||||
- gomodguard # allow and block lists linter for direct Go module dependencies. This is different from depguard where there are different block types for example version constraints and module recommendations
|
||||
- goprintffuncname # checks that printf-like functions are named with f at the end
|
||||
@@ -99,6 +98,7 @@ linters:
|
||||
- whitespace # detects leading and trailing whitespace
|
||||
|
||||
# disabled for now:
|
||||
# - gomnd # detects magic numbers
|
||||
# - errname # checks that sentinel errors are prefixed with the Err and error types are suffixed with the Error
|
||||
# - gochecknoglobals # checks that no global variables exist
|
||||
# - gocognit # computes and checks the cognitive complexity of functions
|
||||
@@ -150,19 +150,19 @@ linters-settings:
|
||||
# Whether to skip (*x).method() calls where x is a pointer receiver.
|
||||
skipRecvDeref: false
|
||||
|
||||
gomnd:
|
||||
# Values always ignored: `time.Date`,
|
||||
# `strconv.FormatInt`, `strconv.FormatUint`, `strconv.FormatFloat`,
|
||||
# `strconv.ParseInt`, `strconv.ParseUint`, `strconv.ParseFloat`.
|
||||
ignored-functions:
|
||||
- os.Chmod
|
||||
- os.Mkdir
|
||||
- os.MkdirAll
|
||||
- os.OpenFile
|
||||
- os.WriteFile
|
||||
- prometheus.ExponentialBuckets
|
||||
- prometheus.ExponentialBucketsRange
|
||||
- prometheus.LinearBuckets
|
||||
# gomnd:
|
||||
# # Values always ignored: `time.Date`,
|
||||
# # `strconv.FormatInt`, `strconv.FormatUint`, `strconv.FormatFloat`,
|
||||
# # `strconv.ParseInt`, `strconv.ParseUint`, `strconv.ParseFloat`.
|
||||
# ignored-functions:
|
||||
# - os.Chmod
|
||||
# - os.Mkdir
|
||||
# - os.MkdirAll
|
||||
# - os.OpenFile
|
||||
# - os.WriteFile
|
||||
# - prometheus.ExponentialBuckets
|
||||
# - prometheus.ExponentialBucketsRange
|
||||
# - prometheus.LinearBuckets
|
||||
|
||||
gomodguard:
|
||||
blocked:
|
||||
|
||||
2
vendor/github.com/lrstanley/girc/LICENSE
generated
vendored
2
vendor/github.com/lrstanley/girc/LICENSE
generated
vendored
@@ -1,6 +1,6 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2016 Liam Stanley <me@liamstanley.io>
|
||||
Copyright (c) 2016 Liam Stanley <liam@liam.sh>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
2
vendor/github.com/lrstanley/girc/README.md
generated
vendored
2
vendor/github.com/lrstanley/girc/README.md
generated
vendored
@@ -93,6 +93,8 @@ usecases/examples/projects which utilize girc:
|
||||
| [nagios-check-ircd](https://github.com/lrstanley/nagios-check-ircd) | Nagios utility for monitoring the health of an ircd |
|
||||
| [nagios-notify-irc](https://github.com/lrstanley/nagios-notify-irc) | Nagios utility for sending alerts to one or many channels/networks |
|
||||
| [matterbridge](https://github.com/42wim/matterbridge) | bridge between mattermost, IRC, slack, discord (and many others) with REST API |
|
||||
| [milla](https://github.com/terminaldweller/milla) | An LLM bot with syntax Highlighting |
|
||||
| [hii](https://github.com/nmeum/hii) | A file-based IRC client |
|
||||
|
||||
Working on a project and want to add it to the list? Submit a pull request!
|
||||
|
||||
|
||||
6
vendor/github.com/lrstanley/girc/client.go
generated
vendored
6
vendor/github.com/lrstanley/girc/client.go
generated
vendored
@@ -312,11 +312,7 @@ func New(config Config) *Client {
|
||||
// the event can't be sent within 30s.
|
||||
func (c *Client) receive(e *Event) {
|
||||
t := time.NewTimer(30 * time.Second)
|
||||
defer func() {
|
||||
if !t.Stop() {
|
||||
<-t.C
|
||||
}
|
||||
}()
|
||||
defer t.Stop()
|
||||
|
||||
select {
|
||||
case c.rx <- e:
|
||||
|
||||
25
vendor/github.com/lrstanley/girc/conn.go
generated
vendored
25
vendor/github.com/lrstanley/girc/conn.go
generated
vendored
@@ -150,35 +150,24 @@ type decodedEvent struct {
|
||||
}
|
||||
|
||||
func (c *ircConn) decode() <-chan decodedEvent {
|
||||
ch := make(chan decodedEvent)
|
||||
ch := make(chan decodedEvent, 1)
|
||||
|
||||
go func() {
|
||||
defer close(ch)
|
||||
|
||||
line, err := c.io.ReadString(delim)
|
||||
if err != nil {
|
||||
select {
|
||||
case ch <- decodedEvent{err: err}:
|
||||
default:
|
||||
}
|
||||
|
||||
ch <- decodedEvent{err: err}
|
||||
return
|
||||
}
|
||||
|
||||
event := ParseEvent(line)
|
||||
if event == nil {
|
||||
select {
|
||||
case ch <- decodedEvent{err: ErrParseEvent{Line: line}}:
|
||||
default:
|
||||
}
|
||||
|
||||
ch <- decodedEvent{err: ErrParseEvent{Line: line}}
|
||||
return
|
||||
}
|
||||
|
||||
select {
|
||||
case ch <- decodedEvent{event: event}:
|
||||
default:
|
||||
}
|
||||
ch <- decodedEvent{event: event}
|
||||
}()
|
||||
|
||||
return ch
|
||||
@@ -497,11 +486,7 @@ func (c *Client) write(event *Event) {
|
||||
}
|
||||
|
||||
t := time.NewTimer(30 * time.Second)
|
||||
defer func() {
|
||||
if !t.Stop() {
|
||||
<-t.C
|
||||
}
|
||||
}()
|
||||
defer t.Stop()
|
||||
|
||||
select {
|
||||
case c.tx <- event:
|
||||
|
||||
Reference in New Issue
Block a user