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 cli | |
import ( | |
"io" | |
"os" | |
) | |
// IO represents the standard input, output, and error stream. | |
type IO struct { | |
In io.Reader // standard input |
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
name: Release | |
on: | |
release: | |
types: | |
- published | |
jobs: | |
release: | |
name: Release | |
runs-on: ubuntu-latest |
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 foo | |
// go2 errors | |
type wrapper interface { | |
Unwrap() error | |
} | |
// pkg/errors | |
type causer interface { | |
Cause() error |
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
// | |
// return x | |
// // this is a comment | |
// // there are many like it | |
// // but this is mine | |
if false { | |
fmt.Println("in if") | |
} else if (1 == 2) { | |
fmt.Println("in else") | |
} else if true { |
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 ( | |
"bytes" | |
"encoding/json" | |
"fmt" | |
"text/tabwriter" | |
) | |
type Beatle struct { |
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
module github.com/markbates/mysite | |
require github.com/gobuffalo/packr v1.15.0 |
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" | |
"net/http" | |
_ "github.com/gobuffalo/buffalo" | |
"github.com/gobuffalo/packr/v2" | |
"github.com/markbates/s3packr/s3packr" | |
) |
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
brew update | |
brew install chruby chruby-fish ruby-install openssl readline libyaml gdbm libffi | |
brew cleanup | |
brew tap raggi/ale | |
brew install openssl-osx-ca | |
echo ". /usr/local/share/chruby/chruby.fish" >> .config/fish/config.fish | |
echo ". /usr/local/share/chruby/auto.fish" >> .config/fish/config.fish | |
ruby-install ruby 2.3.0 | |
echo "ruby-2.3" > .ruby-version |
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
// option 1: | |
// actions/render.go | |
"isCurrentPathName": func(name string, help plush.HelperContext) bool { | |
if cp, ok := help.Value("current_route").(buffalo.RouteInfo); ok { | |
return cp.PathName == name | |
} | |
return false | |
}, | |
// template.html |
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
<%= f.InputTag("Title") %> | |
<%= f.TextArea("Body", {rows: 10}) %> | |
<div id="body-preview"></div> | |
<button class="btn btn-success" role="submit">Save</button> |
NewerOlder