Skip to content

Depends on a non-existent version of yaml.v2 #2581

Closed
@stut

Description

Description

Not specifying any particular version a go build fails due to...

gopkg.in/yaml.v2@v2.2.8: reading gopkg.in/yaml.v2/go.mod at revision v2.2.8: unknown revision v2.2.8

How to reproduce

package main

import (
	"github.com/gin-gonic/gin"
)

func main() {
	g := gin.Default()
	g.GET("/hello/:name", func(c *gin.Context) {
		c.String(200, "Hello %s", c.Param("name"))
	})
	g.Run(":9000")
}

Expectations

An executable binary.

Actual result

$ go mod init gintest
go: creating new go.mod: module gintest
$ go build .
go: finding module for package github.com/gin-gonic/gin
go: found github.com/gin-gonic/gin in github.com/gin-gonic/gin v1.6.3
go: github.com/gin-gonic/gin@v1.6.3 requires
	gopkg.in/yaml.v2@v2.2.8: reading gopkg.in/yaml.v2/go.mod at revision v2.2.8: unknown revision v2.2.8

Environment

  • go version: go1.15.5 linux/amd64
  • gin version (or commit ref): not specifying
  • operating system: CentOS 8

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions