typos
typos

Reputation: 6632

How to resolve packages dependencies in Go?

I'm relatively new to Go, and I wanted some source code that I downloaded. Though, it imports two packages which I do not have, namely these two:

import (
    "git.schwanenlied.me/yawning/chacha20.git"
    "golang.org/x/crypto/sha3"
)

It there a tool or way in Go that automatically reads the source files in a directory and downloads the packages needed? On the other hand, when I just try to use go get to download them, I get an error that it uses insecure protocol (due to git). Any ideas how to resolve these dependencies?

Upvotes: 0

Views: 10523

Answers (2)

Pubudu
Pubudu

Reputation: 478

Have you tried godep? You can read the documentation here

Upvotes: 0

n-canter
n-canter

Reputation: 288

As far as I know there is no such a tool. But in your case you may use 'go get', just remove .git from the end of the line.

go get git.schwanenlied.me/yawning/chacha20

same for import statement

import (
    "git.schwanenlied.me/yawning/chacha20"
    "golang.org/x/crypto/sha3"
)

Upvotes: 1

Related Questions