From e5086bcc4603fe88f154212cf14ae75fa071f837 Mon Sep 17 00:00:00 2001 From: houseme Date: Thu, 5 Dec 2024 16:42:03 +0800 Subject: [PATCH] Optimized some import statements in the code. --- container/gmap/gmap_hash_any_any_map.go | 3 ++- container/gmap/gmap_hash_int_any_map.go | 3 ++- container/gtree/gtree_redblacktree.go | 1 + os/gcache/gcache_adapter_memory_lru.go | 3 ++- os/gcache/gcache_cache.go | 1 + os/gfsnotify/gfsnotify_watcher_loop.go | 4 ++-- 6 files changed, 10 insertions(+), 5 deletions(-) diff --git a/container/gmap/gmap_hash_any_any_map.go b/container/gmap/gmap_hash_any_any_map.go index 5ff0fad7acf..1cf02d139e0 100644 --- a/container/gmap/gmap_hash_any_any_map.go +++ b/container/gmap/gmap_hash_any_any_map.go @@ -7,13 +7,14 @@ package gmap import ( + "reflect" + "github.com/gogf/gf/v2/container/gvar" "github.com/gogf/gf/v2/internal/deepcopy" "github.com/gogf/gf/v2/internal/empty" "github.com/gogf/gf/v2/internal/json" "github.com/gogf/gf/v2/internal/rwmutex" "github.com/gogf/gf/v2/util/gconv" - "reflect" ) // AnyAnyMap wraps map type `map[interface{}]interface{}` and provides more map features. diff --git a/container/gmap/gmap_hash_int_any_map.go b/container/gmap/gmap_hash_int_any_map.go index 016fb6c97db..b2d43eca7b4 100644 --- a/container/gmap/gmap_hash_int_any_map.go +++ b/container/gmap/gmap_hash_int_any_map.go @@ -8,13 +8,14 @@ package gmap import ( + "reflect" + "github.com/gogf/gf/v2/container/gvar" "github.com/gogf/gf/v2/internal/deepcopy" "github.com/gogf/gf/v2/internal/empty" "github.com/gogf/gf/v2/internal/json" "github.com/gogf/gf/v2/internal/rwmutex" "github.com/gogf/gf/v2/util/gconv" - "reflect" ) // IntAnyMap implements map[int]interface{} with RWMutex that has switch. diff --git a/container/gtree/gtree_redblacktree.go b/container/gtree/gtree_redblacktree.go index c5a6bddf826..a94dc585e9d 100644 --- a/container/gtree/gtree_redblacktree.go +++ b/container/gtree/gtree_redblacktree.go @@ -10,6 +10,7 @@ import ( "fmt" "github.com/emirpasic/gods/trees/redblacktree" + "github.com/gogf/gf/v2/container/gvar" "github.com/gogf/gf/v2/internal/json" "github.com/gogf/gf/v2/internal/rwmutex" diff --git a/os/gcache/gcache_adapter_memory_lru.go b/os/gcache/gcache_adapter_memory_lru.go index 318bb2171f3..cf7f71c438d 100644 --- a/os/gcache/gcache_adapter_memory_lru.go +++ b/os/gcache/gcache_adapter_memory_lru.go @@ -7,9 +7,10 @@ package gcache import ( + "sync" + "github.com/gogf/gf/v2/container/glist" "github.com/gogf/gf/v2/container/gmap" - "sync" ) // memoryLru holds LRU info. diff --git a/os/gcache/gcache_cache.go b/os/gcache/gcache_cache.go index 7cae6c7c8c5..939227731e1 100644 --- a/os/gcache/gcache_cache.go +++ b/os/gcache/gcache_cache.go @@ -8,6 +8,7 @@ package gcache import ( "context" + "github.com/gogf/gf/v2/util/gconv" ) diff --git a/os/gfsnotify/gfsnotify_watcher_loop.go b/os/gfsnotify/gfsnotify_watcher_loop.go index dca551fdf6a..dc12d576389 100644 --- a/os/gfsnotify/gfsnotify_watcher_loop.go +++ b/os/gfsnotify/gfsnotify_watcher_loop.go @@ -8,10 +8,10 @@ package gfsnotify import ( "context" - "github.com/gogf/gf/v2/errors/gcode" - "github.com/gogf/gf/v2/errors/gerror" "github.com/gogf/gf/v2/container/glist" + "github.com/gogf/gf/v2/errors/gcode" + "github.com/gogf/gf/v2/errors/gerror" "github.com/gogf/gf/v2/internal/intlog" )