func CreateTokenHandler(tokenStream io.Reader, influxdb *InfluxDB) (*TokenHandler, error) {
	token, err := ioutil.ReadAll(tokenStream)
	if err != nil {
		return nil, err
	}
	client := GetGitHubClient(strings.TrimSpace(string(token)))
	login, err := GetUsername(client) // Get user name for token
	if err != nil {
		return nil, err
	}

	return &TokenHandler{
		gClient:  client,
		login:    login,
		influxdb: influxdb,
	}, nil
}
func CreateTokenHandler(tokenStream io.Reader, influxdb *InfluxDB) (*TokenHandler, error) {
	token, err := ioutil.ReadAll(tokenStream)
	if err != nil {
		return nil, err
	}
	client := GetGitHubClient(strings.TrimSpace(string(token)))
	login, err := GetUsername(client) // Get user name for token
	if err != nil {
		return nil, err
	}

	return &TokenHandler{
		gClient:  client,
		login:    login,
		influxdb: influxdb,
	}, nil
}
func CreateTokenHandler ( tokenStream io . Reader , influxdb * InfluxDB ) ( * TokenHandler , error ) { token , err := ioutil . ReadAll ( tokenStream ) if err != nil { return nil , err } client := GetGitHubClient ( strings . TrimSpace ( string ( token ) ) ) login , err := GetUsername ( client ) // Get user name for token if err != nil { return nil , err } return & TokenHandler { gClient : client , login : login , influxdb : influxdb , } , nil }
// CreateTokenHandler parses the token and create a handler
CreateTokenHandler parses the token and create a handler