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" | |
| "sync" | |
| ) | |
| func main() { | |
| eventBus := make(chan string) |
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
| # custom functions | |
| function set_booklit | |
| fly -t dev login -u test -p test -c http://localhost:8080 | |
| fly -t dev sp -p booklit -c (echo "\ | |
| resources: | |
| - name: booklit | |
| type: git | |
| source: {uri: "https://github.com/vito/booklit"} | |
| jobs: |
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
| func CallerMethod() { | |
| events := make(chan string) | |
| go func() { | |
| Callee(events) | |
| }() | |
| select { | |
| case msg := <-events: | |
| fmt.Println(msg) | |
| } | |
| } |
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
| #!/bin/bash | |
| fly -t dev login -c http://localhost:8080 -u test -p test | |
| cat << EOF > /tmp/booklit | |
| resources: | |
| - name: booklit | |
| type: git | |
| source: {uri: "https://github.com/vito/booklit"} | |
| jobs: |
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
| version: '3' | |
| services: | |
| db: | |
| image: postgres | |
| ports: | |
| - 6543:5432 | |
| environment: | |
| POSTGRES_DB: concourse | |
| POSTGRES_USER: dev |