danoand (3) [Avatar] Offline
#1
The program in Listing 8.46 does not compile. The program imports the fmt package but does not refer to that package and does not import the log package but does refer to that package in multiple lines.

Here's the output of the compilation:

mymachine$ go build Listing_846.go
# command-line-arguments
./Listing_846.go:6: imported and not used: "fmt"
./Listing_846.go:17: undefined: log
./Listing_846.go:23: undefined: log
./Listing_846.go:34: undefined: log

Replacing:

import (
"fmt"
"io"
"net/http"
"os"
)

with...

import (
"log"
"io"
"net/http"
"os"
)

does the trick.
Bill Kennedy (68) [Avatar] Offline
#2
Re: Code Listing 8.46 Does Not Compile
Thank You !!
I will fix that for the next release.
Bill Kennedy (68) [Avatar] Offline
#3
I have it fixed for the next release. Thanks --Bill