This file contains hidden or 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 client_test | |
| import ( | |
| "math" | |
| "testing" | |
| ) | |
| func TestUnitClient(t *testing.T) { // go test will hit this method | |
| t.Run("Client Test", testClient) | |
| } |
This file contains hidden or 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
| ### Usage: kong.sh [--no-db] | |
| ### | |
| ### - Run kong with an in memory database | |
| ### kong.sh --no-db | |
| ### | |
| ### - Run kong with postgre | |
| ### kong.sh | |
| print_usage() { | |
| awk -F'### ' '/^###/ { print $2 }' "$0" |
This file contains hidden or 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 ( | |
| "crypto/rsa" | |
| "encoding/base64" | |
| "encoding/binary" | |
| "encoding/json" | |
| "fmt" | |
| "github.com/dgrijalva/jwt-go" | |
| "io/ioutil" |
This file contains hidden or 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
| // Use the sliding window method | |
| func findAnagrams(full string, anagram string) []int { | |
| var ( | |
| result []int | |
| sample = []rune(full) | |
| gram = make(map[rune]int) | |
| mirror = make(map[rune]int) | |
| ) | |
| for _, character := range anagram { |
This file contains hidden or 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" | |
| "reflect" | |
| ) | |
| type Animal interface { | |
| Move() | |
| } |
This file contains hidden or 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 ( | |
| "encoding/json" | |
| "fmt" | |
| ) | |
| func main() { | |
| type Animal struct { | |
| Name string `json:"name"` |
This file contains hidden or 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" | |
| "os" | |
| ) | |
| func main() { | |
| exit(run()) | |
| } |
This file contains hidden or 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
| $ ./src/check.cr {source: {}, version: {}} | |
| $./src/in.cr dest {"source":{"name":"ruby","type":"ruby","version_filter":"2.4.X"},"version":{"ref":"2.4.6"}} | |
| STDOUT => {"ref":"2.4.6","url":"https://cache.ruby-lang.org/pub/ruby/2.4/ruby-2.4.6.tar.gz","sha256":"de0dc8097023716099f7c8a6ffc751511b90de7f5694f401b59f2d071db910be"} | |
| RESOURCE => /dest/ruby-2.4.6.tar.gz |
This file contains hidden or 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
| git clone "https://github.com/cloudfoundry/node-engine-cnb" | |
| git clone "https://github.com/cloudfoundry/npm-cnb" | |
| git clone "https://github.com/cloudfoundry/yarn-cnb" | |
| git clone "https://github.com/cloudfoundry/python-cnb" | |
| git clone "https://github.com/cloudfoundry/pip-cnb" | |
| git clone "https://github.com/cloudfoundry/pipenv-cnb" | |
| git clone "https://github.com/cloudfoundry/go-compiler-cnb" | |
| git clone "https://github.com/cloudfoundry/go-mod-cnb" | |
| git clone "https://github.com/cloudfoundry/dep-cnb" | |
| git clone "https://github.com/cloudfoundry/openjdk-cnb" |
This file contains hidden or 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() { | |
| pingchan := make(chan string) | |
| // Have a channel per callout group |