Add automatic timestamps for created_at/updated_at

* Update and Insert
* Add --no-auto-timestamps flag
This commit is contained in:
Patrick O'brien 2016-08-29 00:12:37 +10:00
parent 677d45cef4
commit 96d40fcfe4
14 changed files with 201 additions and 60 deletions
strmangle

View file

@ -411,3 +411,17 @@ func StringSliceMatch(a []string, b []string) bool {
return true
}
// ContainsAny returns true if any of the passed in strings are
// found in the passed in string slice
func ContainsAny(a []string, finds ...string) bool {
for _, s := range a {
for _, find := range finds {
if s == find {
return true
}
}
}
return false
}