mirror of
https://github.com/minio/minio.git
synced 2025-11-10 14:09:48 -05:00
Introduce staticcheck for stricter builds (#7035)
This commit is contained in:
committed by
Nitish Tiwari
parent
4ba77a916d
commit
df35d7db9d
@@ -22,8 +22,7 @@ import (
|
||||
|
||||
// Simply make sure creating a new tree works.
|
||||
func TestNewTrie(t *testing.T) {
|
||||
var trie *Trie
|
||||
trie = NewTrie()
|
||||
trie := NewTrie()
|
||||
|
||||
if trie.size != 0 {
|
||||
t.Errorf("expected size 0, got: %d", trie.size)
|
||||
@@ -32,8 +31,7 @@ func TestNewTrie(t *testing.T) {
|
||||
|
||||
// Ensure that we can insert new keys into the tree, then check the size.
|
||||
func TestInsert(t *testing.T) {
|
||||
var trie *Trie
|
||||
trie = NewTrie()
|
||||
trie := NewTrie()
|
||||
|
||||
// We need to have an empty tree to begin with.
|
||||
if trie.size != 0 {
|
||||
@@ -51,8 +49,7 @@ func TestInsert(t *testing.T) {
|
||||
|
||||
// Ensure that PrefixMatch gives us the correct two keys in the tree.
|
||||
func TestPrefixMatch(t *testing.T) {
|
||||
var trie *Trie
|
||||
trie = NewTrie()
|
||||
trie := NewTrie()
|
||||
|
||||
// Feed it some fodder: only 'minio' and 'miny-os' should trip the matcher.
|
||||
trie.Insert("minio")
|
||||
|
||||
Reference in New Issue
Block a user