gpt4 book ai didi

go - 使用Echo时编译报错

转载 作者:IT王子 更新时间:2023-10-29 01:41:00 24 4
gpt4 key购买 nike

我在运行时使用 github.com/labstack/echo 包做了一个简单的工作我得到了这个错误。

github.com\labstack\echo\echo.go:624: e.AutoTLSManager.HTTPHandler undefined (type autocert.Manager has no field or method HTTPHandler

package main

import "github.com/labstack/echo"

func main() {
e := echo.New()

e.Start(":")
}

最佳答案

此问题已在 issue #1082 中解决:

You seem to have a stale acme/autocert library. autocert.Manager DOES currently have that method: https://godoc.org/golang.org/x/crypto/acme/autocert#Manager.HTTPHandler I suggest a go get -u golang.org/x/crypto/acme/....

关于go - 使用Echo时编译报错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50248884/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com