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:
2
.github/workflows/tests.yml
vendored
2
.github/workflows/tests.yml
vendored
@ -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
|
||||||
|
@ -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"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -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"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -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"
|
||||||
)
|
)
|
||||||
|
@ -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"
|
||||||
|
@ -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
|
||||||
|
@ -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@?^=%&\/~+#-])`)
|
||||||
|
@ -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 {
|
||||||
|
@ -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.
|
||||||
|
@ -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"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -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"
|
||||||
)
|
)
|
||||||
|
@ -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"
|
||||||
)
|
)
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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"
|
||||||
|
@ -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?:\/\/`)
|
||||||
|
@ -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"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -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"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -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 {
|
||||||
|
@ -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"
|
||||||
)
|
)
|
||||||
|
@ -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",
|
||||||
|
@ -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"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
@ -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"
|
||||||
|
@ -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"
|
||||||
|
@ -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"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -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"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -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 (
|
||||||
|
@ -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"
|
||||||
|
Reference in New Issue
Block a user