I hereby claim:
- I am comtom on github.
- I am comtom (https://keybase.io/comtom) on keybase.
- I have a public key whose fingerprint is 131E 694F 783E B32F 7AA2 D216 19EE 87EA E285 F732
To claim this, I am signing this object:
func worker(done chan bool) { | |
fmt.Print("working...") | |
time.Sleep(time.Second) | |
fmt.Println("done") | |
done <- true | |
} | |
func main() { | |
done := make(chan bool, 1) | |
go worker(done) |
package main | |
import "fmt" |
func sum(nums ...int) { | |
fmt.Print(nums, " ") | |
total := 0 | |
for _, num := range nums { | |
total += num | |
} | |
fmt.Println(total) | |
} | |
func main() { | |
sum(1, 2) |
go func(msg string) { | |
fmt.Println(msg) | |
}("going") |
var firstVar interface{} | |
firstVar = "this is a string" | |
firstString, ok := firstVar.(string) | |
if (!ok) { | |
fmt.Printf("firstString is not a string, do something about it! Value:'%v'\n", firstString) | |
} |
func f1(arg int) (int, error) { | |
if arg == 42 { | |
return -1, errors.New("can't work with 42") | |
} | |
return arg + 3, nil | |
} | |
if rresult, err := f1(i); err != nil { | |
fmt.Println("f1 failed:", err) | |
} |
I hereby claim:
To claim this, I am signing this object:
FROM alpine:3.7 | |
ENV KUBE_VERSION="v1.11.2" | |
ENV ANSIBLE_VERSION="2.5.0" | |
ENV TERRAFORM_VERSION="0.11.8" | |
# install kubectl | |
RUN set -ex \ | |
&& apk add --update ca-certificates \ | |
&& apk add --update -t deps curl \ |
FROM alpine:3.2 | |
RUN apk add --update ca-certificates && \ | |
apk add libc6-compat && \ | |
rm -rf /var/cache/apk/* /tmp/* | |
ADD micro /micro | |
WORKDIR / | |
ENTRYPOINT [ "/micro" ] |
class IndexController extends CI_Controller { | |
function __construct() { | |
parent::__construct(); | |
$this->load->helper('captcha'); | |
$this->load->model('user', 'user'); | |
} | |
public function location($location_id) { | |
$this->index($location_id); | |
} | |
public function index($location_id = 1) { |