diff --git a/bindata.go b/bindata.go index b1021e1..49131c5 100644 --- a/bindata.go +++ b/bindata.go @@ -1593,18 +1593,18 @@ type _bintree_t struct { var _bintree = &_bintree_t{nil, map[string]*_bintree_t{ "assets": &_bintree_t{nil, map[string]*_bintree_t{ + "templates": &_bintree_t{nil, map[string]*_bintree_t{ + "index.html": &_bintree_t{assets_templates_index_html, map[string]*_bintree_t{}}, + "layout.html": &_bintree_t{assets_templates_layout_html, map[string]*_bintree_t{}}, + }}, "images": &_bintree_t{nil, map[string]*_bintree_t{ - "ajax-loader.gif": &_bintree_t{assets_images_ajax_loader_gif, map[string]*_bintree_t{}}, "github.png": &_bintree_t{assets_images_github_png, map[string]*_bintree_t{}}, "hog.png": &_bintree_t{assets_images_hog_png, map[string]*_bintree_t{}}, + "ajax-loader.gif": &_bintree_t{assets_images_ajax_loader_gif, map[string]*_bintree_t{}}, }}, "js": &_bintree_t{nil, map[string]*_bintree_t{ "controllers.js": &_bintree_t{assets_js_controllers_js, map[string]*_bintree_t{}}, "strutil.js": &_bintree_t{assets_js_strutil_js, map[string]*_bintree_t{}}, }}, - "templates": &_bintree_t{nil, map[string]*_bintree_t{ - "index.html": &_bintree_t{assets_templates_index_html, map[string]*_bintree_t{}}, - "layout.html": &_bintree_t{assets_templates_layout_html, map[string]*_bintree_t{}}, - }}, }}, }} diff --git a/mailhog/config/config.go b/config/config.go similarity index 84% rename from mailhog/config/config.go rename to config/config.go index 1ac4c3d..c46be36 100644 --- a/mailhog/config/config.go +++ b/config/config.go @@ -1,8 +1,8 @@ package config import ( - "github.com/ian-kent/Go-MailHog/mailhog/data" - "github.com/ian-kent/Go-MailHog/mailhog/storage" + "github.com/ian-kent/Go-MailHog/data" + "github.com/ian-kent/Go-MailHog/storage" ) func DefaultConfig() *Config { diff --git a/mailhog/data/message.go b/data/message.go similarity index 100% rename from mailhog/data/message.go rename to data/message.go diff --git a/mailhog/http/api/v1.go b/http/api/v1.go similarity index 98% rename from mailhog/http/api/v1.go rename to http/api/v1.go index afc5190..7f90361 100644 --- a/mailhog/http/api/v1.go +++ b/http/api/v1.go @@ -5,9 +5,9 @@ import ( "net/smtp" "strconv" - "github.com/ian-kent/Go-MailHog/mailhog/config" - "github.com/ian-kent/Go-MailHog/mailhog/data" - "github.com/ian-kent/Go-MailHog/mailhog/storage" + "github.com/ian-kent/Go-MailHog/config" + "github.com/ian-kent/Go-MailHog/data" + "github.com/ian-kent/Go-MailHog/storage" "github.com/ian-kent/go-log/log" gotcha "github.com/ian-kent/gotcha/app" "github.com/ian-kent/gotcha/http" diff --git a/mailhog/http/server.go b/http/server.go similarity index 100% rename from mailhog/http/server.go rename to http/server.go diff --git a/main.go b/main.go index 45ee9ae..aaf275a 100644 --- a/main.go +++ b/main.go @@ -6,12 +6,12 @@ import ( "net" "os" - "github.com/ian-kent/Go-MailHog/mailhog/config" - "github.com/ian-kent/Go-MailHog/mailhog/data" - mhhttp "github.com/ian-kent/Go-MailHog/mailhog/http" - "github.com/ian-kent/Go-MailHog/mailhog/http/api" - "github.com/ian-kent/Go-MailHog/mailhog/storage" + "github.com/ian-kent/Go-MailHog/config" + "github.com/ian-kent/Go-MailHog/data" + mhhttp "github.com/ian-kent/Go-MailHog/http" + "github.com/ian-kent/Go-MailHog/http/api" smtp "github.com/ian-kent/Go-MailHog/smtp/server" + "github.com/ian-kent/Go-MailHog/storage" "github.com/ian-kent/envconf" "github.com/ian-kent/go-log/log" gotcha "github.com/ian-kent/gotcha/app" diff --git a/main_test.go b/main_test.go index f1f22f5..8c8b459 100644 --- a/main_test.go +++ b/main_test.go @@ -1,13 +1,14 @@ package main import ( - "github.com/ian-kent/Go-MailHog/mailhog/config" - "github.com/ian-kent/Go-MailHog/mailhog/storage" - "github.com/stretchr/testify/assert" "net" "regexp" "strings" "testing" + + "github.com/ian-kent/Go-MailHog/config" + "github.com/ian-kent/Go-MailHog/storage" + "github.com/stretchr/testify/assert" ) // FIXME requires a running instance of MailHog diff --git a/smtp/protocol/protocol.go b/smtp/protocol/protocol.go index b16ab29..5dcbe8a 100644 --- a/smtp/protocol/protocol.go +++ b/smtp/protocol/protocol.go @@ -8,7 +8,7 @@ import ( "regexp" "strings" - "github.com/ian-kent/Go-MailHog/mailhog/data" + "github.com/ian-kent/Go-MailHog/data" ) // Command is a struct representing an SMTP command (verb + arguments) diff --git a/smtp/protocol/protocol_test.go b/smtp/protocol/protocol_test.go index 73c2b13..d197fdd 100644 --- a/smtp/protocol/protocol_test.go +++ b/smtp/protocol/protocol_test.go @@ -6,7 +6,7 @@ import ( "errors" "testing" - "github.com/ian-kent/Go-MailHog/mailhog/data" + "github.com/ian-kent/Go-MailHog/data" . "github.com/smartystreets/goconvey/convey" ) diff --git a/smtp/server/session.go b/smtp/server/session.go index a1066ec..96366c1 100644 --- a/smtp/server/session.go +++ b/smtp/server/session.go @@ -7,9 +7,9 @@ import ( "log" "strings" - "github.com/ian-kent/Go-MailHog/mailhog/data" - "github.com/ian-kent/Go-MailHog/mailhog/storage" + "github.com/ian-kent/Go-MailHog/data" "github.com/ian-kent/Go-MailHog/smtp/protocol" + "github.com/ian-kent/Go-MailHog/storage" ) // Session represents a SMTP session using net.TCPConn diff --git a/smtp/server/session_test.go b/smtp/server/session_test.go index e24edda..35566cc 100644 --- a/smtp/server/session_test.go +++ b/smtp/server/session_test.go @@ -7,8 +7,8 @@ import ( . "github.com/smartystreets/goconvey/convey" - "github.com/ian-kent/Go-MailHog/mailhog/data" - "github.com/ian-kent/Go-MailHog/mailhog/storage" + "github.com/ian-kent/Go-MailHog/data" + "github.com/ian-kent/Go-MailHog/storage" ) type fakeRw struct { diff --git a/mailhog/storage/memory.go b/storage/memory.go similarity index 97% rename from mailhog/storage/memory.go rename to storage/memory.go index eb297d8..e01f2f1 100644 --- a/mailhog/storage/memory.go +++ b/storage/memory.go @@ -1,6 +1,6 @@ package storage -import "github.com/ian-kent/Go-MailHog/mailhog/data" +import "github.com/ian-kent/Go-MailHog/data" // InMemory is an in memory storage backend type InMemory struct { diff --git a/mailhog/storage/mongodb.go b/storage/mongodb.go similarity index 97% rename from mailhog/storage/mongodb.go rename to storage/mongodb.go index 3198342..4b41757 100644 --- a/mailhog/storage/mongodb.go +++ b/storage/mongodb.go @@ -3,7 +3,7 @@ package storage import ( "log" - "github.com/ian-kent/Go-MailHog/mailhog/data" + "github.com/ian-kent/Go-MailHog/data" "labix.org/v2/mgo" "labix.org/v2/mgo/bson" ) diff --git a/mailhog/storage/storage.go b/storage/storage.go similarity index 83% rename from mailhog/storage/storage.go rename to storage/storage.go index abb422b..8386ebb 100644 --- a/mailhog/storage/storage.go +++ b/storage/storage.go @@ -1,6 +1,6 @@ package storage -import "github.com/ian-kent/Go-MailHog/mailhog/data" +import "github.com/ian-kent/Go-MailHog/data" // Storage represents a storage backend type Storage interface {