Skip to content

Failed to run Hello world #755

@nlamirault

Description

@nlamirault

Description

Checklist

  • Dependencies installed
  • No typos
  • Searched existing issues and docs

Expected behaviour

Run the hello world from documentation

Actual behaviour

Steps to reproduce

$ govendor init
$ go get -u github.com/labstack/echo
$ go run server.go
server.go:6:2: cannot find package "github.com/labstack/echo" in any of:
	/home/nlamirault/Apps/golang/src/github.com/nlamirault/toto/vendor/github.com/labstack/echo (vendor tree)
	/home/nlamirault/Apps/go/src/github.com/labstack/echo (from $GOROOT)
	/home/nlamirault/Apps/golang/src/github.com/labstack/echo (from $GOPATH)

Working code to debug

package main

import (
	"net/http"

	"github.com/labstack/echo"
)

func main() {
	e := echo.New()
	e.GET("/", func(c echo.Context) error {
		return c.String(http.StatusOK, "Hello, World!")
	})
	e.Logger.Fatal(e.Start(":1323"))
}

Version/commit

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions