//NewDuckling returns a duckling service instance.
//If it couldn't be initialized due to missing env variables - DUCKLING_SERVER holding host address
//will return an error
NewDuckling returns a duckling service instance.
If it couldn't be initialized due to missing env variables - DUCKLING_SERVER holding host address
will return an error
// NewDuckling returns a duckling service instance . // If it couldn ' t be initialized due to missing env variables - DUCKLING_SERVER holding host address // will return an error
func NewDuckling() (*Duckling, error) {
	url := os.Getenv("DUCKLING_SERVER")
	if len(url) == 0 {
		return nil, errors.New("DUCKLING_SERVER host address is missing in environment variables. Add host address where duckling is running to use Duckling as datetime service")
	}
	return &Duckling{url: url, parseAPI: "/parse"}, nil
}
func NewDuckling ( ) ( * Duckling , error ) { url := os . Getenv ( " " ) if len ( url ) == 0 { return nil , errors . New ( " " ) } return & Duckling { url : url , parseAPI : " " } , nil }
NewDuckling returns a duckling service instance.
NewDuckling returns a duckling service instance .