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
``` | |
go test -bench=. | |
BenchmarkPlain-8 20000 75742 ns/op | |
BenchmarkDump-8 10000 133477 ns/op | |
PASS | |
ok tmp 3.648s | |
``` |
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
type: array | |
items: | |
$ref: '#/definitions/dataContext' | |
definitions: | |
dataContext: | |
description: 'Information about errors happened during validation of data element' | |
type: object | |
properties: | |
location: | |
description: 'JSON Pointer to element that failed validation' |
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
#!/bin/bash | |
exiv2 ex *.CR2 | |
exiv2 -ep3 -l ./ *.CR2 | |
for f in *.exv; do echo $f; mv "${f%.exv}.exv" "${f%.exv}-preview3.exv"; done | |
exiv2 in *.jpg |
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
{ | |
"type": ["object", "integer"], | |
"properties": { | |
"abcde": { | |
"type": "object", | |
"patternProperties": { | |
"^[a-zA-Z0-9_]+$": { | |
"oneOf": [ |
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 bash | |
default_description="something special" | |
while [ 1 ] | |
do | |
missing_comments=$(golint `go list ./... | grep -v /vendor/` | grep 'comment' | grep 'exported') | |
echo "$missing_comments" | |
test -z "${missing_comments// }" && exit |
This file has been truncated, but you can view the full file.
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
17:38:41 /usr/local/Cellar/go/1.11/libexec/src golint ./... | |
archive/tar/common.go:30:2: exported var ErrHeader should have comment or be unexported | |
archive/tar/common.go:99:2: const paxUid should be paxUID | |
archive/tar/common.go:151:2: struct field Uid should be UID | |
archive/tar/common.go:607:2: don't use underscores in Go names; const c_ISUID should be cISUID | |
archive/tar/common.go:608:2: don't use underscores in Go names; const c_ISGID should be cISGID | |
archive/tar/common.go:609:2: don't use underscores in Go names; const c_ISVTX should be cISVTX | |
archive/tar/common.go:613:2: don't use underscores in Go names; const c_ISDIR should be cISDIR | |
archive/tar/common.go:614:2: don't use underscores in Go names; const c_ISFIFO should be cISFIFO | |
archive/tar/common.go:615:2: don't use underscores in Go names; const c_ISREG should be cISREG |
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 ref_test | |
import ( | |
"testing" | |
) | |
type s struct { | |
ss 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 main | |
import ( | |
"github.com/VividCortex/gohistogram" | |
"net/http" | |
"os" | |
"time" | |
) | |
func main() { |
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
Go 9 hrs 51 mins ███████████████▋░░░░░ 74.9% | |
JSON 1 hr 4 mins █▋░░░░░░░░░░░░░░░░░░░ 8.2% | |
PHP 47 mins █▎░░░░░░░░░░░░░░░░░░░ 6.0% | |
YAML 23 mins ▋░░░░░░░░░░░░░░░░░░░░ 3.0% | |
Markdown 21 mins ▌░░░░░░░░░░░░░░░░░░░░ 2.8% |
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 oauth2 implements password-based authentication middleware. | |
package oauth2 | |
import ( | |
"context" | |
"fmt" | |
"net/http" | |
"time" | |
"golang.org/x/oauth2" |
OlderNewer