Skip to content

Instantly share code, notes, and snippets.

View nodirt's full-sized avatar

Nodir Turakulov nodirt

View GitHub Profile
# config/
`config` is a library that provides centralized configuration management
functionality for webapp2 and Cloud Endpoints apps. Acts as a client
for [config_service](../../../config_service).
The library can work in two modes: remote and fs. In remote mode the library
fetches configs from a configuration service. In fs mode it uses file system
as a source of configs. The library defaults to fs mode if URL of the config
service is uknown.
$ go get npf.io/gorram
package npf.io/deputy: unrecognized import path "npf.io/deputy" (parse https://npf.io/deputy?go-get=1: no go-import meta tags)
$ go get -u github.com/natefinch/gorram
package npf.io/deputy: unrecognized import path "npf.io/deputy" (parse https://npf.io/deputy?go-get=1: no go-import meta tags)
@nodirt
nodirt / proposal.md
Last active September 14, 2016 15:54
builder "Infra Presubmit"
searching for all builds since timestamp 1465776546 (333h35m13.016766098s)...
skipped build 9009015842948592256
skipped build 9009025325370070736
patch/gerrit/chromium-review.googlesource.com/353251/5 is inconsistent
FAILURE https://luci-milo.appspot.com/swarming/prod/2f8d9d534bd79210
SUCCESS https://build.chromium.org/p/tryserver.infra/builders/Infra%20Presubmit/builds/2538
patch/gerrit/chromium-review.googlesource.com/352817/2 is inconsistent
FAILURE https://luci-milo.appspot.com/swarming/prod/2f739587112b3610
SUCCESS https://build.chromium.org/p/tryserver.infra/builders/Infra%20Presubmit/builds/2408
builder "Infra Presubmit"
searching for all builds since 2016-06-12 17:09:06.554257891 -0700 PDT...
patch/gerrit/chromium-review.googlesource.com/353352/2 is inconsistent
FAILURE https://luci-milo.appspot.com/swarming/prod/2f88fa81aa4f6a10
SUCCESS https://build.chromium.org/p/tryserver.infra/builders/Infra%20Presubmit/builds/2507
patch/gerrit/chromium-review.googlesource.com/351773/1 is inconsistent
FAILURE https://luci-milo.appspot.com/swarming/prod/2f63db5974b12510
FAILURE https://luci-milo.appspot.com/swarming/prod/2f6391b1e2731710
SUCCESS https://build.chromium.org/p/tryserver.infra/builders/Infra%20Presubmit/builds/2311
FAILURE https://build.chromium.org/p/tryserver.infra/builders/Infra%20Presubmit/builds/2308

Proposal: deterministic import blocks

Abstract

gofmt makes a large portion of go code consistently formatted and it is great. However, one thing that keeps inconsistent is import blocks. In order to make them consistent, I am proposing to make order and contents of import blocks deterministic.

Background

gofmt does not mind

python -u ../../../scripts/slave/annotated_run.py --use-factory-properties-from-disk --build-properties-gz=eNpdT8FOwzAM/ZUq51FvpQPUG0ekHdDETohDmprV0CSdk3SbEP+O264Xbn7P7z0//6i60xY7ClFV7x8rVbN2plWVUjIn6prax8N+J0QbYx8qgInNTcveUrK55yP0EPkakAfknNwna1jcyE7ixf0y0tmOXLpkr4yGAmb3RfaGISIvapdsLajarFfK6nFzc/+LF33P/gtNnIsy9j5Q9Hxd8CmNwc2zCDblw7Ys1k+P5bgYKJB3syx0esDbhcEW2+LOlkKfPX83JDUUHORqAOcFgmGYf5uqwmSeGfX7B1IGbmc=
in dir /Users/nodir/cr/infra/build/slave/infra/build (timeout 2400 secs)
watching logfiles {}
argv: ['python', '-u', '../../../scripts/slave/annotated_run.py', '--use-factory-properties-from-disk', '--build-properties-gz=eNpdT8FOwzAM/ZUq51FvpQPUG0ekHdDETohDmprV0CSdk3SbEP+O264Xbn7P7z0//6i60xY7ClFV7x8rVbN2plWVUjIn6prax8N+J0QbYx8qgInNTcveUrK55yP0EPkakAfknNwna1jcyE7ixf0y0tmOXLpkr4yGAmb3RfaGISIvapdsLajarFfK6nFzc/+LF33P/gtNnIsy9j5Q9Hxd8CmNwc2zCDblw7Ys1k+P5bgYKJB3syx0esDbhcEW2+LOlkKfPX83JDUUHORqAOcFgmGYf5uqwmSeGfX7B1IGbmc=']
environment:
BUILDBOT_BLAMELIST=[]
BUILDBOT_BRANCH=
BUILDBOT_BUILDBOTURL=https://b
@nodirt
nodirt / keybase.md
Created February 12, 2016 08:02
keybase.md

Keybase proof

I hereby claim:

  • I am nodirt on github.
  • I am nodir (https://keybase.io/nodir) on keybase.
  • I have a public key whose fingerprint is C907 0A16 B427 AE00 C122 FD90 3A20 9BAE 675C FA5E

To claim this, I am signing this object:

client := &prpc.Client{Host: "prpc-helloworld.appspot.com"}
greeter := helloworld.NewGreeterPRPCClient(client)
ctx := context.Background()
res, err := greeter.SayHello(ctx, &helloworld.HelloRequest{
Name: "nodir",
})
if err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}