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
// https://play.golang.org/p/2LBJbIBVw37 | |
package main | |
import ( | |
"fmt" | |
) | |
type Foo struct { | |
name string | |
} |
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" | |
"github.com/google/go-cmp/cmp" | |
"github.com/google/go-cmp/cmp/cmpopts" | |
) | |
func main() { |
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 users | |
import ( | |
"encoding/json" | |
) | |
// UserProfile contains all the information details of a given user | |
type UserProfile struct { | |
FirstName string `json:"first_name"` | |
LastName string `json:"last_name"` |
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" | |
"log" | |
"reflect" | |
"github.com/mitchellh/mapstructure" | |
"github.com/suzuki-shunsuke/go-set" | |
) |
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
{ | |
"permissions" : { | |
"outputs" : [ "create", "edit", "terminate", "read" ], | |
"sources" : [ "read" ], | |
"indexranges" : [ "read", "rebuild" ], | |
"deflector" : [ "read", "cycle" ], | |
"loggers" : [ "readsubsystem", "edit", "editsubsystem", "read" ], | |
"inputs" : [ "terminate", "read", "create", "changestate", "edit" ], | |
"lbstatus" : [ "change" ], | |
"roles" : [ "edit", "create", "read", "delete" ], |
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
--- | |
- hosts: localhost | |
tasks: | |
- shell: "echo '{\"changed\": true}'" | |
register: result | |
changed_when: (result.stdout|from_json)["changed"] | |
- shell: "echo '{\"changed\": false}'" | |
register: result | |
changed_when: (result.stdout|from_json)["changed"] |
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" | |
"io/ioutil" | |
"os" | |
"github.com/ghodss/yaml" | |
) |
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 models | |
type RuntimeError interface { | |
Param() interface{} // runtimeエラーが起こった祭のpanic()の引数を取得 | |
Error() string | |
} | |
type runtimeErrorImpl struct { | |
data struct { | |
param interface{} |
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
#!/usr/bin/env zsh | |
set -e | |
NODE_VERSION=$1 | |
nodebrew install-binary $NODE_VERSION | |
nodebrew use $NODE_VERSION | |
PACKAGES=( |
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
#!/usr/bin/env zsh | |
set -e | |
NODE_VERSION=$1 | |
nodebrew install-binary $NODE_VERSION | |
nodebrew use $NODE_VERSION | |
PACKAGES=( |