ceterumcenseo

miniwww

Apr 5th, 2021
2,417
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package main
  2.  
  3. import "net/http"
  4. import "os"
  5. import "fmt"
  6.  
  7. func main() {
  8.     intf := ":8080"
  9.     if len(os.Args) == 2 {
  10.         intf = os.Args[1]
  11.     }
  12.  
  13.     fmt.Printf("Listening on %s\n", intf)
  14.     err := http.ListenAndServe(intf, http.FileServer(http.Dir(".")))
  15.     if err != nil {
  16.         fmt.Printf("fatal error: %s\n", err)
  17.     }
  18. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×