mirror of
https://github.com/golang/go
synced 2024-11-21 13:34:39 -07:00
doc/codewalk: update for changes in log package
R=adg, r CC=golang-dev https://golang.org/cl/2984041
This commit is contained in:
parent
11ace8e975
commit
f1af2ecbab
@ -52,9 +52,9 @@ func StateMonitor(updateInterval int64) chan<- State {
|
|||||||
|
|
||||||
// logState prints a state map.
|
// logState prints a state map.
|
||||||
func logState(s map[string]string) {
|
func logState(s map[string]string) {
|
||||||
log.Stdout("Current state:")
|
log.Println("Current state:")
|
||||||
for k, v := range s {
|
for k, v := range s {
|
||||||
log.Stdoutf(" %s %s", k, v)
|
log.Printf(" %s %s", k, v)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -69,7 +69,7 @@ type Resource struct {
|
|||||||
func (r *Resource) Poll() string {
|
func (r *Resource) Poll() string {
|
||||||
resp, err := http.Head(r.url)
|
resp, err := http.Head(r.url)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Stderr("Error", r.url, err)
|
log.Println("Error", r.url, err)
|
||||||
r.errCount++
|
r.errCount++
|
||||||
return err.String()
|
return err.String()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user