This file contains 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
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use utf8; | |
my $old_version=`git describe --tag --abbrev=0`; | |
chomp $old_version; | |
my ($major, $minor, $patch) = (0, 0, 0); | |
if ($old_version =~ /v?(\d+)\.(\d+)\.(\d+)/) { |
This file contains 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 ( | |
"log" | |
"testing" | |
"golang.org/x/sync/errgroup" | |
) | |
type action func() error |
This file contains 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 ( | |
"context" | |
"crypto/sha1" | |
"encoding/hex" | |
"fmt" | |
"hash/crc32" | |
"log" | |
"math/rand" |
This file contains 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 ( | |
"bytes" | |
"encoding/base64" | |
"io/ioutil" | |
"log" | |
"os" | |
) |
This file contains 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_test | |
import ( | |
"fmt" | |
"strconv" | |
"testing" | |
) | |
var ( | |
prefix = "abcdefghi:" |
This file contains 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 phrasetrie | |
import ( | |
"strings" | |
"unicode" | |
"unicode/utf8" | |
) | |
type node struct { | |
value string |
This file contains 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 phrasetrie | |
import "strings" | |
type node struct { | |
value string | |
children []*node | |
} | |
func newNode(size int) *node { |
This file contains 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 phrasetrie | |
import ( | |
"math/rand" | |
"sort" | |
"testing" | |
) | |
type mp map[int]struct{} |
This file contains 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 phrasetrie | |
type node struct { | |
children map[rune]*node | |
value string | |
} | |
func newNode() *node { | |
return &node{ | |
children: make(map[rune]*node), |
This file contains 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 phrasetrie | |
import ( | |
"regexp" | |
"strings" | |
"testing" | |
"github.com/google/go-cmp/cmp" | |
) |
NewerOlder