You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
254 B
15 lines
254 B
package comment_count
|
|
|
|
import "errors"
|
|
|
|
type EntityCheckOption func(*Entity) error
|
|
|
|
func IsIdValid() EntityCheckOption {
|
|
return func(c *Entity) error {
|
|
if c.Id == 0 {
|
|
return errors.New("video id of comment count can't be 0")
|
|
}
|
|
|
|
return nil
|
|
}
|
|
}
|
|
|