1
0
mirror of https://github.com/axllent/mailpit.git synced 2025-01-26 03:52:09 +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') }}
restore-keys: |
${{ runner.os }}-go-
- run: go test ./storage ./server ./utils/tools -v
- run: go test ./storage ./server ./internal/tools -v
- run: go test ./storage -bench=.
# build the assets

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -11,12 +11,12 @@ import (
"strings"
"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/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"
uuid "github.com/satori/go.uuid"
)

View File

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

View File

@ -1,9 +1,9 @@
package apiv1
import (
"github.com/axllent/mailpit/internal/htmlcheck"
"github.com/axllent/mailpit/internal/linkcheck"
"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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -7,7 +7,7 @@ package websockets
import (
"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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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