[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Packaging Terraform, a Golang package
From: |
Pierre Neidhardt |
Subject: |
Re: Packaging Terraform, a Golang package |
Date: |
Wed, 19 Dec 2018 08:54:24 +0100 |
User-agent: |
mu4e 1.0; emacs 26.1 |
The answer is in the environment :) Go uses a few variables:
- GOROOT, which points to the Go system installation.
- GOPATH, which points to the Go user "workspace", ~/go by default.
A GOPATH tree looks like this:
--8<---------------cut here---------------start------------->8---
> tree ~/go
~/go
├── bin
│ ├── foo
│ └── ipfs
└── src
├── github.com
│ ├── aarzilli
│ │ └── golua
│ │ ├── example
│ │ │ ├── alloc.go
│ │ │ ├── basic.go
│ │ │ ├── calls.lua
│ │ │ ├── error.go
│ │ │ ├── panic.go
│ │ │ ├── quickstart.go
│ │ │ └── userdata.go
│ │ ├── LICENSE
│ │ ├── lua
│ │ │ ├── c-golua.c
│ │ │ ├── golua.go
│ │ │ ├── golua.h
│ │ │ ├── lauxlib.go
│ │ │ ├── lua
│ │ │ │ ├── lauxlib.h
│ │ │ │ ├── luaconf.h
│ │ │ │ ├── lua.h
│ │ │ │ └── lualib.h
│ │ │ ├── lua_defs.go
│ │ │ ├── lua.go
│ │ │ └── lua_test.go
│ │ ├── README.md
│ │ └── TODO
--8<---------------cut here---------------end--------------->8---
It's populated automatically by =go get=, =go install=, etc.
The only thing it does not guess automatically is the path to ~/go/bin, which
you must add like all other executable paths to PATH.
For instance, from you ~/.profile or similar:
export PATH=$PATH:~/go/bin
Hope that helps!
--
Pierre Neidhardt
https://ambrevar.xyz/
signature.asc
Description: PGP signature