@@ -0,0 +1,3 @@
+coverage.out
+serve
+
@@ -3,11 +3,16 @@ package main
import (
"net/http"
"os"
+ "github.com/skratchdot/open-golang/open"
)
+var run = open.Run
func main() {
port := getPort()
wd, _ := os.Getwd()
+ go run("http://127.0.0.1:" + port)
http.ListenAndServe(":"+port, http.FileServer(http.Dir(wd)))
}
@@ -5,6 +5,10 @@ import (
"testing"
+func init() {
+ run = func(_ string) error { return nil }
+}
func TestPlacebo(t *testing.T) {
t.Parallel()
if !true {