From 674c4d86b3bed9c03d43c0b00825dd4508c0f8c5 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Sun, 17 Aug 2025 18:08:35 +0800 Subject: Move all config typedefs to config.go --- forged/internal/ipc/irc/bot.go | 12 ------------ forged/internal/ipc/irc/config.go | 13 +++++++++++++ 2 files changed, 13 insertions(+), 12 deletions(-) create mode 100644 forged/internal/ipc/irc/config.go (limited to 'forged/internal/ipc') diff --git a/forged/internal/ipc/irc/bot.go b/forged/internal/ipc/irc/bot.go index c7a188b..07008ae 100644 --- a/forged/internal/ipc/irc/bot.go +++ b/forged/internal/ipc/irc/bot.go @@ -13,18 +13,6 @@ import ( "go.lindenii.runxiyu.org/forge/forged/internal/common/misc" ) -// Config contains IRC connection and identity settings for the bot. -// This should usually be a part of the primary config struct. -type Config struct { - Net string `scfg:"net"` - Addr string `scfg:"addr"` - TLS bool `scfg:"tls"` - SendQ uint `scfg:"sendq"` - Nick string `scfg:"nick"` - User string `scfg:"user"` - Gecos string `scfg:"gecos"` -} - // Bot represents an IRC bot client that handles events and allows for sending messages. type Bot struct { // TODO: Use each config field instead of embedding Config here. diff --git a/forged/internal/ipc/irc/config.go b/forged/internal/ipc/irc/config.go new file mode 100644 index 0000000..b1b5703 --- /dev/null +++ b/forged/internal/ipc/irc/config.go @@ -0,0 +1,13 @@ +package irc + +// Config contains IRC connection and identity settings for the bot. +// This should usually be a part of the primary config struct. +type Config struct { + Net string `scfg:"net"` + Addr string `scfg:"addr"` + TLS bool `scfg:"tls"` + SendQ uint `scfg:"sendq"` + Nick string `scfg:"nick"` + User string `scfg:"user"` + Gecos string `scfg:"gecos"` +} -- cgit v1.2.3