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
| { | |
| "$schema": "https://aka.ms/terminal-profiles-schema", | |
| "actions": [], | |
| "defaultProfile": "{07b52e3e-de2c-5db4-bd2d-ba144ed6c273}", | |
| "profiles": | |
| { | |
| "defaults": {}, | |
| "list": | |
| [ | |
| { |
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" | |
| "time" | |
| ) | |
| // local time calculation | |
| func main() { | |
| currentTime := time.Now() |
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" | |
| "time" | |
| ) | |
| // local time calculation | |
| func main() { | |
| currentTime := time.Now() |
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() { | |
| fmt.Println("I will upload this file to GitHub by using GitHub CLI") | |
| fmt.Println("I edit this for thet gist edit feature") | |
| } |
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" | |
| "time" | |
| ) | |
| func main() { | |
| doneOrDone := make(chan interface{}) | |
| doneRepeat := make(chan 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
| package main | |
| import ( | |
| "fmt" | |
| "time" | |
| ) | |
| func main() { | |
| doneOrDone := make(chan interface{}) | |
| doneRepeat := make(chan 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
| package main | |
| import ( | |
| "fmt" | |
| "time" | |
| ) | |
| func main() { | |
| doneOrDone := make(chan interface{}) | |
| doneRepeat := make(chan 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
| orDone := func(done, c <-chan interface{}) <-chan interface{} { | |
| valStream := make(chan interface{}) | |
| go func() { | |
| defer close(valStream) | |
| for { | |
| select { | |
| case <-done: | |
| return | |
| case v, ok := <-c: | |
| if ok == false { |
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/binary" | |
| "encoding/json" | |
| "fmt" | |
| "log" | |
| "github.com/timshannon/bolthold" | |
| bolt "go.etcd.io/bbolt" |
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 ( | |
| "sync" | |
| "testing" | |
| ) | |
| func BenchmarkContextSwitch(b *testing.B) { | |
| var wg sync.WaitGroup | |
| begin := make(chan struct{}) |