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 NewReadCloser(r io.Reader) ReadCloser { | |
if rc, ok := r.(io.ReadCloser) { | |
return ReadCloser{rc} | |
} else { | |
return NopReadCloser{r} | |
} | |
} |
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" | |
) | |
// Option types | |
type option interface { |
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
char * lines[] = { | |
"Now is the winter of our discontent", | |
"Made glorious summer by this sun of York;", | |
"And all the clouds that lour'd upon our house", | |
"In the deep bosom of the ocean buried." | |
}; |
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
char * lines[] = { | |
"Now is the winter of our discontent", | |
"Made glorious summer by this sun of York;", | |
"And all the clouds that lour'd upon our house", | |
"In the deep bosom of the ocean buried.", | |
}; |
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
Repo[SalesUS] Repo[SalesEurope] | |
| | | |
| | | |
\ V | |
-------------->+ Pipeline[Filter] | |
| | |
| | |
Repo[FilterOutput] Repo[PopulationSizesPerGeography] | |
| | | |
V / |
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
I1030 21:46:51.476931 1 plugins.go:69] No cloud provider specified. | |
I1030 21:46:51.477196 1 nodecontroller.go:114] Sending events to api server. | |
E1030 21:46:51.477299 1 controllermanager.go:201] Failed to start service controller: ServiceController should not be run without a cloudprovider. | |
I1030 21:46:51.477359 1 plugins.go:180] Loaded volume plugin "kubernetes.io/host-path" | |
I1030 21:46:51.477376 1 plugins.go:180] Loaded volume plugin "kubernetes.io/nfs" | |
E1030 21:46:51.477504 1 reflector.go:136] Failed to list *api.Pod: Get http://127.0.0.1:8080/api/v1/pods: dial tcp 127.0.0.1:8080: connection refused | |
E1030 21:46:51.477597 1 reflector.go:136] Failed to list *api.PersistentVolume: Get http://127.0.0.1:8080/api/v1/persistentvolumes: dial tcp 127.0.0.1:8080: connection refused | |
E1030 21:46:51.477571 1 reflector.go:136] Failed to list *api.Service: Get http://127.0.0.1:8080/api/v1/services: dial tcp 127.0.0.1:8080: connection refused | |
E1030 21:46:51.477605 1 re |
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
{ | |
"kind": "List", | |
"apiVersion": "v1", | |
"metadata": {}, | |
"items": [ | |
{ | |
"kind": "Pod", | |
"apiVersion": "v1", | |
"metadata": { | |
"name": "etcd-rc-70dr3", |
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 Mount() { | |
mounter := ... | |
errChan := make(chan error) | |
go func() { | |
if err := mounter.Mount(); err != nil { | |
errChan <- err | |
} | |
}() | |
readyChan := make(chan bool) | |
go func() { |
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 enumerateFiles(dirname string, cb func (string) error ) { | |
filepath.Walk(dirname, func(path string, f os.FileInfo, err error) error { | |
if !f.IsDir() { | |
if err := cb(path); err != nil { | |
return err | |
} | |
} | |
return nil | |
}) | |
} |
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
for file := range enumerateFiles() { | |
... | |
break | |
... | |
} |
NewerOlder