-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4f14edd
commit 7aac214
Showing
4 changed files
with
36 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package meilisearch | ||
|
||
import ( | ||
"fmt" | ||
) | ||
|
||
const VERSION = "0.19.0" | ||
|
||
func GetQualifiedVersion() (qualifiedVersion string) { | ||
return getQualifiedVersion(VERSION) | ||
} | ||
|
||
func getQualifiedVersion(version string) (qualifiedVersion string) { | ||
return fmt.Sprintf("Meilisearch (v%s)", version) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package meilisearch | ||
|
||
import ( | ||
"testing" | ||
"fmt" | ||
|
||
"github.com/stretchr/testify/require" | ||
) | ||
|
||
func TestClient_PackageVersion(t *testing.T) { | ||
t.Run("TestPackageVersion", func(t *testing.T) { | ||
version := GetQualifiedVersion() | ||
|
||
require.NotNil(t, version) | ||
require.Equal(t, version, fmt.Sprintf("Meilisearch (v%s)", VERSION)) | ||
}) | ||
} |