Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for the Writing Web Applications tutorial #31311

Closed
nivaldogmelo opened this issue Apr 6, 2019 · 1 comment
Closed

Fix for the Writing Web Applications tutorial #31311

nivaldogmelo opened this issue Apr 6, 2019 · 1 comment

Comments

@nivaldogmelo
Copy link

What version of Go are you using (go version)?

$ go version go1.12.1 linux/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

go env
$ go env

GOARCH="amd64"
GOBIN=""
GOCACHE="/home/nivaldogmelo/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/nivaldogmelo/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/lib/go"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build083406842=/tmp/go-build -gno-record-gcc-switches"

What did you do?

At the part 2 of the Writing Web Applications tutorial it's not in the instructions the need to import the "log" at the import step for the wiki app. Although the log is used at the

func main() {
    http.HandleFunc("/view/", viewHandler)
    log.Fatal(http.ListenAndServe(":8080", nil))
}

What did you expect to see?

import (
	"fmt"
	"io/ioutil"
	"net/http"
        "log"
)

What did you see instead?

import (
	"fmt"
	"io/ioutil"
	"net/http"
)
@agnivade
Copy link
Contributor

agnivade commented Apr 7, 2019

Duplicate of #25188

@agnivade agnivade marked this as a duplicate of #25188 Apr 7, 2019
@agnivade agnivade closed this as completed Apr 7, 2019
@golang golang locked and limited conversation to collaborators Apr 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants