go get github.com/weilaihui/fdfs_client

package golang.org/x/crypto/ssh/terminal: unrecognized import path "golang.org/x/crypto/ssh/terminal
解决方案:首先在gopath文件夹创建golang.org/x,然后git clone crypto和sys.git,具体如下:
package golang.org/x/crypto/ssh/terminal: unrecognized import path "golang.org/x/crypto/ssh/terminal

   package main
        
        import (
        	"github.com/weilaihui/fdfs_client"
        	"fmt"
        )
        
        func main() {
        
        	client, e := fdfs_client.NewFdfsClient("./client.conf")
        	if e!=nil {
        		fmt.Println(e)
        	}
        	fdfsresponser, err := client.UploadByFilename("2demo.go")
        	if err!=nil {
        		fmt.Println(err)
        	}
        	fmt.Println(fdfsresponser)
        
        }

使用如上代码进行测试,具体结果如下:
package golang.org/x/crypto/ssh/terminal: unrecognized import path "golang.org/x/crypto/ssh/terminal

相关文章: