echo.go 403 B

1234567891011121314151617181920212223242526
  1. package main
  2. import (
  3. "fmt"
  4. )
  5. type echo struct {
  6. }
  7. func (f *echo) Validate(args []interface{}) error {
  8. if len(args) != 1 {
  9. return fmt.Errorf("echo function only supports 1 parameter but got %d", len(args))
  10. }
  11. return nil
  12. }
  13. func (f *echo) Exec(args []interface{}) (interface{}, bool) {
  14. result := args[0]
  15. return result, true
  16. }
  17. func (f *echo) IsAggregate() bool {
  18. return false
  19. }
  20. var Echo echo