Skip to content

Instantly share code, notes, and snippets.

View ciwarnings
WARN [runner] Can't run linter goanalysis_metalinter: S1009: failed prerequisites: [(inspect@command-line-arguments, isgenerated@command-line-arguments): analysis skipped: errors in package: [/home/sougou/dev/src/vitess.io/vitess/go/vt/vttablet/heartbeat/writer.go:160:2: undeclared name: writes /home/sougou/dev/src/vitess.io/vitess/go/vt/vttablet/heartbeat/writer.go:185:2:
undeclared name: writeErrors]]
WARN [runner] Can't run linter unused: buildir: analysis skipped: errors in package: [/home/sougou/dev/src/vitess.io/vitess/go/vt/vttablet/heartbeat/writer.go:160:2: undeclared name: writes /home/sougou/dev/src/vitess.io/vitess/go/vt/vttablet/heartbeat/writer.go:185:2: undeclared name: writeErrors]
ERRO Running error: buildir: analysis skipped: errors in package: [/home/sougou/dev/src/vitess.io/vitess/go/vt/vttablet/heartbeat/writer.go:160:2: undeclared name: writes /home/sougou/dev/src/vitess.io/vitess/go/vt/vttablet/heartbeat/writer.go:185:2: undeclared name: writeErrors]
go/vt/vttablet/heartbeat/writer.go
View sample_vstream_client.go
/*
Copyright 2019 The Vitess Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
@sougou
sougou / cluster-down.sh
Created Jul 13, 2018
Local Example shortcuts
View cluster-down.sh
./vtgate-down.sh
./sharded-vttablet-down.sh
./vttablet-down.sh
./vtctld-down.sh
./zk-down.sh
rm -r $VTDATAROOT/*
@sougou
sougou / mysql_table_stats.json
Last active Jan 15, 2019
Prometheus and Grafa files used in Percona presentation
View mysql_table_stats.json
{
"__inputs": [
{
"name": "DS_VITESS",
"label": "vitess",
"description": "",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
}
@sougou
sougou / cluster-up.sh
Created Jan 24, 2018
Automation for bringing up local cluster
View cluster-up.sh
set -e
script_root=.
$script_root/zk-up.sh
$script_root/vtctld-up.sh
$script_root/vttablet-up.sh
sleep 10s
$script_root/lvtctl.sh InitShardMaster -force test_keyspace/0 test-100
@sougou
sougou / cluster-down.sh
Created Dec 22, 2017
Vitess resharding commands for local example
View cluster-down.sh
#!/bin/bash
# Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
View go-imports-diff
diff --git a/imports/fix.go b/imports/fix.go
index 1387c997..3504d40b 100644
--- a/imports/fix.go
+++ b/imports/fix.go
@@ -641,12 +641,6 @@ func loadExportsGoPath(expectPackage, dir string) map[string]bool {
// handled by ctx.MatchFile.
continue
}
- if pkgName != expectPackage {
- if Debug {
View vim-go-diff
diff --git a/autoload/go/list.vim b/autoload/go/list.vim
index 6859a9f..aa53759 100644
--- a/autoload/go/list.vim
+++ b/autoload/go/list.vim
@@ -32,9 +32,9 @@ function! go#list#Window(listtype, ...)
endif
if l:listtype == "locationlist"
- exe 'lopen ' . height
+ exe 'botright lopen ' . height
View vtexec.py
#!/usr/bin/python
"""This executes the specified commands from the output of vtlist.py.
This tool expects its input to be piped from vtlist.py. Please
view the documentation of vtlist.py on how to use it.
"""
import argparse
import subprocess
View vtlist.py
#!/usr/bin/python
"""This tool prints a list of all vttablets from vtctld.
This is meant to be used in conjucntion with vtexec.py.
Run vtlist.py and pipe it through grep filters to narrow down
the list of vttablets you want to identify. Once you're satisfied with the
list, pipe the final output to vtexec.py, which will execute the given
command on all vttablets of the list.