- Verify the high level business goals are met with the implementation from product point of view
- Look for scalability issues
- Outline and note down high level tasks / issues
- Verify code longterm testability
- Check code behavior runtime observability
- Look for high level design principle violation
- antipatterns against 12 factor app
- lack view/entity/bussiness-logic layer isolation
This file contains hidden or 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 | |
function _comp_go-subcmd() { | |
local cmd=${1:?"cmd is required"} | |
local cur=${COMP_WORDS[COMP_CWORD]} | |
# try find completion for cmd options | |
if _comp_go-subcmd-opts "${cmd}"; then | |
return 0 | |
fi |
This file contains hidden or 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/sh | |
source_up_all() { | |
local originalPWD=$(pwd) | |
local currentPWD=${originalPWD} | |
while [ "${currentPWD}" != "/" ]; do | |
cd .. | |
currentPWD=$(pwd) |
This file contains hidden or 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
## I expect this to fail when string passed as first argument | |
"bash -i -c 'echo hello world'" | |
#>bash: bash -i -c 'echo hello world': command not found... | |
## I expect this to fail when string " is around ${@}, but well... | |
$ function asdf() { "${@}"; } | |
$ asdf bash -i -c 'echo hello world' | |
#>hello world | |
## I expect an empty string value |
This file contains hidden or 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/xml" | |
"fmt" | |
"io" | |
"log" | |
"strings" | |
) |
This file contains hidden or 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
// Copyright 2010 The Go Authors. All rights reserved. | |
// Use of this source code is governed by a BSD-style | |
// license that can be found in the LICENSE file. | |
package time | |
const ( | |
_ = iota | |
stdLongMonth = iota + stdNeedDate // "January" | |
stdMonth // "Jan" |
This file contains hidden or 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 x | |
// interface TYpe based switch | |
func handlerForInterface(handler interface{}) EventHandler { | |
switch v := handler.(type) { | |
case func(*Session, interface{}): | |
return interfaceEventHandler(v) | |
case func(*Session, *ChannelCreate): | |
return channelCreateEventHandler(v) | |
case func(*Session, *ChannelDelete): |
- CTRL+u
- clears from cursor to beginning of line
- CTRL+k
- clears from cursor to end of line
- CTRL+d
- clears one character to the right of the cursor
- Esc+Backspace
- clears one word to the left of the cursor
- Esc+d
- clears one word to the right of the cursor
This file contains hidden or 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
CGO_ENABLED=0 go build -a -ldflags '-extldflags "-static"' . |
This file contains hidden or 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 | |
var flagAlias = map[string]string{ | |
"long-version": "lv", | |
} | |
func init() { | |
for from, to := range flagAlias { | |
flagSet := flag.Lookup(from) | |
cli.Var(flagSet.Value, to, fmt.Sprintf("alias to %s", flagSet.Name)) |
NewerOlder