File tree Expand file tree Collapse file tree 3 files changed +7
-18
lines changed Expand file tree Collapse file tree 3 files changed +7
-18
lines changed Original file line number Diff line number Diff line change 1- VERSION = 1.2.8
1+ VERSION = 1.2.9
22
33APP := http-subst-server
44PACKAGES := $(shell go list -f {{.Dir}} ./...)
Original file line number Diff line number Diff line change @@ -33,14 +33,14 @@ go get -u github.com/sgreben/http-subst-server
3333
3434``` sh
3535# Linux
36- curl -L https://github.com/sgreben/http-subst-server/releases/download/1.2.8 /http-subst-server_1.2.8_linux_x86_64 .tar.gz | tar xz
36+ curl -L https://github.com/sgreben/http-subst-server/releases/download/1.2.9 /http-subst-server_1.2.9_linux_x86_64 .tar.gz | tar xz
3737
3838# OS X
39- curl -L https://github.com/sgreben/http-subst-server/releases/download/1.2.8 /http-subst-server_1.2.8_osx_x86_64 .tar.gz | tar xz
39+ curl -L https://github.com/sgreben/http-subst-server/releases/download/1.2.9 /http-subst-server_1.2.9_osx_x86_64 .tar.gz | tar xz
4040
4141# Windows
42- curl -LO https://github.com/sgreben/http-subst-server/releases/download/1.2.8 /http-subst-server_1.2.8_windows_x86_64 .zip
43- unzip http-subst-server_1.2.8_windows_x86_64 .zip
42+ curl -LO https://github.com/sgreben/http-subst-server/releases/download/1.2.9 /http-subst-server_1.2.9_windows_x86_64 .zip
43+ unzip http-subst-server_1.2.9_windows_x86_64 .zip
4444```
4545
4646## Examples
Original file line number Diff line number Diff line change @@ -110,20 +110,9 @@ func init() {
110110 }
111111
112112 if len (routesFlag .Values ) == 0 {
113- log .Println ("no routes defined, creating temporary directory to serve from" )
114- tempDir , err := ioutil .TempDir ("" , "" )
115- if err != nil {
116- log .Fatalf ("create temporary directory: %v" , err )
117- }
118- tempDirIndexPath := filepath .Join (tempDir , indexBaseName )
119- if err := ioutil .WriteFile (tempDirIndexPath , nil , 0600 ); err != nil {
120- log .Fatalf ("write empty index file %q: %v" , tempDirIndexPath , err )
121- }
122- routesFlag .Set (fmt .Sprintf ("/=%s" , tempDir ))
123- log .Printf ("created temporary directory %q. printing its path to stdout." , filepath .Base (tempDir ))
124- fmt .Println (tempDir )
113+ log .Printf ("no routes defined, serving current directory at %q" , rootRoute )
114+ routesFlag .Set ("/=." )
125115 }
126-
127116}
128117
129118func main () {
You can’t perform that action at this time.
0 commit comments