Skip to content

Commit c0b5388

Browse files
committed
Release 1.2.9
1 parent 13c481d commit c0b5388

File tree

3 files changed

+7
-18
lines changed

3 files changed

+7
-18
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
VERSION = 1.2.8
1+
VERSION = 1.2.9
22

33
APP := http-subst-server
44
PACKAGES := $(shell go list -f {{.Dir}} ./...)

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff 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

main.go

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff 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

129118
func main() {

0 commit comments

Comments
 (0)