github.com/jgarto/itcv@v0.0.0-20180826224514-4eea09c1aa0d/examples/sites/latency/app.go (about)

     1  package main
     2  
     3  import (
     4  	"math/rand"
     5  	"time"
     6  
     7  	"myitcv.io/react"
     8  )
     9  
    10  func init() {
    11  	rand.Seed(time.Now().UnixNano())
    12  }
    13  
    14  type AppDef struct {
    15  	react.ComponentDef
    16  }
    17  
    18  func App() *AppElem {
    19  	return buildAppElem()
    20  }
    21  
    22  func (a AppDef) Render() react.Element {
    23  	return Latency()
    24  }