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.

20 lines
302B

  1. package arg
  2. import "fmt"
  3. // Arg defaults argument.
  4. type Arg struct {
  5. Key string
  6. Value interface{}
  7. }
  8. // String arg to string.
  9. func (a Arg) String() string {
  10. return fmt.Sprintf("key:%s, value:%v", a.Key, a.Value)
  11. }
  12. // Val gets valuet argument.
  13. func (a Arg) Val() interface{} {
  14. return a.Value
  15. }