From 2597c03d1555e00dec59830b7de75e7090208e05 Mon Sep 17 00:00:00 2001 From: Slack Coder Date: Wed, 2 Oct 2024 16:49:36 -0500 Subject: config: Use TOML TOML is simple for users, and it is used in notably projects like rustlang. It also provides comments! --- internal/service/service.go | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'internal/service/service.go') diff --git a/internal/service/service.go b/internal/service/service.go index c34bcd3..38cabf8 100644 --- a/internal/service/service.go +++ b/internal/service/service.go @@ -1,11 +1,9 @@ package service import ( - "encoding/json" "errors" "fmt" "math/rand" - "net/url" "os" "strconv" "strings" @@ -15,25 +13,6 @@ import ( "git.server.ky/slackcoder/mirror/internal/github" ) -type Mirror struct { - Method string `json:"method"` - From *url.URL `json:"-"` - To *url.URL `json:"-"` - Description string `json:"description,omitempty"` -} - -func (m *Mirror) Equal(arg *Mirror) bool { - return m.Method == arg.Method && m.From.String() == arg.From.String() && m.To.String() == arg.To.String() -} - -func (m *Mirror) String() string { - buf, err := json.Marshal(m) - if err != nil { - panic(err) - } - return string(buf) -} - type Service struct { cfg *Config -- cgit v1.2.3