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.

23 lines
347 B

  1. package effects
  2. import (
  3. "git.aiterp.net/lucifer3/server/device"
  4. "strings"
  5. )
  6. func statesDescription(states []device.State) string {
  7. sb := strings.Builder{}
  8. sb.Grow(128)
  9. sb.WriteRune('[')
  10. for i, state := range states {
  11. if i > 0 {
  12. sb.WriteString(", ")
  13. }
  14. sb.WriteString(state.String())
  15. }
  16. sb.WriteRune(']')
  17. return sb.String()
  18. }