github.com/micro/go-micro/v2@v2.9.1/config/value.go (about)

     1  package config
     2  
     3  import (
     4  	"time"
     5  
     6  	"github.com/micro/go-micro/v2/config/reader"
     7  )
     8  
     9  type value struct{}
    10  
    11  func newValue() reader.Value {
    12  	return new(value)
    13  }
    14  
    15  func (v *value) Bool(def bool) bool {
    16  	return false
    17  }
    18  
    19  func (v *value) Int(def int) int {
    20  	return 0
    21  }
    22  
    23  func (v *value) String(def string) string {
    24  	return ""
    25  }
    26  
    27  func (v *value) Float64(def float64) float64 {
    28  	return 0.0
    29  }
    30  
    31  func (v *value) Duration(def time.Duration) time.Duration {
    32  	return time.Duration(0)
    33  }
    34  
    35  func (v *value) StringSlice(def []string) []string {
    36  	return nil
    37  }
    38  
    39  func (v *value) StringMap(def map[string]string) map[string]string {
    40  	return map[string]string{}
    41  }
    42  
    43  func (v *value) Scan(val interface{}) error {
    44  	return nil
    45  }
    46  
    47  func (v *value) Bytes() []byte {
    48  	return nil
    49  }