prow/gerrit/client/client.go
func NewClient(instances map[string][]string) (*Client, error) {
	c := &Client{
		handlers: map[string]*gerritInstanceHandler{},
	}
	for instance := range instances {
		gc, err := gerrit.NewClient(instance, nil)
		if err != nil {
			return nil, err
		}

		c.handlers[instance] = &gerritInstanceHandler{
			instance:       instance,
			projects:       instances[instance],
			authService:    gc.Authentication,
			accountService: gc.Accounts,
			changeService:  gc.Changes,
			projectService: gc.Projects,
		}
	}

	return c, nil
}
func NewClient(instances map[string][]string) (*Client, error) {
	c := &Client{
		handlers: map[string]*gerritInstanceHandler{},
	}
	for instance := range instances {
		gc, err := gerrit.NewClient(instance, nil)
		if err != nil {
			return nil, err
		}

		c.handlers[instance] = &gerritInstanceHandler{
			instance:       instance,
			projects:       instances[instance],
			authService:    gc.Authentication,
			accountService: gc.Accounts,
			changeService:  gc.Changes,
			projectService: gc.Projects,
		}
	}

	return c, nil
}
func NewClient ( instances map [ string ] [ ] string ) ( * Client , error ) { c := & Client { handlers : map [ string ] * gerritInstanceHandler { } , } for instance := range instances { gc , err := gerrit . NewClient ( instance , nil ) if err != nil { return nil , err } c . handlers [ instance ] = & gerritInstanceHandler { instance : instance , projects : instances [ instance ] , authService : gc . Authentication , accountService : gc . Accounts , changeService : gc . Changes , projectService : gc . Projects , } } return c , nil }
// NewClient returns a new gerrit client
NewClient returns a new gerrit client