github.com/rsc/tmp@v0.0.0-20240517235954-6deaab19748b/randdist/web.go (about)

     1  // Copyright 2015 The Go Authors.  All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  
     6  // Randdist is a program to explore the distribution of rand.Float64.
     7  // Run with:
     8  //
     9  //	go get rsc.io/devweb
    10  //	go get -d rsc.io/tmp/randdist
    11  //	devweb rsc.io/tmp/randdist
    12  //	
    13  // And then open $GOPATH/rsc.io/tmp/randdist/graph/x.html in a browser.
    14  package main
    15  
    16  import (
    17  	"net/http"
    18  
    19  	"rsc.io/devweb/slave"
    20  	"rsc.io/tmp/randdist/graph"
    21  )
    22  
    23  func init() {
    24  	http.HandleFunc("/graph", graph.Handler)
    25  }
    26  
    27  func main() {
    28  	slave.Main()
    29  }