mirror of
https://github.com/cheat/cheat.git
synced 2024-11-16 08:58:28 +01:00
e5114a3e76
- Re-implemented the project in Golang, and deprecated Python entirely - Implemented several new, long-requested features - Refactored cheatsheets into a separate repository
15 lines
293 B
Go
15 lines
293 B
Go
package sheet
|
|
|
|
// Tagged returns true if a sheet was tagged with `needle`
|
|
func (s *Sheet) Tagged(needle string) bool {
|
|
|
|
// if any of the tags match `needle`, return `true`
|
|
for _, tag := range s.Tags {
|
|
if tag == needle {
|
|
return true
|
|
}
|
|
}
|
|
|
|
// otherwise, return `false`
|
|
return false
|
|
}
|