mirror of
				https://github.com/axllent/mailpit.git
				synced 2025-10-31 00:07:43 +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') }} | ||||
|         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 | ||||
|   | ||||
| @@ -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" | ||||
| ) | ||||
|  | ||||
|   | ||||
| @@ -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" | ||||
| ) | ||||
|  | ||||
|   | ||||
| @@ -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" | ||||
| ) | ||||
|   | ||||
| @@ -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" | ||||
|   | ||||
| @@ -5,7 +5,7 @@ import ( | ||||
| 	"strings" | ||||
|  | ||||
| 	"github.com/PuerkitoBio/goquery" | ||||
| 	"github.com/axllent/mailpit/utils/tools" | ||||
| 	"github.com/axllent/mailpit/internal/tools" | ||||
| ) | ||||
|  | ||||
| // HTML tests | ||||
|   | ||||
| @@ -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@?^=%&\/~+#-])`) | ||||
|   | ||||
| @@ -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 { | ||||
|   | ||||
| @@ -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. | ||||
|   | ||||
| @@ -13,7 +13,7 @@ import ( | ||||
| 	"path/filepath" | ||||
| 	"runtime" | ||||
|  | ||||
| 	"github.com/axllent/mailpit/utils/logger" | ||||
| 	"github.com/axllent/mailpit/internal/logger" | ||||
| 	"github.com/axllent/semver" | ||||
| ) | ||||
|  | ||||
|   | ||||
| @@ -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" | ||||
| ) | ||||
|   | ||||
| @@ -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" | ||||
| ) | ||||
|   | ||||
| @@ -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 | ||||
|   | ||||
| @@ -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 | ||||
|   | ||||
| @@ -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" | ||||
|   | ||||
| @@ -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?:\/\/`) | ||||
|   | ||||
| @@ -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" | ||||
| ) | ||||
|  | ||||
|   | ||||
| @@ -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" | ||||
| ) | ||||
|  | ||||
|   | ||||
| @@ -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 { | ||||
|   | ||||
| @@ -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" | ||||
| ) | ||||
|   | ||||
| @@ -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 @@ | ||||
|       } | ||||
|     } | ||||
|   } | ||||
| } | ||||
| } | ||||
|   | ||||
| @@ -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" | ||||
| ) | ||||
|  | ||||
|   | ||||
| @@ -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 | ||||
|   | ||||
| @@ -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" | ||||
|   | ||||
| @@ -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" | ||||
|   | ||||
| @@ -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" | ||||
| ) | ||||
|  | ||||
|   | ||||
| @@ -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" | ||||
| ) | ||||
|  | ||||
|   | ||||
| @@ -6,7 +6,7 @@ import ( | ||||
| 	"testing" | ||||
|  | ||||
| 	"github.com/axllent/mailpit/config" | ||||
| 	"github.com/axllent/mailpit/utils/logger" | ||||
| 	"github.com/axllent/mailpit/internal/logger" | ||||
| ) | ||||
|  | ||||
| var ( | ||||
|   | ||||
| @@ -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" | ||||
|   | ||||
		Reference in New Issue
	
	Block a user