User Tools

Site Tools







go internals



video tutorials

best practices




2016 videos 2016 talks
2015 videos 2015 talks
2014 videos 2014 talks
gopherfest 2017 9:20 - Intros
10:57 - State of Go, Francesc Campoy Flores
37:11 - Event Sourcing – Architectures and Patterns, Matt Ho
1:19:17 - Rob Pike on Upspin
1:52:06 - Lessons Learned from a Context-NATS Integration, Waldemar Quevedo
2016 videos
2015 videos
2014 videos



github packages


Go on OpenBSD

install go

# pkg_add go
# pkg_add go-websocket
# pkg_add go-crypto
# pkg_add go-net
# pkg_add go-text
# pkg_add go-tools
# pkg_add go-xlsx
# rcctl enable godoc
# rcctl start godoc

vim ide

How to set vim up as a development environment for Go

Requires vim with LUA support

$ doas pkg_add vim-7.4.1467p1-no_x11-lua

1. install pathogen (required by vim-go-ide)

mkdir -p ~/.vim/autoload ~/.vim/bundle
curl -LSso ~/.vim/autoload/pathogen.vim

2. Install vim-go-ide

git clone ~/.vim_go_runtime
sh ~/.vim_go_runtime/bin/install

3. Set TERM colors

If you get 8 colors in your terminal set TERM var in .profile

$ tput colors
$ cat "export TERM=screen-256color" >> ~/.profile
$ . ~/.profile
$ tput colors

4. Build “goide” command to start vim in go-ide mode

$ cat > ~/goide
vim -u ~/.vimrc.go
$ chmod 755 goide 
$ doas cp goide /usr/local/bin

5. Setup environment

$ mkdir -p ~/code/go/src
$ cat "export GOPATH=~/code/go" >> ~/.profile

Change arrows in NERDTree for ASCII chars

$ echo "let g:NERDTreeDirArrows=0" >> ~/.vim_go_runtime/custom_config.vim

Inside “goide”:


6. Ready to code!

$ cd $GOPATH
$ cd src/
$ mkdir a-new-project
$ cd a-new-project
$ git init
$ goide

Read documentation:

7. GitHub setup certificate-based authentication

En caso de que estemos en una nueva máquina hay que crear un certificado para ella y guardar la clave pública en GitHub.

  • Within the .ssh folder, there should be these two files: id_rsa and These are the files that tell your computer how to communicate with GitHub, BitBucket, or any other Git based service. Type ls to see a directory listing. If those two files don't show up, proceed to the next step. NOTE: Your SSH keys must be named id_rsa and in order for Git, GitHub, and BitBucket to recognize them by default.
  • To create the SSH keys, type ssh-keygen -t rsa -C “”. This will create both id_rsa and files.
  • Now, go and open in your favorite text editor (you can do this via Windows Explorer or the OSX Finder if you like, tpying open . will open the folder).
  • Copy the contents–exactly as it appears, with no extra spaces or lines–of and paste it into GitHub and/or BitBucket under the Account Settings > SSH Keys. NOTE: I like to give the SSH key a descriptive name, usually with the name of the workstation I'm on along with the date.

8. Setup a GitHub repo

Enter your GitHub account (i. e. myname) and create an empty repo (i. e. myrepo)

git init
git add *
git commit -m "first commit"
git remote add origin
git push -u origin master
programacion/golang.txt · Last modified: 2018/03/24 13:10 by jherrero