diff --git a/README.md b/README.md index 97cfc1a..ee46254 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,12 @@ You can configure Go-MailHog using command line options: Clone this repository to ```$GOPATH/src/github.com/ian-kent/MailHog``` and type ```go install```. +You'll need go-bindata to embed web assets: +``` +go get https://github.com/jteeuwen/go-bindata/... +go-bindata assets/... +``` + Run tests using ```go test```. You'll need a copy of MailHog running for tests to pass. (Tests currently fail using in-memory storage, use MongoDB!) diff --git a/assets/images/hog.png b/assets/images/hog.png new file mode 100644 index 0000000..c846729 Binary files /dev/null and b/assets/images/hog.png differ diff --git a/mailhog/templates/js/controllers.go b/assets/js/controllers.js similarity index 98% rename from mailhog/templates/js/controllers.go rename to assets/js/controllers.js index fe3d08c..5eaa115 100644 --- a/mailhog/templates/js/controllers.go +++ b/assets/js/controllers.js @@ -1,7 +1,3 @@ -package js - -func Controllers() string { - return ` var mailhogApp = angular.module('mailhogApp', []); mailhogApp.controller('MailCtrl', function ($scope, $http, $sce) { @@ -121,6 +117,4 @@ mailhogApp.controller('MailCtrl', function ($scope, $http, $sce) { $scope.refresh(); }); } -}); -`; -} \ No newline at end of file +}); \ No newline at end of file diff --git a/mailhog/templates/index.go b/assets/templates/index.html similarity index 99% rename from mailhog/templates/index.go rename to assets/templates/index.html index 6959a2f..21c7845 100644 --- a/mailhog/templates/index.go +++ b/assets/templates/index.html @@ -1,7 +1,3 @@ -package templates - -func Index() string { - return `