From 537f51a6f63797327192fc5c01373ea4a3037293 Mon Sep 17 00:00:00 2001 From: Ian Kent Date: Sun, 7 Dec 2014 18:57:05 +0000 Subject: [PATCH] Move some packages --- MailHog-Server/main.go | 2 +- {smtp/server => MailHog-Server/smtp}/session.go | 2 +- {smtp/server => MailHog-Server/smtp}/session_test.go | 2 +- smtp/server.go => MailHog-Server/smtp/smtp.go | 3 +-- MailHog/main.go | 2 +- 5 files changed, 5 insertions(+), 6 deletions(-) rename {smtp/server => MailHog-Server/smtp}/session.go (99%) rename {smtp/server => MailHog-Server/smtp}/session_test.go (99%) rename smtp/server.go => MailHog-Server/smtp/smtp.go (91%) diff --git a/MailHog-Server/main.go b/MailHog-Server/main.go index d4f952d..a7ac00b 100644 --- a/MailHog-Server/main.go +++ b/MailHog-Server/main.go @@ -6,9 +6,9 @@ import ( "github.com/ian-kent/Go-MailHog/MailHog-Server/api" "github.com/ian-kent/Go-MailHog/MailHog-Server/config" + "github.com/ian-kent/Go-MailHog/MailHog-Server/smtp" "github.com/ian-kent/Go-MailHog/MailHog-UI/assets" "github.com/ian-kent/Go-MailHog/http" - "github.com/ian-kent/Go-MailHog/smtp" "github.com/ian-kent/go-log/log" gotcha "github.com/ian-kent/gotcha/app" ) diff --git a/smtp/server/session.go b/MailHog-Server/smtp/session.go similarity index 99% rename from smtp/server/session.go rename to MailHog-Server/smtp/session.go index 96366c1..9e4c34c 100644 --- a/smtp/server/session.go +++ b/MailHog-Server/smtp/session.go @@ -1,4 +1,4 @@ -package server +package smtp // http://www.rfc-editor.org/rfc/rfc5321.txt diff --git a/smtp/server/session_test.go b/MailHog-Server/smtp/session_test.go similarity index 99% rename from smtp/server/session_test.go rename to MailHog-Server/smtp/session_test.go index 9bf26c4..581b85c 100644 --- a/smtp/server/session_test.go +++ b/MailHog-Server/smtp/session_test.go @@ -1,4 +1,4 @@ -package server +package smtp import ( "errors" diff --git a/smtp/server.go b/MailHog-Server/smtp/smtp.go similarity index 91% rename from smtp/server.go rename to MailHog-Server/smtp/smtp.go index 4b13938..0f49cbf 100644 --- a/smtp/server.go +++ b/MailHog-Server/smtp/smtp.go @@ -6,7 +6,6 @@ import ( "net" "github.com/ian-kent/Go-MailHog/MailHog-Server/config" - "github.com/ian-kent/Go-MailHog/smtp/server" ) func Listen(cfg *config.Config, exitCh chan int) *net.TCPListener { @@ -25,7 +24,7 @@ func Listen(cfg *config.Config, exitCh chan int) *net.TCPListener { } defer conn.Close() - go server.Accept( + go Accept( conn.(*net.TCPConn).RemoteAddr().String(), io.ReadWriteCloser(conn), cfg.Storage, diff --git a/MailHog/main.go b/MailHog/main.go index 170a6d1..cf3cd79 100644 --- a/MailHog/main.go +++ b/MailHog/main.go @@ -6,10 +6,10 @@ import ( "github.com/ian-kent/Go-MailHog/MailHog-Server/api" "github.com/ian-kent/Go-MailHog/MailHog-Server/config" + "github.com/ian-kent/Go-MailHog/MailHog-Server/smtp" "github.com/ian-kent/Go-MailHog/MailHog-UI/assets" "github.com/ian-kent/Go-MailHog/MailHog-UI/web" "github.com/ian-kent/Go-MailHog/http" - "github.com/ian-kent/Go-MailHog/smtp" "github.com/ian-kent/go-log/log" gotcha "github.com/ian-kent/gotcha/app" )