Herramientas de usuario

Herramientas del sitio


programacion:golang

Go

recent

documentation

books

concepts

go internals

patterns

techniques

video tutorials

best practices

frameworks

cloud

conferences

gopherCon
https://www.gophercon.com/
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
dotGo
https://www.dotconferences.com
2016 videos
2015 videos
2014 videos

people

etc

github packages

AI

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)

https://github.com/farazdagi/vim-go-ide/issues/12

mkdir -p ~/.vim/autoload ~/.vim/bundle
curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim

2. Install vim-go-ide

https://github.com/farazdagi/vim-go-ide

git clone git@github.com:farazdagi/vim-go-ide.git ~/.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
8
$ cat "export TERM=screen-256color" >> ~/.profile
$ . ~/.profile
$ tput colors
256

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

$ cat > ~/goide
#!/bin/sh
vim -u ~/.vimrc.go
^D
$ 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”:

:GoInstallBinaries

6. Ready to code!

$ cd $GOPATH
$ cd src/github.com/(username)
$ mkdir a-new-project
$ cd a-new-project
$ git init
$ goide

Read documentation: https://github.com/fatih/vim-go/blob/master/doc/vim-go.txt

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 id_rsa.pub. 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 id_rsa.pub in order for Git, GitHub, and BitBucket to recognize them by default.
  • To create the SSH keys, type ssh-keygen -t rsa -C “your_email@example.com”. This will create both id_rsa and id_rsa.pub files.
  • Now, go and open id_rsa.pub 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 id_rsa.pub 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)

https://help.github.com/articles/adding-a-remote/

git init
git add *
git commit -m "first commit"
git remote add origin git@github.com:myname/myrepo.git
git push -u origin master
programacion/golang.txt · Última modificación: 2018/03/24 13:10 por jherrero