func NewSshWithMax(max int) (Ssh, error) { if max < 1 { return nil, fmt.Errorf("Unable to create ssh with %d max resources; max must be a positive number\n", max) } pool, _ := workpool.NewWorkPoolWithMax(max) // error is only returned if max is not positive, so can ignore it return &sshProcessImpl{pool: pool}, nil }
func NewSsh() Ssh { pool, _ := workpool.NewWorkPoolWithMax(MAX_POOL_SIZE) // error is only returned if max is not positive, so can ignore it return &sshProcessImpl{pool: pool} }