- Install Homebrew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- Install prerequisites
brew install git hg
brew install osxfuse
(see Mac issues to troubleshoot common errors)- Install Go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Verifying my Blockstack ID is secured with the address 1yJVpBi9EW9sY5ygYTbyyaqQChKQ4WCXr https://explorer.blockstack.org/address/1yJVpBi9EW9sY5ygYTbyyaqQChKQ4WCXr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
) | |
func main() { | |
cities := map[string]int{ | |
"New York": 8336697, | |
"Los Angeles": 3857799, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn main() { | |
let x = 5; | |
let y = 10; | |
println!("x = {} and y = {}", x, y); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Set variables in .bashrc file | |
# don't forget to change your path correctly! | |
export GOPATH=$HOME/golang | |
export GOROOT=/usr/local/opt/go/libexec | |
export PATH=$PATH:$GOPATH/bin | |
export PATH=$PATH:$GOROOT/bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class RustNightly < Formula | |
url "https://static.rust-lang.org/dist/rust-nightly-x86_64-apple-darwin.pkg", using: :nounzip | |
homepage "http://www.rust-lang.org" | |
sha1 "" | |
version Date.today.to_s | |
def install | |
system "pkgutil --expand rust-nightly-x86_64-apple-darwin.pkg rn" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=== npm audit security report === | |
# Run npm install --save-dev [email protected] to resolve 1 vulnerability | |
SEMVER WARNING: Recommended action is a potentially breaking change | |
┌───────────────┬──────────────────────────────────────────────────────────────┐ | |
│ Low │ Regular Expression Denial of Service │ | |
├───────────────┼──────────────────────────────────────────────────────────────┤ | |
│ Package │ braces │ | |
├───────────────┼──────────────────────────────────────────────────────────────┤ | |
│ Dependency of │ karma [dev] │ |
This is not an exhaustive list of all interfaces in Go's standard library.
I only list those I think are important.
Interfaces defined in frequently used packages (like io
, fmt
) are included.
Interfaces that have significant importance are also included.
All of the following information is based on go version go1.8.3 darwin/amd64
.
We Gophers, love table-driven-tests, it makes our unittesting structured, and makes it easy to add different test cases with ease.
Let’s create our table driven test, for convenience, I chose to use t.Log
as the test function.
Notice that we don't have any assertion in this test, it is not needed to for the demonstration.
func TestTLog(t *testing.T) {
t.Parallel()
OlderNewer