-1

I got a problem in importing my local package, I have already set the path in environment variables ( I am using window 10) I also succeed using get GitHub opensource library. But when I create my own package and want to install it, it kept disappearing when I save my project. Can anyone solve my problem? This is the local package that I want to import

So I create the package inside another project (I followed the traverse media tutorial in youtube

Yosua Hanjaya
  • 35
  • 1
  • 6
  • 1
    Welcome to Stack Overflow. Unfortunately this question is posed in a way that's very difficult to answer. Please read https://stackoverflow.com/help/minimal-reproducible-example and edit your question accordingly. – Eli Bendersky May 25 '20 at 22:10

2 Answers2

2

I request you to first complete the course "A Tour of Go". I think you haven't done it, so far.

Here's the link.

Quoted from the tour:

In Go, a name is exported if it begins with a capital letter. For example, Pizza is an exported name, as is Pi, which is exported from the math package.

pizza and pi do not start with a capital letter, so they are not exported.

When importing a package, you can refer only to its exported names. Any "unexported" names are not accessible from outside the package.

After doing the tour, please do read about Go modules. Using go modules in your projects would make your package management much easier. It's really simple!

Community
  • 1
  • 1
shmsr
  • 3,802
  • 2
  • 18
  • 29
0

Maybe try to change your func reverse -> func Reverse in your reverse.go

MeowOvO
  • 1
  • 1