diff --git a/test/foundationdb/foundationdb_concurrent_test.go b/test/foundationdb/foundationdb_concurrent_test.go index de49ecc61..5063ba894 100644 --- a/test/foundationdb/foundationdb_concurrent_test.go +++ b/test/foundationdb/foundationdb_concurrent_test.go @@ -1,5 +1,4 @@ //go:build foundationdb -// +build foundationdb package foundationdb diff --git a/test/foundationdb/foundationdb_integration_test.go b/test/foundationdb/foundationdb_integration_test.go index 63ed41ef9..eb60d3707 100644 --- a/test/foundationdb/foundationdb_integration_test.go +++ b/test/foundationdb/foundationdb_integration_test.go @@ -1,5 +1,4 @@ //go:build foundationdb -// +build foundationdb package foundationdb diff --git a/test/s3/sse/s3_volume_encryption_test.go b/test/s3/sse/s3_volume_encryption_test.go index 4a3a5eaa5..cc7849a8d 100644 --- a/test/s3/sse/s3_volume_encryption_test.go +++ b/test/s3/sse/s3_volume_encryption_test.go @@ -1,5 +1,4 @@ //go:build integration -// +build integration package sse diff --git a/unmaintained/disk/disk_status.go b/unmaintained/disk/disk_status.go index e01b16f22..ddf90e89c 100644 --- a/unmaintained/disk/disk_status.go +++ b/unmaintained/disk/disk_status.go @@ -1,5 +1,4 @@ //go:build !windows && !openbsd && !netbsd && !plan9 && !solaris -// +build !windows,!openbsd,!netbsd,!plan9,!solaris package main diff --git a/weed/command/filer_meta_tail_elastic.go b/weed/command/filer_meta_tail_elastic.go index 6e18638dd..308520612 100644 --- a/weed/command/filer_meta_tail_elastic.go +++ b/weed/command/filer_meta_tail_elastic.go @@ -1,5 +1,4 @@ //go:build elastic -// +build elastic package command diff --git a/weed/command/filer_meta_tail_non_elastic.go b/weed/command/filer_meta_tail_non_elastic.go index 989e32bec..7bb6fa2ab 100644 --- a/weed/command/filer_meta_tail_non_elastic.go +++ b/weed/command/filer_meta_tail_non_elastic.go @@ -1,5 +1,4 @@ //go:build !elastic -// +build !elastic package command diff --git a/weed/command/filer_sync_std.go b/weed/command/filer_sync_std.go index 1f9b6fa14..801333751 100644 --- a/weed/command/filer_sync_std.go +++ b/weed/command/filer_sync_std.go @@ -1,5 +1,4 @@ //go:build !windows -// +build !windows package command diff --git a/weed/command/fuse_notsupported.go b/weed/command/fuse_notsupported.go index ce5470791..8437a658a 100644 --- a/weed/command/fuse_notsupported.go +++ b/weed/command/fuse_notsupported.go @@ -1,5 +1,4 @@ //go:build !darwin && !freebsd && !linux -// +build !darwin,!freebsd,!linux package command diff --git a/weed/command/fuse_std.go b/weed/command/fuse_std.go index 60c3402de..8fb52d5d8 100644 --- a/weed/command/fuse_std.go +++ b/weed/command/fuse_std.go @@ -1,5 +1,4 @@ //go:build darwin || freebsd || linux -// +build darwin freebsd linux package command diff --git a/weed/command/mount_notsupported.go b/weed/command/mount_notsupported.go index 1e5c9f53d..da2a90cd8 100644 --- a/weed/command/mount_notsupported.go +++ b/weed/command/mount_notsupported.go @@ -1,5 +1,4 @@ //go:build !linux && !darwin && !freebsd -// +build !linux,!darwin,!freebsd package command diff --git a/weed/command/mount_std.go b/weed/command/mount_std.go index 22e30a6cb..57aca5f5c 100644 --- a/weed/command/mount_std.go +++ b/weed/command/mount_std.go @@ -1,5 +1,4 @@ //go:build linux || darwin || freebsd -// +build linux darwin freebsd package command diff --git a/weed/command/mount_std_test.go b/weed/command/mount_std_test.go index e4b8e7598..e41540b46 100644 --- a/weed/command/mount_std_test.go +++ b/weed/command/mount_std_test.go @@ -1,5 +1,4 @@ //go:build linux || darwin || freebsd -// +build linux darwin freebsd package command diff --git a/weed/command/update_full.go b/weed/command/update_full.go index 95ca5fc00..6f9a324d1 100644 --- a/weed/command/update_full.go +++ b/weed/command/update_full.go @@ -1,5 +1,4 @@ //go:build elastic && gocdk && rclone && sqlite && tarantool && tikv && ydb -// +build elastic,gocdk,rclone,sqlite,tarantool,tikv,ydb package command diff --git a/weed/filer/elastic/v7/elastic_store.go b/weed/filer/elastic/v7/elastic_store.go index 159330dec..db67b405d 100644 --- a/weed/filer/elastic/v7/elastic_store.go +++ b/weed/filer/elastic/v7/elastic_store.go @@ -1,5 +1,4 @@ //go:build elastic -// +build elastic package elastic diff --git a/weed/filer/elastic/v7/elastic_store_kv.go b/weed/filer/elastic/v7/elastic_store_kv.go index 6986ea7ef..f662639ff 100644 --- a/weed/filer/elastic/v7/elastic_store_kv.go +++ b/weed/filer/elastic/v7/elastic_store_kv.go @@ -1,5 +1,4 @@ //go:build elastic -// +build elastic package elastic diff --git a/weed/filer/foundationdb/foundationdb_store.go b/weed/filer/foundationdb/foundationdb_store.go index abbf55091..b413d260f 100644 --- a/weed/filer/foundationdb/foundationdb_store.go +++ b/weed/filer/foundationdb/foundationdb_store.go @@ -1,5 +1,4 @@ //go:build foundationdb -// +build foundationdb // Package foundationdb provides a filer store implementation using FoundationDB as the backend. // diff --git a/weed/filer/foundationdb/foundationdb_store_test.go b/weed/filer/foundationdb/foundationdb_store_test.go index aab8b1f65..72f8b27ad 100644 --- a/weed/filer/foundationdb/foundationdb_store_test.go +++ b/weed/filer/foundationdb/foundationdb_store_test.go @@ -1,5 +1,4 @@ //go:build foundationdb -// +build foundationdb package foundationdb diff --git a/weed/filer/sqlite/sqlite_store.go b/weed/filer/sqlite/sqlite_store.go index 6c9ca4ecc..5f04e6470 100644 --- a/weed/filer/sqlite/sqlite_store.go +++ b/weed/filer/sqlite/sqlite_store.go @@ -1,6 +1,4 @@ //go:build (linux || darwin || windows) && sqlite -// +build linux darwin windows -// +build sqlite // limited GOOS due to modernc.org/libc/unistd diff --git a/weed/filer/sqlite/sqlite_store_unsupported.go b/weed/filer/sqlite/sqlite_store_unsupported.go index 351d2e501..377267d61 100644 --- a/weed/filer/sqlite/sqlite_store_unsupported.go +++ b/weed/filer/sqlite/sqlite_store_unsupported.go @@ -1,5 +1,4 @@ //go:build !linux && !darwin && !windows && !s390 && !ppc64le && !mips64 && !sqlite -// +build !linux,!darwin,!windows,!s390,!ppc64le,!mips64,!sqlite // limited GOOS due to modernc.org/libc/unistd diff --git a/weed/filer/tarantool/tarantool_store.go b/weed/filer/tarantool/tarantool_store.go index 1bcd31830..beba41ed4 100644 --- a/weed/filer/tarantool/tarantool_store.go +++ b/weed/filer/tarantool/tarantool_store.go @@ -1,5 +1,4 @@ //go:build tarantool -// +build tarantool package tarantool diff --git a/weed/filer/tarantool/tarantool_store_kv.go b/weed/filer/tarantool/tarantool_store_kv.go index e45ff778c..0b4811c90 100644 --- a/weed/filer/tarantool/tarantool_store_kv.go +++ b/weed/filer/tarantool/tarantool_store_kv.go @@ -1,5 +1,4 @@ //go:build tarantool -// +build tarantool package tarantool diff --git a/weed/filer/tarantool/tarantool_store_test.go b/weed/filer/tarantool/tarantool_store_test.go index 500289773..3fb6f7ebd 100644 --- a/weed/filer/tarantool/tarantool_store_test.go +++ b/weed/filer/tarantool/tarantool_store_test.go @@ -1,5 +1,4 @@ //go:build tarantool -// +build tarantool package tarantool diff --git a/weed/filer/tikv/tikv_store.go b/weed/filer/tikv/tikv_store.go index 72f9461bf..d6ba8f284 100644 --- a/weed/filer/tikv/tikv_store.go +++ b/weed/filer/tikv/tikv_store.go @@ -1,5 +1,4 @@ //go:build tikv -// +build tikv package tikv diff --git a/weed/filer/tikv/tikv_store_kv.go b/weed/filer/tikv/tikv_store_kv.go index 1f32dfb96..e6bba72fe 100644 --- a/weed/filer/tikv/tikv_store_kv.go +++ b/weed/filer/tikv/tikv_store_kv.go @@ -1,5 +1,4 @@ //go:build tikv -// +build tikv package tikv diff --git a/weed/filer/ydb/ydb_queries.go b/weed/filer/ydb/ydb_queries.go index baafc59a1..1118cceb6 100644 --- a/weed/filer/ydb/ydb_queries.go +++ b/weed/filer/ydb/ydb_queries.go @@ -1,5 +1,4 @@ //go:build ydb -// +build ydb package ydb diff --git a/weed/filer/ydb/ydb_store.go b/weed/filer/ydb/ydb_store.go index ee94d13e1..66a38cc0f 100644 --- a/weed/filer/ydb/ydb_store.go +++ b/weed/filer/ydb/ydb_store.go @@ -1,5 +1,4 @@ //go:build ydb -// +build ydb package ydb diff --git a/weed/filer/ydb/ydb_store_kv.go b/weed/filer/ydb/ydb_store_kv.go index decec14ea..581dd4acf 100644 --- a/weed/filer/ydb/ydb_store_kv.go +++ b/weed/filer/ydb/ydb_store_kv.go @@ -1,5 +1,4 @@ //go:build ydb -// +build ydb package ydb diff --git a/weed/filer/ydb/ydb_store_test.go b/weed/filer/ydb/ydb_store_test.go index 14ff769e9..c53c7515c 100644 --- a/weed/filer/ydb/ydb_store_test.go +++ b/weed/filer/ydb/ydb_store_test.go @@ -1,5 +1,4 @@ //go:build ydb -// +build ydb package ydb diff --git a/weed/filer/ydb/ydb_types.go b/weed/filer/ydb/ydb_types.go index af6ceec05..9eb42705b 100644 --- a/weed/filer/ydb/ydb_types.go +++ b/weed/filer/ydb/ydb_types.go @@ -1,5 +1,4 @@ //go:build ydb -// +build ydb package ydb diff --git a/weed/iam/oidc/mock_provider_test.go b/weed/iam/oidc/mock_provider_test.go index 920b2b3be..b6baf0042 100644 --- a/weed/iam/oidc/mock_provider_test.go +++ b/weed/iam/oidc/mock_provider_test.go @@ -1,5 +1,4 @@ //go:build test -// +build test package oidc diff --git a/weed/mount/unmount/unmount_std.go b/weed/mount/unmount/unmount_std.go index 410eb1235..fcb09f3ed 100644 --- a/weed/mount/unmount/unmount_std.go +++ b/weed/mount/unmount/unmount_std.go @@ -1,5 +1,4 @@ //go:build !linux && !windows -// +build !linux,!windows package unmount diff --git a/weed/mount/unmount/unmount_unsupported.go b/weed/mount/unmount/unmount_unsupported.go index d0a94cc4a..d8d00b776 100644 --- a/weed/mount/unmount/unmount_unsupported.go +++ b/weed/mount/unmount/unmount_unsupported.go @@ -1,5 +1,4 @@ //go:build windows -// +build windows package unmount diff --git a/weed/mount/weedfs_xattr.go b/weed/mount/weedfs_xattr.go index ade1d3d84..6a4b9f8ba 100644 --- a/weed/mount/weedfs_xattr.go +++ b/weed/mount/weedfs_xattr.go @@ -1,5 +1,4 @@ //go:build !freebsd -// +build !freebsd package mount diff --git a/weed/notification/gocdk_pub_sub/gocdk_pub_sub.go b/weed/notification/gocdk_pub_sub/gocdk_pub_sub.go index 1e7537918..fa6d854db 100644 --- a/weed/notification/gocdk_pub_sub/gocdk_pub_sub.go +++ b/weed/notification/gocdk_pub_sub/gocdk_pub_sub.go @@ -1,5 +1,4 @@ //go:build gocdk -// +build gocdk // Package gocdk_pub_sub supports the Go CDK (Cloud Development Kit) PubSub API, // which in turn supports many providers, including Amazon SNS/SQS, Azure Service Bus, diff --git a/weed/replication/sub/notification_gocdk_pub_sub.go b/weed/replication/sub/notification_gocdk_pub_sub.go index 0632c6bf0..26e223452 100644 --- a/weed/replication/sub/notification_gocdk_pub_sub.go +++ b/weed/replication/sub/notification_gocdk_pub_sub.go @@ -1,5 +1,4 @@ //go:build gocdk -// +build gocdk package sub diff --git a/weed/s3api/policy_engine/examples.go b/weed/s3api/policy_engine/examples.go index c4cea6512..14cd51268 100644 --- a/weed/s3api/policy_engine/examples.go +++ b/weed/s3api/policy_engine/examples.go @@ -1,5 +1,4 @@ //go:build ignore -// +build ignore package policy_engine diff --git a/weed/server/filer_server_rocksdb.go b/weed/server/filer_server_rocksdb.go index 57b1d08f8..9a03e35e0 100644 --- a/weed/server/filer_server_rocksdb.go +++ b/weed/server/filer_server_rocksdb.go @@ -1,5 +1,4 @@ //go:build rocksdb -// +build rocksdb package weed_server diff --git a/weed/server/volume_grpc_client_to_master.go b/weed/server/volume_grpc_client_to_master.go index a4349771b..e2523543a 100644 --- a/weed/server/volume_grpc_client_to_master.go +++ b/weed/server/volume_grpc_client_to_master.go @@ -15,7 +15,7 @@ import ( "github.com/seaweedfs/seaweedfs/weed/storage/backend" "github.com/seaweedfs/seaweedfs/weed/storage/erasure_coding" - "golang.org/x/net/context" + "context" "github.com/seaweedfs/seaweedfs/weed/glog" "github.com/seaweedfs/seaweedfs/weed/pb/master_pb" diff --git a/weed/stats/disk_notsupported.go b/weed/stats/disk_notsupported.go index 956c7bf9f..8dbe14c37 100644 --- a/weed/stats/disk_notsupported.go +++ b/weed/stats/disk_notsupported.go @@ -1,5 +1,4 @@ //go:build netbsd || plan9 -// +build netbsd plan9 package stats diff --git a/weed/stats/disk_openbsd.go b/weed/stats/disk_openbsd.go index 1be41e5c7..a8511de44 100644 --- a/weed/stats/disk_openbsd.go +++ b/weed/stats/disk_openbsd.go @@ -1,5 +1,4 @@ //go:build openbsd -// +build openbsd package stats diff --git a/weed/stats/disk_solaris.go b/weed/stats/disk_solaris.go index cce20e4cc..dccf87d74 100644 --- a/weed/stats/disk_solaris.go +++ b/weed/stats/disk_solaris.go @@ -1,5 +1,4 @@ //go:build solaris -// +build solaris package stats diff --git a/weed/stats/disk_supported.go b/weed/stats/disk_supported.go index aad065e26..807f62bce 100644 --- a/weed/stats/disk_supported.go +++ b/weed/stats/disk_supported.go @@ -1,5 +1,4 @@ //go:build !windows && !openbsd && !netbsd && !plan9 && !solaris -// +build !windows,!openbsd,!netbsd,!plan9,!solaris package stats diff --git a/weed/stats/memory_notsupported.go b/weed/stats/memory_notsupported.go index f795aec9c..49bde254e 100644 --- a/weed/stats/memory_notsupported.go +++ b/weed/stats/memory_notsupported.go @@ -1,5 +1,4 @@ //go:build !linux -// +build !linux package stats diff --git a/weed/stats/memory_supported.go b/weed/stats/memory_supported.go index f7a577813..3b94d9bc0 100644 --- a/weed/stats/memory_supported.go +++ b/weed/stats/memory_supported.go @@ -1,5 +1,4 @@ //go:build linux -// +build linux package stats diff --git a/weed/storage/backend/memory_map/memory_map_other.go b/weed/storage/backend/memory_map/memory_map_other.go index 63c168f6a..2b49c5d8a 100644 --- a/weed/storage/backend/memory_map/memory_map_other.go +++ b/weed/storage/backend/memory_map/memory_map_other.go @@ -1,5 +1,4 @@ //go:build !windows -// +build !windows package memory_map diff --git a/weed/storage/backend/memory_map/memory_map_windows.go b/weed/storage/backend/memory_map/memory_map_windows.go index b120c8dd7..4392dbcc9 100644 --- a/weed/storage/backend/memory_map/memory_map_windows.go +++ b/weed/storage/backend/memory_map/memory_map_windows.go @@ -1,5 +1,4 @@ //go:build windows -// +build windows package memory_map diff --git a/weed/storage/backend/rclone_backend/rclone_backend.go b/weed/storage/backend/rclone_backend/rclone_backend.go index c954c0b73..db0b5d0d3 100644 --- a/weed/storage/backend/rclone_backend/rclone_backend.go +++ b/weed/storage/backend/rclone_backend/rclone_backend.go @@ -1,5 +1,4 @@ //go:build rclone -// +build rclone package rclone_backend diff --git a/weed/storage/backend/rclone_backend/rclone_progress.go b/weed/storage/backend/rclone_backend/rclone_progress.go index 738f33d82..aa1a6bedd 100644 --- a/weed/storage/backend/rclone_backend/rclone_progress.go +++ b/weed/storage/backend/rclone_backend/rclone_progress.go @@ -1,5 +1,4 @@ //go:build rclone -// +build rclone package rclone_backend diff --git a/weed/storage/backend/volume_create.go b/weed/storage/backend/volume_create.go index def376822..4f26f8694 100644 --- a/weed/storage/backend/volume_create.go +++ b/weed/storage/backend/volume_create.go @@ -1,5 +1,4 @@ //go:build !linux && !windows -// +build !linux,!windows package backend diff --git a/weed/storage/backend/volume_create_linux.go b/weed/storage/backend/volume_create_linux.go index 2e52cce1b..ab3481fd6 100644 --- a/weed/storage/backend/volume_create_linux.go +++ b/weed/storage/backend/volume_create_linux.go @@ -1,5 +1,4 @@ //go:build linux -// +build linux package backend diff --git a/weed/storage/backend/volume_create_windows.go b/weed/storage/backend/volume_create_windows.go index b2e0ea92b..d6eddc81a 100644 --- a/weed/storage/backend/volume_create_windows.go +++ b/weed/storage/backend/volume_create_windows.go @@ -1,5 +1,4 @@ //go:build windows -// +build windows package backend diff --git a/weed/storage/needle_map/compact_map_cases_test.go b/weed/storage/needle_map/compact_map_cases_test.go index 15a6a7b83..1fe393f3f 100644 --- a/weed/storage/needle_map/compact_map_cases_test.go +++ b/weed/storage/needle_map/compact_map_cases_test.go @@ -1,5 +1,4 @@ //go:build 5BytesOffset -// +build 5BytesOffset package needle_map diff --git a/weed/storage/types/offset_4bytes.go b/weed/storage/types/offset_4bytes.go index 5835b24d7..54ed9e00c 100644 --- a/weed/storage/types/offset_4bytes.go +++ b/weed/storage/types/offset_4bytes.go @@ -1,5 +1,4 @@ //go:build !5BytesOffset -// +build !5BytesOffset package types diff --git a/weed/storage/types/offset_5bytes.go b/weed/storage/types/offset_5bytes.go index 4b16bd822..0feb24ab5 100644 --- a/weed/storage/types/offset_5bytes.go +++ b/weed/storage/types/offset_5bytes.go @@ -1,5 +1,4 @@ //go:build 5BytesOffset -// +build 5BytesOffset package types diff --git a/weed/util/constants_4bytes.go b/weed/util/constants_4bytes.go index 4cf07165e..aa8dde639 100644 --- a/weed/util/constants_4bytes.go +++ b/weed/util/constants_4bytes.go @@ -1,5 +1,4 @@ //go:build !5BytesOffset -// +build !5BytesOffset package util diff --git a/weed/util/constants_5bytes.go b/weed/util/constants_5bytes.go index 406287440..2ed9009c3 100644 --- a/weed/util/constants_5bytes.go +++ b/weed/util/constants_5bytes.go @@ -1,5 +1,4 @@ //go:build 5BytesOffset -// +build 5BytesOffset package util diff --git a/weed/util/constants_lifecycle_interval_10sec.go b/weed/util/constants_lifecycle_interval_10sec.go index 60f19c316..449b5119f 100644 --- a/weed/util/constants_lifecycle_interval_10sec.go +++ b/weed/util/constants_lifecycle_interval_10sec.go @@ -1,5 +1,4 @@ //go:build s3tests -// +build s3tests package util diff --git a/weed/util/constants_lifecycle_interval_day.go b/weed/util/constants_lifecycle_interval_day.go index e2465ad5f..e3d5c817e 100644 --- a/weed/util/constants_lifecycle_interval_day.go +++ b/weed/util/constants_lifecycle_interval_day.go @@ -1,5 +1,4 @@ //go:build !s3tests -// +build !s3tests package util diff --git a/weed/util/file_util_non_posix.go b/weed/util/file_util_non_posix.go index 29aecffa6..83e54d534 100644 --- a/weed/util/file_util_non_posix.go +++ b/weed/util/file_util_non_posix.go @@ -1,5 +1,4 @@ //go:build linux || darwin || freebsd || netbsd || openbsd || plan9 || solaris || zos -// +build linux darwin freebsd netbsd openbsd plan9 solaris zos package util diff --git a/weed/util/file_util_posix.go b/weed/util/file_util_posix.go index 0bec8abad..4d593e120 100644 --- a/weed/util/file_util_posix.go +++ b/weed/util/file_util_posix.go @@ -1,5 +1,4 @@ //go:build windows -// +build windows package util diff --git a/weed/util/grace/signal_handling.go b/weed/util/grace/signal_handling.go index a661f939c..bb2b1f3db 100644 --- a/weed/util/grace/signal_handling.go +++ b/weed/util/grace/signal_handling.go @@ -1,5 +1,4 @@ //go:build !plan9 -// +build !plan9 package grace diff --git a/weed/util/grace/signal_handling_notsupported.go b/weed/util/grace/signal_handling_notsupported.go index de898159a..7e57c1350 100644 --- a/weed/util/grace/signal_handling_notsupported.go +++ b/weed/util/grace/signal_handling_notsupported.go @@ -1,5 +1,4 @@ //go:build plan9 -// +build plan9 package grace