git.zd.zone/hrpc/hrpc@v0.0.12/option/environment.go (about)

     1  package option
     2  
     3  type Environment string
     4  
     5  func (e Environment) String() string {
     6  	return string(e)
     7  }
     8  
     9  const (
    10  	Development Environment = "development"
    11  	Production  Environment = "production"
    12  	// Foundation is a special environment that should not be used for each services
    13  	Foundation Environment = "foundation"
    14  )
    15  
    16  // WithEnvironment sets the env
    17  func WithEnvironment(env Environment) Option {
    18  	return func(o *Options) {
    19  		o.ENV = env
    20  	}
    21  }