From 5e28e2f9c95ce42e538742297b6f3435f4be501b Mon Sep 17 00:00:00 2001 From: Adarsh A Date: Sun, 1 Oct 2023 16:16:51 +0530 Subject: [PATCH] refactor. package structure --- CONTRIBUTING.md | 6 +++--- go.mod | 2 +- {collections/list => list}/list.go | 2 +- {collections/list => list}/list_test.go | 4 ++-- {collections/math => math}/basic_functions.go | 4 ++-- {collections/math => math}/basic_functions_test.go | 4 ++-- collections/types.go => types.go | 0 7 files changed, 11 insertions(+), 11 deletions(-) rename {collections/list => list}/list.go (98%) rename {collections/list => list}/list_test.go (98%) rename {collections/math => math}/basic_functions.go (94%) rename {collections/math => math}/basic_functions_test.go (94%) rename collections/types.go => types.go (100%) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2f90ec5..34fbf6c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -18,7 +18,7 @@ All types of contributions are encouraged and valued. See the [Table of Contents ## I Have a Question -> If you want to ask a question, we assume that you have read the available [Documentation](https://pkg.go.dev/github.com/gopinathr143/golang-linq). +> If you want to ask a question, we assume that you have read the available [Documentation](https://pkg.go.dev/github.com/gopinathr143/go-collections). Before you ask a question, it is best to search for existing [Issues](/issues) that might help you. In case you have found a suitable issue and still need clarification, you can write your question in this issue. It is also advisable to search the internet for answers first. @@ -71,7 +71,7 @@ This section guides you through submitting an enhancement suggestion, **includin #### Before Submitting an Enhancement - Make sure that you are using the latest version. -- Read the [documentation](https://pkg.go.dev/github.com/gopinathr143/golang-linq) carefully and find out if the functionality is already covered. +- Read the [documentation](https://pkg.go.dev/github.com/gopinathr143/go-collections) carefully and find out if the functionality is already covered. - Perform a [search](/issues) to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one. - Find out whether your idea fits with the scope and aims of the project. It's up to you to make a strong case to convince the project's developers of the merits of this feature. Keep in mind that we want features that will be useful to the majority of our users and not just a small subset. If you're just targeting a minority of users, consider writing an add-on/plugin library. @@ -112,7 +112,7 @@ golangci-lint run ### Improving The Documentation -We use godoc to generate and host our documentation(https://pkg.go.dev/github.com/gopinathr143/golang-linq). If you find issues with existing documentation or have suggestions for enhancements, please create an issue/PR with necessary changes. +We use godoc to generate and host our documentation(https://pkg.go.dev/github.com/gopinathr143/go-collections). If you find issues with existing documentation or have suggestions for enhancements, please create an issue/PR with necessary changes. ## Styleguides diff --git a/go.mod b/go.mod index a1bef25..ff2eda6 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/gopinathr143/golang-linq +module github.com/gopinathr143/go-collections go 1.20 diff --git a/collections/list/list.go b/list/list.go similarity index 98% rename from collections/list/list.go rename to list/list.go index bdceb75..c00ef1c 100644 --- a/collections/list/list.go +++ b/list/list.go @@ -5,7 +5,7 @@ import ( "fmt" "strings" - "github.com/gopinathr143/golang-linq/collections" + "github.com/gopinathr143/go-collections" ) var ( diff --git a/collections/list/list_test.go b/list/list_test.go similarity index 98% rename from collections/list/list_test.go rename to list/list_test.go index e6fe8bb..ed3229c 100644 --- a/collections/list/list_test.go +++ b/list/list_test.go @@ -3,8 +3,8 @@ package list_test import ( "testing" - "github.com/gopinathr143/golang-linq/collections" - "github.com/gopinathr143/golang-linq/collections/list" + "github.com/gopinathr143/go-collections" + "github.com/gopinathr143/go-collections/list" "github.com/stretchr/testify/assert" ) diff --git a/collections/math/basic_functions.go b/math/basic_functions.go similarity index 94% rename from collections/math/basic_functions.go rename to math/basic_functions.go index baa8edb..8afe812 100644 --- a/collections/math/basic_functions.go +++ b/math/basic_functions.go @@ -1,8 +1,8 @@ package math import ( - "github.com/gopinathr143/golang-linq/collections" - "github.com/gopinathr143/golang-linq/collections/list" + "github.com/gopinathr143/go-collections" + "github.com/gopinathr143/go-collections/list" ) // Returns the average of all elements present in the given collection. diff --git a/collections/math/basic_functions_test.go b/math/basic_functions_test.go similarity index 94% rename from collections/math/basic_functions_test.go rename to math/basic_functions_test.go index 4606bf7..85c4e64 100644 --- a/collections/math/basic_functions_test.go +++ b/math/basic_functions_test.go @@ -3,8 +3,8 @@ package math_test import ( "testing" - "github.com/gopinathr143/golang-linq/collections/list" - "github.com/gopinathr143/golang-linq/collections/math" + "github.com/gopinathr143/go-collections/list" + "github.com/gopinathr143/go-collections/math" "github.com/stretchr/testify/assert" ) diff --git a/collections/types.go b/types.go similarity index 100% rename from collections/types.go rename to types.go