// Copyright (c) 2013 Perforce Software. All rights reserved. // // Some higher level operations on the "p4 clients" command package p4go // Higher level operations around the clients command type ClientsDAO interface { // Runs "p4 clients -u [user]" ListClientsForUser(user string) ([]map[string]string, error) } // Runs "p4 clients -u [user]" func (dao *p4DaoHandle) ListClientsForUser(user string) ([]map[string]string, error) { dao.Clear() dao.ClientApi.SetArgv([]string{"-u", user}) dao.ClientApi.Run("clients", dao.ClientUser) if dao.HasError() { return nil, dao.CreateError() } clients, _ := mapListTagOutput(dao.ClientUser.GetOutputInfo(), "client") return clients, nil }