func deriveIdentitySlice(ctx *cli.Context) ([]string, error) {
	users := ctx.StringSlice("user")
	machines := ctx.StringSlice("machine")

	identities := make([]string, 0)
	for _, u := range users {
		identity, err := identityString("user", u)
		if err != nil {
			return identities, err
		}

		if identity == "*" {
			return []string{"*"}, nil
		}

		identities = append(identities, identity)
	}

	for _, m := range machines {
		identity, err := identityString("machine", m)
		if err != nil {
			return identities, err
		}

		if identity == "*" {
			return []string{"*"}, nil
		}

		identities = append(identities, identity)
	}

	return identities, nil
}
// Derives a slice of identity segments for us in building a PathExp object.
Derives a slice of identity segments for us in building a PathExp object.
// Derives a slice of identity segments for us in building a PathExp object .
func deriveIdentitySlice(ctx *cli.Context) ([]string, error) {
	users := ctx.StringSlice("user")
	machines := ctx.StringSlice("machine")
	identities := make([]string, 0)
	for _, u := range users {
		identity, err := identityString("user", u)
		if err != nil {
			return identities, err
		}
		if identity == "*" {
			return []string{"*"}, nil
		}
		identities = append(identities, identity)
	}
	for _, m := range machines {
		identity, err := identityString("machine", m)
		if err != nil {
			return identities, err
		}
		if identity == "*" {
			return []string{"*"}, nil
		}
		identities = append(identities, identity)
	}
	return identities, nil
}
func deriveIdentitySlice ( ctx * cli . Context ) ( [ ] string , error ) { users := ctx . StringSlice ( " " ) machines := ctx . StringSlice ( " " ) identities := make ( [ ] string , 0 ) for _ , u := range users { identity , err := identityString ( " " , u ) if err != nil { return identities , err } if identity == " " { return [ ] string { " " } , nil } identities = append ( identities , identity ) } for _ , m := range machines { identity , err := identityString ( " " , m ) if err != nil { return identities , err } if identity == " " { return [ ] string { " " } , nil } identities = append ( identities , identity ) } return identities , nil }
Derives a slice of identity segments for us in building a PathExp object.
Derives a slice of identity segments for us in building a PathExp object .