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.
19 lines
302 B
19 lines
302 B
package arg
|
|
|
|
import "fmt"
|
|
|
|
// Arg defaults argument.
|
|
type Arg struct {
|
|
Key string
|
|
Value interface{}
|
|
}
|
|
|
|
// String arg to string.
|
|
func (a Arg) String() string {
|
|
return fmt.Sprintf("key:%s, value:%v", a.Key, a.Value)
|
|
}
|
|
|
|
// Val gets valuet argument.
|
|
func (a Arg) Val() interface{} {
|
|
return a.Value
|
|
}
|
|
|