Error while go get

Hello Everyone,

I am new to Storj. I find this product exciting. I came to know about this from my professor. I am successfully able to create buckets and throw some documents into it via powershell.Now i am trying to do the same thing with APIs. At storj-client-libraries, I have started with Python api.

I am stuck at Install go package of storj. I have tried on three different OS and it is giving me different erros.

Ubuntu 16.04

$ go get
go/src/ code in directory /root/go/src/ expects import

$ go version
go version go1.12.6 linux/amd64

Windows 10

PS C:\Users> go get
go\src``\common\rpc\rpcpool\pool.go:73:5: cannot use (*Conn)(nil) (type *Conn) as type drpc.Conn in assignment:
*Conn does not implement drpc.Conn (missing Closed method)

PS C:\Users\jeet-laptop> go version go version go1.14.2 windows/amd64

Debian GNU/Linux 9 (stretch)

jeet@storage-service-storj:~$ go get
Projects/Proj1/src/ cannot use (*Conn)(nil) (type *Conn) as type drpc.Conn in assignment:
*Conn does not implement drpc.Conn (missing Closed method)

$ go version
go version go1.13.3 linux/amd64

Let me know if anyone faced similar issue.

You can try this without no set up at free-ubuntu-playground

I am new to go-lang. So help me to identify the issue.


1 Like

Hello @jeetmpatel1,
Welcome to the forum!

If you want to use the libuplink programmatically, then I would like to recommend to use this repository instead of deprecated one.
If you want to build a CLI tool, then you can use this tutorial:

In any case you should clone the repository first.
The recommended version of Go is not older than 1.13

Hi Alexey

Thanks for your reply.

I have made significant progress. But stucked at very simple point. I am trying to list the contents of bucket from cmd.

> uplink ls sj://document-storage-bucket-new


> **PRE** **./**

Can you please explain what is PRE and ./ ?

PRE is a short from “prefix”, it is a prefix for objects next by prefix.
For example,

$ uplink ls sj://test
PRE photo/
OBJ 2019-09-28 22:38:23 234564

$ uplink ls sj://test/photo/
OBJ 2019-09-28 22:38:11  80729 2.jpg

$ uplink cp sj://test/photo/2.jpg ./
80729 B / 80729 B [-------------------------------------------------------------------------------------------] 100.00% ? p/s
Downloaded sj://test/photo/2.jpg 2.jpg
1 Like

So if i am understanding correctly, PRE represents a directory inside bucket.

In my case, my directory inside bucket was “.”.

Thanks for clarification. Solved the prbolem.

Yes, but not exactly. The prefix is technically metadata stored with the object. It acts mostly the same as directories, but you can’t have an empty prefix for example.

1 Like