I hereby claim:
- I am kaleocheng on github.
- I am kaleocheng (https://keybase.io/kaleocheng) on keybase.
- I have a public key ASAfaSIXBDt-aEo0GGROqrTy0yXBIQOzVXySLAQWhylvHQo
To claim this, I am signing this object:
| // Traverses an arbitrary struct and translates all stings it encounters | |
| // | |
| // I haven't seen an example for reflection traversing an arbitrary struct, so | |
| // I want to share this with you. If you encounter any bugs or want to see | |
| // another example please comment. | |
| // | |
| // The MIT License (MIT) | |
| // | |
| // Copyright (c) 2014 Heye Vöcking | |
| // |
| package valid | |
| import ( | |
| "reflect" | |
| ) | |
| const tagName = "valid" | |
| func IsZero(x interface{}) bool { | |
| return reflect.DeepEqual(x, reflect.Zero(reflect.TypeOf(x)).Interface()) |
| # Add the following 'help' target to your Makefile | |
| # And add help text after each target name starting with '\#\#' | |
| help: ## Show this help. | |
| @fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//' | |
| # Everything below is an example | |
| target00: ## This message will show up when typing 'make help' | |
| @echo does nothing |
| #!/usr/bin/swift | |
| # How to run: | |
| # swiftc dict.swift | |
| # ./dict hello | |
| import Foundation | |
| if (CommandLine.argc < 2) { | |
| print("Usage: dictionary word") | |
| }else{ | |
| let argument = CommandLine.arguments[1] |
I hereby claim:
To claim this, I am signing this object: