My favorites | Sign in
Project Home Issues Source
Checkout   Browse   Changes    
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package main

import (
"flag"
"http"
"log"
)

func main() {

addr := flag.String("http", ":8080", "Listen address")
dir := flag.String("dir", ".", "Directory to share")
help := flag.Bool("help", false, "Display help")

flag.Parse()

if *help || flag.NArg() != 0 {
flag.Usage()
return
}

e := http.ListenAndServe(*addr, http.FileServer(*dir, ""))
if e != nil {
log.Exit("wshare: ", e.String())
}
}

Change log

r58 by grr...@szsz.pl on Oct 11, 2010   Diff
wshare (web share)
Go to: 
Project members, sign in to write a code review

Older revisions

All revisions of this file

File info

Size: 415 bytes, 26 lines
Powered by Google Project Hosting