Update models/actions/status.go

Co-authored-by: delvh <dev.lh@web.de>
This commit is contained in:
Jason Song 2023-01-04 15:37:55 +08:00 committed by GitHub
parent 9b0203bcc1
commit 2917057b00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -62,6 +62,7 @@ func (s Status) IsRunning() bool {
return s == StatusRunning
}
// In returns whether s is one of the given statuses
func (s Status) In(statuses ...Status) bool {
for _, v := range statuses {
if s == v {