Skip to content

Commit

Permalink
enhance: [GoSDK] move client pkg go files to sub one (#37492)
Browse files Browse the repository at this point in the history
Related to #31293

Client source files under client pkg cannot be evaluate correctly by
codecov. This PR moves them to `milvusclient` sub-package to fix this
issue and follow go major version best practice.

---------

Signed-off-by: Congqi Xia <[email protected]>
  • Loading branch information
congqixia authored Nov 7, 2024
1 parent 40ba5a3 commit 11f4fe0
Show file tree
Hide file tree
Showing 50 changed files with 50 additions and 50 deletions.
2 changes: 1 addition & 1 deletion client/alias.go → client/milvusclient/alias.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package client
package milvusclient

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package client
package milvusclient

import "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"

Expand Down
2 changes: 1 addition & 1 deletion client/alias_test.go → client/milvusclient/alias_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package client
package milvusclient

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion client/client.go → client/milvusclient/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package client
package milvusclient

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package client
package milvusclient

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package client
package milvusclient

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package client
package milvusclient

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion client/collection.go → client/milvusclient/collection.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package client
package milvusclient

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package client
package milvusclient

import (
"fmt"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package client
package milvusclient

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion client/common.go → client/milvusclient/common.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package client
package milvusclient

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion client/database.go → client/milvusclient/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package client
package milvusclient

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package client
package milvusclient

import "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package client
package milvusclient

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion client/doc.go → client/milvusclient/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
// limitations under the License.

// Package milvusclient implements the official Go Milvus client for v2.
package client
package milvusclient
2 changes: 1 addition & 1 deletion client/index.go → client/milvusclient/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package client
package milvusclient

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package client
package milvusclient

import (
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion client/index_test.go → client/milvusclient/index_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package client
package milvusclient

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package client
package milvusclient

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package client
package milvusclient

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package client
package milvusclient

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package client
package milvusclient

import (
"time"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package client
package milvusclient

import (
"context"
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion client/partition.go → client/milvusclient/partition.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package client
package milvusclient

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package client
package milvusclient

import "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package client
package milvusclient

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion client/read.go → client/milvusclient/read.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package client
package milvusclient

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package client
package milvusclient

import (
"encoding/json"
Expand Down
2 changes: 1 addition & 1 deletion client/read_test.go → client/milvusclient/read_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package client
package milvusclient

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion client/results.go → client/milvusclient/results.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package client
package milvusclient

import (
"reflect"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package client
package milvusclient

import (
"testing"
Expand Down
2 changes: 1 addition & 1 deletion client/write.go → client/milvusclient/write.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package client
package milvusclient

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package client
package milvusclient

import (
"fmt"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package client
package milvusclient

import (
"encoding/json"
Expand Down
2 changes: 1 addition & 1 deletion client/write_test.go → client/milvusclient/write_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package client
package milvusclient

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion tests/go_client/base/milvus_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"go.uber.org/zap"
"google.golang.org/grpc"

"github.com/milvus-io/milvus/client/v2"
"github.com/milvus-io/milvus/client/v2/entity"
client "github.com/milvus-io/milvus/client/v2/milvusclient"
"github.com/milvus-io/milvus/pkg/log"
)

Expand Down
2 changes: 1 addition & 1 deletion tests/go_client/common/response_checker.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import (
"github.com/stretchr/testify/require"
"go.uber.org/zap"

"github.com/milvus-io/milvus/client/v2"
"github.com/milvus-io/milvus/client/v2/column"
"github.com/milvus-io/milvus/client/v2/entity"
"github.com/milvus-io/milvus/client/v2/index"
client "github.com/milvus-io/milvus/client/v2/milvusclient"
"github.com/milvus-io/milvus/pkg/log"
)

Expand Down
2 changes: 1 addition & 1 deletion tests/go_client/testcases/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"testing"
"time"

clientv2 "github.com/milvus-io/milvus/client/v2"
clientv2 "github.com/milvus-io/milvus/client/v2/milvusclient"
"github.com/milvus-io/milvus/tests/go_client/base"
"github.com/milvus-io/milvus/tests/go_client/common"
"github.com/milvus-io/milvus/tests/go_client/testcases/helper"
Expand Down
2 changes: 1 addition & 1 deletion tests/go_client/testcases/collection_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"github.com/stretchr/testify/require"
"go.uber.org/zap"

"github.com/milvus-io/milvus/client/v2"
"github.com/milvus-io/milvus/client/v2/entity"
client "github.com/milvus-io/milvus/client/v2/milvusclient"
"github.com/milvus-io/milvus/pkg/log"
"github.com/milvus-io/milvus/tests/go_client/common"
hp "github.com/milvus-io/milvus/tests/go_client/testcases/helper"
Expand Down
2 changes: 1 addition & 1 deletion tests/go_client/testcases/database_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/stretchr/testify/require"
"go.uber.org/zap"

"github.com/milvus-io/milvus/client/v2"
client "github.com/milvus-io/milvus/client/v2/milvusclient"
"github.com/milvus-io/milvus/pkg/log"
"github.com/milvus-io/milvus/tests/go_client/base"
"github.com/milvus-io/milvus/tests/go_client/common"
Expand Down
2 changes: 1 addition & 1 deletion tests/go_client/testcases/delete_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"github.com/stretchr/testify/require"
"go.uber.org/zap"

"github.com/milvus-io/milvus/client/v2"
"github.com/milvus-io/milvus/client/v2/entity"
client "github.com/milvus-io/milvus/client/v2/milvusclient"
"github.com/milvus-io/milvus/pkg/log"
"github.com/milvus-io/milvus/tests/go_client/common"
hp "github.com/milvus-io/milvus/tests/go_client/testcases/helper"
Expand Down
2 changes: 1 addition & 1 deletion tests/go_client/testcases/helper/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"github.com/stretchr/testify/require"
"go.uber.org/zap"

clientv2 "github.com/milvus-io/milvus/client/v2"
"github.com/milvus-io/milvus/client/v2/entity"
clientv2 "github.com/milvus-io/milvus/client/v2/milvusclient"
"github.com/milvus-io/milvus/pkg/log"
"github.com/milvus-io/milvus/tests/go_client/base"
"github.com/milvus-io/milvus/tests/go_client/common"
Expand Down
2 changes: 1 addition & 1 deletion tests/go_client/testcases/index_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
"github.com/stretchr/testify/require"
"go.uber.org/zap"

"github.com/milvus-io/milvus/client/v2"
"github.com/milvus-io/milvus/client/v2/entity"
"github.com/milvus-io/milvus/client/v2/index"
client "github.com/milvus-io/milvus/client/v2/milvusclient"
"github.com/milvus-io/milvus/pkg/log"
"github.com/milvus-io/milvus/tests/go_client/common"
hp "github.com/milvus-io/milvus/tests/go_client/testcases/helper"
Expand Down
2 changes: 1 addition & 1 deletion tests/go_client/testcases/insert_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import (
"github.com/stretchr/testify/require"
"go.uber.org/zap"

"github.com/milvus-io/milvus/client/v2"
"github.com/milvus-io/milvus/client/v2/column"
"github.com/milvus-io/milvus/client/v2/entity"
"github.com/milvus-io/milvus/client/v2/index"
client "github.com/milvus-io/milvus/client/v2/milvusclient"
"github.com/milvus-io/milvus/pkg/log"
"github.com/milvus-io/milvus/tests/go_client/common"
hp "github.com/milvus-io/milvus/tests/go_client/testcases/helper"
Expand Down
Loading

0 comments on commit 11f4fe0

Please sign in to comment.