Go: Difference between revisions
From charlesreid1
| (8 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
== | =Getting Started with Go= | ||
==The Basics== | |||
[[Go/Installing]] - installing Go | [[Go/Installing]] - installing Go | ||
| Line 8: | Line 10: | ||
== | ==Hello World== | ||
Ah, yes, the quintessential [[Go/Hello World]] program. | Ah, yes, the quintessential [[Go/Hello World]] program. | ||
== | ==Command Line Tools== | ||
To build a command line tool, you'll set up a directory structure like <code>cmd/</code>. | To build a command line tool, you'll set up a directory structure like <code>cmd/</code>. | ||
| Line 21: | Line 23: | ||
* cobra: https://github.com/spf13/cobra | * cobra: https://github.com/spf13/cobra | ||
==Go | ==Vim and Go== | ||
See [[Go/Vim Solarized]] for a guide to setting up a vimrc file that will let you code in Go with nice syntax highlighting using the solarized color scheme. | |||
=Fundamental Features of Go= | |||
In a language, "fundamental" features are features that most or all languages have - like loops, conditionals, and strings. | |||
==Arrays== | |||
{{Main|Go/Arrays}} | |||
==Strings== | |||
{{Main|Go/Strings}} | |||
==File Reading and Writing== | |||
==Exceptions== | |||
. | ==Classes== | ||
==Tests== | |||
=Unique Features of Go= | |||
Some features of Go that are unique/different. | |||
==Channels== | |||
==Goroutines== | |||
=Advanced Features of Go= | |||
=Bioinformatics Applications= | |||
==Rosalind== | ==Rosalind== | ||
As part of a reading group I am participating in, I am solving the bioinformatics problems on Rosalind.info using Go. | |||
Link to problems: http://rosalind.info/problems/list-view/?location=bioinformatics-textbook-track | Link to Rosalind bioinformatics problems: http://rosalind.info/problems/list-view/?location=bioinformatics-textbook-track | ||
[[Rosalind]] | For all Rosalind problems, visit [[Rosalind]] | ||
[[Rosalind/Problem 1A]] | * [[Rosalind/Problem 1A]] | ||
* [[Rosalind/Problem 1B]] | |||
=Links= | |||
Go libraries for data science: http://www.mjhall.org/golang-data-science-libraries/ | Go libraries for data science: http://www.mjhall.org/golang-data-science-libraries/ | ||
| Line 53: | Line 88: | ||
Docker and Go: https://gist.github.com/17twenty/069bb0c0c19f72f7828bb80eee39d0a6 | Docker and Go: https://gist.github.com/17twenty/069bb0c0c19f72f7828bb80eee39d0a6 | ||
Testing installation of Go/upgrading: https://www.digitalocean.com/community/tutorials/how-to-install-go-1-7-on-debian-8 | |||
=Flags= | |||
{{GoFlag}} | |||
Latest revision as of 23:50, 25 December 2018
Getting Started with Go
The Basics
Go/Installing - installing Go
Go/Basics - getting started with Go
Go/Basics#Paths - getting started with all the different Go paths
Hello World
Ah, yes, the quintessential Go/Hello World program.
Command Line Tools
To build a command line tool, you'll set up a directory structure like cmd/.
The command line interface should be defined in a file that uses a library like one of the following:
- go-flags: https://github.com/jessevdk/go-flags
- cobra: https://github.com/spf13/cobra
Vim and Go
See Go/Vim Solarized for a guide to setting up a vimrc file that will let you code in Go with nice syntax highlighting using the solarized color scheme.
Fundamental Features of Go
In a language, "fundamental" features are features that most or all languages have - like loops, conditionals, and strings.
Arrays
Strings
File Reading and Writing
Exceptions
Classes
Tests
Unique Features of Go
Some features of Go that are unique/different.
Channels
Goroutines
Advanced Features of Go
Bioinformatics Applications
Rosalind
As part of a reading group I am participating in, I am solving the bioinformatics problems on Rosalind.info using Go.
Link to Rosalind bioinformatics problems: http://rosalind.info/problems/list-view/?location=bioinformatics-textbook-track
For all Rosalind problems, visit Rosalind
Links
Go libraries for data science: http://www.mjhall.org/golang-data-science-libraries/
Graph object in algorithm implementations: https://godoc.org/github.com/twmb/algoimpl/go/graph
Algorithm implementations in Go/C/Java: https://github.com/twmb/algoimpl
gograph: https://github.com/gyuho/goraph
learn: topological sort: https://github.com/gyuho/learn/tree/master/doc/go_graph_topological_sort
Go land mines - also shows some neat javascript-style function syntax (defer): https://gist.github.com/lavalamp/4bd23295a9f32706a48f
Docker and Go: https://gist.github.com/17twenty/069bb0c0c19f72f7828bb80eee39d0a6
Testing installation of Go/upgrading: https://www.digitalocean.com/community/tutorials/how-to-install-go-1-7-on-debian-8
Flags
| Go notes on Go
Go/Strings · Go/Arrays · Go/Slices
Go/Lists · Go/Maps · Go/Stacks · Go/Queues
Go/Naming Conventions · Go/Design Patterns
Go/Timing · Go/Profiling · Go/Benchmarking
Go/Tests · Go/Travis CI · Go/Makefiles
our vim + go setup uses custom solarized colors for Golang
|