github.com/mdempsky/go@v0.0.0-20151201204031-5dd372bd1e70/doc/codewalk/run (about) 1 #!/usr/bin/env bash 2 # Copyright 2013 The Go Authors. All rights reserved. 3 # Use of this source code is governed by a BSD-style 4 # license that can be found in the LICENSE file. 5 6 set -e 7 8 function fail { 9 echo FAIL: doc/codewalk/$1 10 exit 1 11 } 12 13 # markov.xml 14 echo foo | go run markov.go | grep foo > /dev/null || fail markov 15 16 # functions.xml 17 go run pig.go | grep 'Wins, losses staying at k = 100: 210/990 (21.2%), 780/990 (78.8%)' > /dev/null || fail pig 18 19 # sharemem.xml: only build the example, as it uses the network 20 go build urlpoll.go || fail urlpoll 21 rm -f urlpoll