feat(mockindexer): support feeds and webhooks (#1361)

This commit is contained in:
ze0s 2024-01-21 12:12:34 +01:00 committed by GitHub
parent f488c88f1b
commit c377bc9157
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 346 additions and 49 deletions

View file

@ -21,12 +21,13 @@ type ServerOptions struct {
}
func NewServer(options *ServerOptions) (*Server, error) {
listener, err := net.Listen("tcp", "localhost:6697")
listener, err := net.Listen("tcp", ":6697")
if err != nil {
return nil, err
}
log.Printf("IRC server running on %q", listener.Addr())
return &Server{
listener: listener,
options: options,
@ -36,7 +37,6 @@ func NewServer(options *ServerOptions) (*Server, error) {
func (s *Server) Run() {
for {
conn, err := s.listener.Accept()
if err != nil {
log.Printf("Failed accept: %v", err)
continue