Add initial project files

This commit is contained in:
2023-02-07 04:44:07 +00:00
commit af7291815d
27 changed files with 1415 additions and 0 deletions

19
pkg/people/power.go Normal file
View File

@@ -0,0 +1,19 @@
package people
import "strings"
// SuperPowers list of an SuperHero.
// Normal person has no super-power?
// Perhaps we just don't know enough to distinguish the qualities in each individual person. Sad but true.
type SuperPowers []string
// Contains superpower list the strength?
// Not go idiomatic? Okay, we can discuss it.
func (s *SuperPowers) Contains(power string) bool {
for _, p := range *s {
if strings.EqualFold(p, power) {
return true
}
}
return false
}