1
0
mirror of https://github.com/axllent/mailpit.git synced 2025-07-01 00:45:27 +02:00

Chore: Update internal import paths

This commit is contained in:
Ralph Slooten
2023-09-25 18:08:04 +13:00
parent 10224e7c8b
commit b6d5a8c182
29 changed files with 44 additions and 44 deletions

View File

@ -24,7 +24,7 @@ jobs:
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: | restore-keys: |
${{ runner.os }}-go- ${{ runner.os }}-go-
- run: go test ./storage ./server ./utils/tools -v - run: go test ./storage ./server ./internal/tools -v
- run: go test ./storage -bench=. - run: go test ./storage -bench=.
# build the assets # build the assets

View File

@ -8,10 +8,10 @@ import (
"strings" "strings"
"github.com/axllent/mailpit/config" "github.com/axllent/mailpit/config"
"github.com/axllent/mailpit/internal/logger"
"github.com/axllent/mailpit/server" "github.com/axllent/mailpit/server"
"github.com/axllent/mailpit/server/smtpd" "github.com/axllent/mailpit/server/smtpd"
"github.com/axllent/mailpit/storage" "github.com/axllent/mailpit/storage"
"github.com/axllent/mailpit/utils/logger"
"github.com/spf13/cobra" "github.com/spf13/cobra"
) )

View File

@ -6,7 +6,7 @@ import (
"runtime" "runtime"
"github.com/axllent/mailpit/config" "github.com/axllent/mailpit/config"
"github.com/axllent/mailpit/utils/updater" "github.com/axllent/mailpit/internal/updater"
"github.com/spf13/cobra" "github.com/spf13/cobra"
) )

View File

@ -10,8 +10,8 @@ import (
"regexp" "regexp"
"strings" "strings"
"github.com/axllent/mailpit/utils/logger" "github.com/axllent/mailpit/internal/logger"
"github.com/axllent/mailpit/utils/tools" "github.com/axllent/mailpit/internal/tools"
"github.com/tg123/go-htpasswd" "github.com/tg123/go-htpasswd"
"gopkg.in/yaml.v3" "gopkg.in/yaml.v3"
) )

View File

@ -10,8 +10,8 @@ import (
"github.com/PuerkitoBio/goquery" "github.com/PuerkitoBio/goquery"
"github.com/axllent/mailpit/config" "github.com/axllent/mailpit/config"
"github.com/axllent/mailpit/utils/logger" "github.com/axllent/mailpit/internal/logger"
"github.com/axllent/mailpit/utils/tools" "github.com/axllent/mailpit/internal/tools"
"github.com/vanng822/go-premailer/premailer" "github.com/vanng822/go-premailer/premailer"
"golang.org/x/net/html" "golang.org/x/net/html"
"golang.org/x/net/html/atom" "golang.org/x/net/html/atom"

View File

@ -5,7 +5,7 @@ import (
"strings" "strings"
"github.com/PuerkitoBio/goquery" "github.com/PuerkitoBio/goquery"
"github.com/axllent/mailpit/utils/tools" "github.com/axllent/mailpit/internal/tools"
) )
// HTML tests // HTML tests

View File

@ -6,8 +6,8 @@ import (
"strings" "strings"
"github.com/PuerkitoBio/goquery" "github.com/PuerkitoBio/goquery"
"github.com/axllent/mailpit/internal/tools"
"github.com/axllent/mailpit/storage" "github.com/axllent/mailpit/storage"
"github.com/axllent/mailpit/utils/tools"
) )
var linkRe = regexp.MustCompile(`(?m)\b(http|ftp|https):\/\/([\w_-]+(?:(?:\.[\w_-]+)+))([\w.,@?^=%&:'!\/~+#-]*[\w@?^=%&\/~+#-])`) var linkRe = regexp.MustCompile(`(?m)\b(http|ftp|https):\/\/([\w_-]+(?:(?:\.[\w_-]+)+))([\w.,@?^=%&:'!\/~+#-]*[\w@?^=%&\/~+#-])`)

View File

@ -7,7 +7,7 @@ import (
"time" "time"
"github.com/axllent/mailpit/config" "github.com/axllent/mailpit/config"
"github.com/axllent/mailpit/utils/logger" "github.com/axllent/mailpit/internal/logger"
) )
func getHTTPStatuses(links []string, followRedirects bool) []Link { func getHTTPStatuses(links []string, followRedirects bool) []Link {

View File

@ -7,7 +7,7 @@ import (
"net/mail" "net/mail"
"regexp" "regexp"
"github.com/axllent/mailpit/utils/logger" "github.com/axllent/mailpit/internal/logger"
) )
// RemoveMessageHeaders scans a message for headers, if found them removes them. // RemoveMessageHeaders scans a message for headers, if found them removes them.

View File

@ -13,7 +13,7 @@ import (
"path/filepath" "path/filepath"
"runtime" "runtime"
"github.com/axllent/mailpit/utils/logger" "github.com/axllent/mailpit/internal/logger"
"github.com/axllent/semver" "github.com/axllent/semver"
) )

View File

@ -24,7 +24,7 @@ import (
"strings" "strings"
"github.com/axllent/mailpit/config" "github.com/axllent/mailpit/config"
"github.com/axllent/mailpit/utils/logger" "github.com/axllent/mailpit/internal/logger"
"github.com/reiver/go-telnet" "github.com/reiver/go-telnet"
flag "github.com/spf13/pflag" flag "github.com/spf13/pflag"
) )

View File

@ -11,12 +11,12 @@ import (
"strings" "strings"
"github.com/axllent/mailpit/config" "github.com/axllent/mailpit/config"
"github.com/axllent/mailpit/internal/htmlcheck"
"github.com/axllent/mailpit/internal/linkcheck"
"github.com/axllent/mailpit/internal/logger"
"github.com/axllent/mailpit/internal/tools"
"github.com/axllent/mailpit/server/smtpd" "github.com/axllent/mailpit/server/smtpd"
"github.com/axllent/mailpit/storage" "github.com/axllent/mailpit/storage"
"github.com/axllent/mailpit/utils/htmlcheck"
"github.com/axllent/mailpit/utils/linkcheck"
"github.com/axllent/mailpit/utils/logger"
"github.com/axllent/mailpit/utils/tools"
"github.com/gorilla/mux" "github.com/gorilla/mux"
uuid "github.com/satori/go.uuid" uuid "github.com/satori/go.uuid"
) )

View File

@ -7,8 +7,8 @@ import (
"runtime" "runtime"
"github.com/axllent/mailpit/config" "github.com/axllent/mailpit/config"
"github.com/axllent/mailpit/internal/updater"
"github.com/axllent/mailpit/storage" "github.com/axllent/mailpit/storage"
"github.com/axllent/mailpit/utils/updater"
) )
// Response includes the current and latest Mailpit version, database info, and memory usage // Response includes the current and latest Mailpit version, database info, and memory usage

View File

@ -1,9 +1,9 @@
package apiv1 package apiv1
import ( import (
"github.com/axllent/mailpit/internal/htmlcheck"
"github.com/axllent/mailpit/internal/linkcheck"
"github.com/axllent/mailpit/storage" "github.com/axllent/mailpit/storage"
"github.com/axllent/mailpit/utils/htmlcheck"
"github.com/axllent/mailpit/utils/linkcheck"
) )
// MessagesSummary is a summary of a list of messages // MessagesSummary is a summary of a list of messages

View File

@ -10,8 +10,8 @@ import (
"net/http" "net/http"
"strings" "strings"
"github.com/axllent/mailpit/internal/logger"
"github.com/axllent/mailpit/storage" "github.com/axllent/mailpit/storage"
"github.com/axllent/mailpit/utils/logger"
"github.com/disintegration/imaging" "github.com/disintegration/imaging"
"github.com/gorilla/mux" "github.com/gorilla/mux"
"github.com/jhillyerd/enmime" "github.com/jhillyerd/enmime"

View File

@ -11,7 +11,7 @@ import (
"time" "time"
"github.com/axllent/mailpit/config" "github.com/axllent/mailpit/config"
"github.com/axllent/mailpit/utils/logger" "github.com/axllent/mailpit/internal/logger"
) )
var linkRe = regexp.MustCompile(`(?i)^https?:\/\/`) var linkRe = regexp.MustCompile(`(?i)^https?:\/\/`)

View File

@ -15,11 +15,11 @@ import (
"text/template" "text/template"
"github.com/axllent/mailpit/config" "github.com/axllent/mailpit/config"
"github.com/axllent/mailpit/internal/logger"
"github.com/axllent/mailpit/server/apiv1" "github.com/axllent/mailpit/server/apiv1"
"github.com/axllent/mailpit/server/handlers" "github.com/axllent/mailpit/server/handlers"
"github.com/axllent/mailpit/server/websockets" "github.com/axllent/mailpit/server/websockets"
"github.com/axllent/mailpit/storage" "github.com/axllent/mailpit/storage"
"github.com/axllent/mailpit/utils/logger"
"github.com/gorilla/mux" "github.com/gorilla/mux"
) )

View File

@ -12,9 +12,9 @@ import (
"testing" "testing"
"github.com/axllent/mailpit/config" "github.com/axllent/mailpit/config"
"github.com/axllent/mailpit/internal/logger"
"github.com/axllent/mailpit/server/apiv1" "github.com/axllent/mailpit/server/apiv1"
"github.com/axllent/mailpit/storage" "github.com/axllent/mailpit/storage"
"github.com/axllent/mailpit/utils/logger"
"github.com/jhillyerd/enmime" "github.com/jhillyerd/enmime"
) )

View File

@ -8,7 +8,7 @@ import (
"net/smtp" "net/smtp"
"github.com/axllent/mailpit/config" "github.com/axllent/mailpit/config"
"github.com/axllent/mailpit/utils/logger" "github.com/axllent/mailpit/internal/logger"
) )
func allowedRecipients(to []string) []string { func allowedRecipients(to []string) []string {

View File

@ -10,8 +10,8 @@ import (
"strings" "strings"
"github.com/axllent/mailpit/config" "github.com/axllent/mailpit/config"
"github.com/axllent/mailpit/internal/logger"
"github.com/axllent/mailpit/storage" "github.com/axllent/mailpit/storage"
"github.com/axllent/mailpit/utils/logger"
"github.com/mhale/smtpd" "github.com/mhale/smtpd"
uuid "github.com/satori/go.uuid" uuid "github.com/satori/go.uuid"
) )

View File

@ -776,7 +776,7 @@
} }
}, },
"x-go-name": "Response", "x-go-name": "Response",
"x-go-package": "github.com/axllent/mailpit/utils/htmlcheck" "x-go-package": "github.com/axllent/mailpit/internal/htmlcheck"
}, },
"HTMLCheckResult": { "HTMLCheckResult": {
"description": "Result struct", "description": "Result struct",
@ -808,7 +808,7 @@
} }
}, },
"x-go-name": "Result", "x-go-name": "Result",
"x-go-package": "github.com/axllent/mailpit/utils/htmlcheck" "x-go-package": "github.com/axllent/mailpit/internal/htmlcheck"
}, },
"HTMLCheckScore": { "HTMLCheckScore": {
"description": "Score struct", "description": "Score struct",
@ -836,7 +836,7 @@
} }
}, },
"x-go-name": "Score", "x-go-name": "Score",
"x-go-package": "github.com/axllent/mailpit/utils/htmlcheck" "x-go-package": "github.com/axllent/mailpit/internal/htmlcheck"
}, },
"HTMLCheckTotal": { "HTMLCheckTotal": {
"description": "Total weighted result for all scores", "description": "Total weighted result for all scores",
@ -869,7 +869,7 @@
} }
}, },
"x-go-name": "Total", "x-go-name": "Total",
"x-go-package": "github.com/axllent/mailpit/utils/htmlcheck" "x-go-package": "github.com/axllent/mailpit/internal/htmlcheck"
}, },
"HTMLCheckWarning": { "HTMLCheckWarning": {
"description": "Warning represents a failed test", "description": "Warning represents a failed test",
@ -925,7 +925,7 @@
} }
}, },
"x-go-name": "Warning", "x-go-name": "Warning",
"x-go-package": "github.com/axllent/mailpit/utils/htmlcheck" "x-go-package": "github.com/axllent/mailpit/internal/htmlcheck"
}, },
"Link": { "Link": {
"description": "Link struct", "description": "Link struct",
@ -945,7 +945,7 @@
"type": "string" "type": "string"
} }
}, },
"x-go-package": "github.com/axllent/mailpit/utils/linkcheck" "x-go-package": "github.com/axllent/mailpit/internal/linkcheck"
}, },
"LinkCheckResponse": { "LinkCheckResponse": {
"description": "Response represents the Link check response", "description": "Response represents the Link check response",
@ -965,7 +965,7 @@
} }
}, },
"x-go-name": "Response", "x-go-name": "Response",
"x-go-package": "github.com/axllent/mailpit/utils/linkcheck" "x-go-package": "github.com/axllent/mailpit/internal/linkcheck"
}, },
"Message": { "Message": {
"description": "Message data excluding physical attachments", "description": "Message data excluding physical attachments",

View File

@ -9,7 +9,7 @@ import (
"time" "time"
"github.com/axllent/mailpit/config" "github.com/axllent/mailpit/config"
"github.com/axllent/mailpit/utils/logger" "github.com/axllent/mailpit/internal/logger"
"github.com/gorilla/websocket" "github.com/gorilla/websocket"
) )

View File

@ -7,7 +7,7 @@ package websockets
import ( import (
"encoding/json" "encoding/json"
"github.com/axllent/mailpit/utils/logger" "github.com/axllent/mailpit/internal/logger"
) )
// Hub maintains the set of active clients and broadcasts messages to the // Hub maintains the set of active clients and broadcasts messages to the

View File

@ -20,8 +20,8 @@ import (
"github.com/GuiaBolso/darwin" "github.com/GuiaBolso/darwin"
"github.com/axllent/mailpit/config" "github.com/axllent/mailpit/config"
"github.com/axllent/mailpit/internal/logger"
"github.com/axllent/mailpit/server/websockets" "github.com/axllent/mailpit/server/websockets"
"github.com/axllent/mailpit/utils/logger"
"github.com/jhillyerd/enmime" "github.com/jhillyerd/enmime"
"github.com/klauspost/compress/zstd" "github.com/klauspost/compress/zstd"
"github.com/leporo/sqlf" "github.com/leporo/sqlf"

View File

@ -8,7 +8,7 @@ import (
"time" "time"
"github.com/axllent/mailpit/config" "github.com/axllent/mailpit/config"
"github.com/axllent/mailpit/utils/logger" "github.com/axllent/mailpit/internal/logger"
"github.com/jhillyerd/enmime" "github.com/jhillyerd/enmime"
"github.com/leporo/sqlf" "github.com/leporo/sqlf"
"golang.org/x/text/language" "golang.org/x/text/language"

View File

@ -8,8 +8,8 @@ import (
"strings" "strings"
"time" "time"
"github.com/axllent/mailpit/utils/logger" "github.com/axllent/mailpit/internal/logger"
"github.com/axllent/mailpit/utils/tools" "github.com/axllent/mailpit/internal/tools"
"github.com/leporo/sqlf" "github.com/leporo/sqlf"
) )

View File

@ -7,8 +7,8 @@ import (
"strings" "strings"
"github.com/axllent/mailpit/config" "github.com/axllent/mailpit/config"
"github.com/axllent/mailpit/utils/logger" "github.com/axllent/mailpit/internal/logger"
"github.com/axllent/mailpit/utils/tools" "github.com/axllent/mailpit/internal/tools"
"github.com/leporo/sqlf" "github.com/leporo/sqlf"
) )

View File

@ -6,7 +6,7 @@ import (
"testing" "testing"
"github.com/axllent/mailpit/config" "github.com/axllent/mailpit/config"
"github.com/axllent/mailpit/utils/logger" "github.com/axllent/mailpit/internal/logger"
) )
var ( var (

View File

@ -10,8 +10,8 @@ import (
"time" "time"
"github.com/axllent/mailpit/config" "github.com/axllent/mailpit/config"
"github.com/axllent/mailpit/internal/logger"
"github.com/axllent/mailpit/server/websockets" "github.com/axllent/mailpit/server/websockets"
"github.com/axllent/mailpit/utils/logger"
"github.com/jhillyerd/enmime" "github.com/jhillyerd/enmime"
"github.com/k3a/html2text" "github.com/k3a/html2text"
"github.com/leporo/sqlf" "github.com/leporo/sqlf"