https://github.com/peterdee/go-imports
Investigating imports in Golang
https://github.com/peterdee/go-imports
golang imports
Last synced: about 1 month ago
JSON representation
Investigating imports in Golang
- Host: GitHub
- URL: https://github.com/peterdee/go-imports
- Owner: peterdee
- Created: 2020-09-25T18:51:38.000Z (over 4 years ago)
- Default Branch: develop
- Last Pushed: 2020-09-25T18:52:02.000Z (over 4 years ago)
- Last Synced: 2025-01-21T10:11:16.957Z (3 months ago)
- Topics: golang, imports
- Language: Go
- Homepage:
- Size: 1000 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Imports in Golang
Imports are done relatively to the `GOPATH`:
```golang
import (
"go-imports/level1"
Cool "go-imports/level1/level2"
. "go-imports/level1/level2/level3"
)
```Imports can be done with the dot or can have an alias.
Dot imports do not expose the private variables and functions from the imported packages.
### Deploy
```shell script
git clone https://github.com/peterdee/go-imports
cd ./go-imports
```### Launch
```shell script
go run *.go
```