Logo

dev-resources.site

for different kinds of informations.

Problems with packages in Go

Published at
8/28/2022
Categories
go
packages
beginners
Author
jaenmo
Categories
3 categories in total
go
open
packages
open
beginners
open
Author
6 person written this
jaenmo
open
Problems with packages in Go

I'm having problems to use packages. I a following literally the steps I find online, but I have an error message.

I have this package in GOPATH:

go/src/greet/day.go

package greet

var morning = "Good morning"
var Morning = "hey" + morning
I want to import it in my code:

go/src/app/entry.go

package main

import ("fmt"
"greet")

func main(){
fmt.Println(greet.Morning)
}
When I run entry.go, I receive this message: entry.go:4:3: package greet is not in GOROOT (/usr/local/go/src/greet)

Does anybody how to fix it?

Thank you.

packages Article's
30 articles in total
Favicon
Exploring the Coastal Beauty of the Turkish Riviera
Favicon
Simplifying State Management in Laravel: Managing Transitions with Enum StateΒ Machine
Favicon
Task-Python Packages
Favicon
Agra Honeymoon Packages
Favicon
Agra Family Packages
Favicon
Testando e Implementando Pacotes Laravel: Um Guia Passo a Passo
Favicon
Popular Packages for Express.js
Favicon
Discover Paris: Your Ultimate Tour Package from Chennai
Favicon
Learn to create your own ROS2 Workspace, Custom Packages, Publisher and Subscriber.
Favicon
Publicando seus packages no pub.dev
Favicon
How I wrote a package manager in JavaScript
Favicon
Easily Create Your Own Private NPM Registry Using Verdaccio
Favicon
Laravel Deployer Free package for laravel and nodejs apps Deployment
Favicon
Embark on a Spiritual Journey: Umrah Group Packages for 2024
Favicon
Jazz Monthly Data Package
Favicon
Georgia Travel Tips for First-time Visitors
Favicon
The one thing I do not like about the Nix package manager (and a fix for it)
Favicon
Can't find Process Explorer after installing it via winget? Do this
Favicon
Develop anywhere - A practical guide to using packages with webMethods.io
Favicon
My process for writing Laravel packages
Favicon
What are Packages and How we can use it?
Favicon
Best Kerala Honeymoon Packages From Seasonz India Holidays
Favicon
Creating and Publishing Dart Packages for Flutter
Favicon
Backup manually installed libraries and packages in Ubuntu
Favicon
Unleashing the Power of Julia: Top 5 Must-Have Packages
Favicon
NPM Vs. Yarn: How do they compare?
Favicon
Recalling NPM Commands to Your Heart's Content
Favicon
Python generated jokes πŸ˜‚πŸ€£
Favicon
Problems with packages in Go
Favicon
The hidden cost of packages and how to avoid it

Featured ones: