View Post.md

More Powerful Synchronization in Go, using Channels

Here's a common predicament: you have a value, e.g., some string or number or struct, that can be read and written by many goroutines, and you want to make sure readers and writers don't collide -- that readers get the most recently written value, and no other, and that writers don't write the value while a reader is reading it.

You may have an idea in your head about how you would approach this problem, and your idea may be completely correct. But I want to try to level up your Go-fu

View Privacy.md

Top9 Privacy Policy

None of your information is stored anywhere outside of the computer or phone used to create the resulting image. No authorization is shared with any other service or user.

View entries.json
[
{
"id" : "73F3F654-9EC5-4876-8BF6-474E22029A49",
"assets" : [
{
"url" : "http://a1.phobos.apple.com/us/r1000/000/Features/atv/AutumnResources/videos/comp_GL_G004_C010_v03_6Mbps.mov",
"accessibilityLabel" : "Greenland",
"type" : "video",
"id" : "D388F00A-5A32-4431-A95C-38BF7FF7268D",
"timeOfDay" : "day"
View gist:da478771afaf82997127f9c6e5589257
if got, want := foo.Id, "expected-id"; got != want {
t.Errorf("Foo(): got %q, want %q", got, want)
}
View livecaption.go
// Copyright 2016 Google Inc. All rights reserved.
// Use of this source code is governed by the Apache 2.0
// license that can be found in the LICENSE file.
// Command caption reads an audio file and outputs the transcript for it.
package main
import (
"io"
"log"
View test.js
var text = 'Hello world';
var buffer = document.createElement('buffer');
document.body.appendChild(buffer);
buffer.value = text;
buffer.focus();
buffer.selectionStart = 0;
buffer.selectionEnd = buffer.value.length;
if (!document.execCommand('copy')) {
console.log('Couldn\'t copy from buffer');
View selectchan.go
package main
import (
"fmt"
"math/rand"
"reflect"
"time"
)
func main() {
View main.go
package main
import (
"fmt"
"math/rand"
"strings"
"time"
)
func main() {
View example.md

Some header

Some other header

Overrun with headers at this point