Ask coding questions

← Back to all posts
Are Golang dependencies & packages supported?
myorama (10)

Hi, I need some community packages in a Go project

I've seen packages are configurable through UI but only for javascript, python and ruby languages (https://repl.it/site/docs/repls/packages)

Is there any news about Universal Package Manager, as announced 5 month ago? https://repl.it/talk/announcements/Announcing-Universal-Package-Manager/5201

Will be pretty cool to manage Golan packages too! :D

Commentshotnewtop
jeremejazz (1)

Hi I have just bumped into this. I tried running a code that requires an external package and it worked. As of 1.11 Go supports modules.
Currently no package manager on the UI unlike python or javascript but if you run the script with an import statment requiring an external package, go will automatically download the package and generate go.mod at the same time.
Here is the example script I have tried to run that uses goquery https://repl.it/@jeremejazz/Golang-1

jeremejazz (1)

@tim15 You can use go modules. Running will automatically create a go.mod file

tranzfat (1)

Was going to ask this same question, updates? I'm guessing no...

jeremejazz (1)

@tranzfat yes you can use external packages in go repl

mccolljr (0)

I'm a little disappointed at the lack of response by the repl.it team about this.

jeremejazz (1)

@mccolljr You can actually use community packages via Go modules. Try running a script that uses an external module ("github.com/..."