github.heygears.com/openimsdk/tools@v0.0.49/log/file-rotatelogs/internal/option/option.go (about)

     1  package option
     2  
     3  type Interface interface {
     4  	Name() string
     5  	Value() interface{}
     6  }
     7  
     8  type Option struct {
     9  	name  string
    10  	value interface{}
    11  }
    12  
    13  func New(name string, value interface{}) *Option {
    14  	return &Option{
    15  		name:  name,
    16  		value: value,
    17  	}
    18  }
    19  
    20  func (o *Option) Name() string {
    21  	return o.name
    22  }
    23  
    24  func (o *Option) Value() interface{} {
    25  	return o.value
    26  }