From d12ea26dfbf7d24cb6066cc5c26a1f338e52bbb9 Mon Sep 17 00:00:00 2001 From: Arseny Balobanov Date: Tue, 15 Mar 2022 23:19:41 +0300 Subject: [PATCH 1/4] [lectures/07-sql] Some import fixes. --- lectures/07-sql/hasql/open.go | 5 ++++- lectures/07-sql/redis/redis.go | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lectures/07-sql/hasql/open.go b/lectures/07-sql/hasql/open.go index bfc1427..bdc1e51 100644 --- a/lectures/07-sql/hasql/open.go +++ b/lectures/07-sql/hasql/open.go @@ -1,7 +1,10 @@ package hasql import ( + "context" + "database/sql" "log" + "time" _ "github.com/jackc/pgx/v4/stdlib" "golang.yandex/hasql" @@ -24,7 +27,7 @@ func Open() { log.Fatal(err) } - log.Println("Node address", node.Addr) + log.Println("Node address", node.Addr()) ctx, cancel := context.WithTimeout(context.Background(), time.Second) defer cancel() diff --git a/lectures/07-sql/redis/redis.go b/lectures/07-sql/redis/redis.go index fb42014..28d956c 100644 --- a/lectures/07-sql/redis/redis.go +++ b/lectures/07-sql/redis/redis.go @@ -1,6 +1,7 @@ package redis import ( + "context" "log" "time" From da478565fbb4b8a3d365afd47cf5740c9c114478 Mon Sep 17 00:00:00 2001 From: Arseny Balobanov Date: Tue, 15 Mar 2022 23:20:31 +0300 Subject: [PATCH 2/4] Upgrade to 1.18. --- README.md | 2 +- build.docker | 2 +- go.mod | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8e1c420..c91f208 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Курс по Го в ШАД -Для работы с кодом нужен go 1.17 или выше. +Для работы с кодом нужен go 1.18 или выше. ```sh git clone https://gitlab.com/slon/shad-go.git diff --git a/build.docker b/build.docker index 1bd7e70..24a4cf5 100644 --- a/build.docker +++ b/build.docker @@ -1,4 +1,4 @@ -FROM golang:1.17 +FROM golang:1.18 RUN apt-get update && apt-get install -y \ rsync libssl-dev \ diff --git a/go.mod b/go.mod index aa5c5f7..15928df 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module gitlab.com/slon/shad-go -go 1.17 +go 1.18 require ( github.com/ClickHouse/clickhouse-go v1.4.0 From 28564b4257b18c2df8fb54843c84844898b8749e Mon Sep 17 00:00:00 2001 From: Arseny Balobanov Date: Tue, 15 Mar 2022 23:49:56 +0300 Subject: [PATCH 3/4] go fix old build tags. --- allocs/allocs.go | 1 - allocs/baseline.go | 1 - batcher/batcher.go | 1 - batcher/batcher_race_test.go | 1 - batcher/slow/value.go | 1 - blowfish/blowfish.go | 1 - ciletters/letter.go | 1 - ciletters/notification.go | 1 - cond/cond.go | 1 - coverme/app/app.go | 1 - coverme/app/coverage_test.go | 1 - coverme/client/client.go | 1 - coverme/main.go | 1 - coverme/models/storage.go | 1 - coverme/models/todo.go | 1 - coverme/utils/httputils.go | 1 - digitalclock/main.go | 1 - digitalclock/symbols.go | 1 - distbuild/pkg/api/build_client.go | 1 - distbuild/pkg/api/build_handler.go | 1 - distbuild/pkg/api/heartbeat_client.go | 1 - distbuild/pkg/api/heartbeat_handler.go | 1 - distbuild/pkg/artifact/cache.go | 1 - distbuild/pkg/artifact/client.go | 1 - distbuild/pkg/artifact/handler.go | 1 - distbuild/pkg/client/build.go | 1 - distbuild/pkg/dist/coordinator.go | 1 - distbuild/pkg/filecache/client.go | 1 - distbuild/pkg/filecache/filecache.go | 1 - distbuild/pkg/filecache/handler.go | 1 - distbuild/pkg/scheduler/scheduler.go | 1 - distbuild/pkg/tarstream/stream.go | 1 - distbuild/pkg/worker/worker.go | 1 - dupcall/dupcall.go | 1 - externalsort/io.go | 1 - externalsort/sort.go | 1 - fetchall/main.go | 1 - fetchall/main_test.go | 1 - fileleak/fileleak.go | 1 - firewall/cmd/firewall/main.go | 1 - firewall/cmd/service/main.go | 1 - forth/eval.go | 1 - forth/main.go | 1 - gitfame/cmd/gitfame/main.go | 1 - hogwarts/courselist.go | 1 - hotelbusiness/hotels.go | 1 - illegal/field.go | 1 - illegal/internal/struct.go | 1 - illegal/string.go | 1 - jsonlist/jsonlist.go | 1 - jsonrpc/jsonrpc.go | 1 - keylock/keylock.go | 1 - lrucache/cache.go | 1 - lrucache/lru.go | 1 - olympics/main.go | 1 - once/once.go | 1 - otp/cipher.go | 1 - pubsub/my_pubsub.go | 1 - pubsub/pubsub.go | 1 - ratelimit/ratelimit.go | 1 - retryupdate/kvapi/api.go | 1 - retryupdate/kvapi/errors.go | 1 - retryupdate/update.go | 1 - reversemap/reversemap.go | 1 - rwmutex/rwmutex.go | 1 - speller/speller.go | 1 - structtags/structtags.go | 1 - sum/sum.go | 1 - tabletest/coverage_test.go | 1 - tabletest/parse_duration.go | 1 - testequal/assertions.go | 1 - testequal/t.go | 1 - testifycheck/testifycheck.go | 1 - tools/testtool/buildtags.go | 1 - tparallel/tparallel.go | 1 - urlfetch/main.go | 1 - urlfetch/main_test.go | 1 - urlshortener/main.go | 1 - utf8/reverse/reverse.go | 1 - utf8/spacecollapse/collapse.go | 1 - varfmt/fmt.go | 1 - varjoin/join.go | 1 - waitgroup/waitgroup.go | 1 - wordcount/main.go | 1 - wordcount/main_test.go | 1 - wscat/main.go | 1 - 86 files changed, 86 deletions(-) diff --git a/allocs/allocs.go b/allocs/allocs.go index 86fa416..40aa5ed 100644 --- a/allocs/allocs.go +++ b/allocs/allocs.go @@ -1,5 +1,4 @@ //go:build !solution -// +build !solution package allocs diff --git a/allocs/baseline.go b/allocs/baseline.go index 402aef7..9519382 100644 --- a/allocs/baseline.go +++ b/allocs/baseline.go @@ -1,5 +1,4 @@ //go:build !solution && !change -// +build !solution,!change package allocs diff --git a/batcher/batcher.go b/batcher/batcher.go index 7cc4901..84440cb 100644 --- a/batcher/batcher.go +++ b/batcher/batcher.go @@ -1,5 +1,4 @@ //go:build !solution -// +build !solution package batcher diff --git a/batcher/batcher_race_test.go b/batcher/batcher_race_test.go index 0f361a6..1ac9f40 100644 --- a/batcher/batcher_race_test.go +++ b/batcher/batcher_race_test.go @@ -1,5 +1,4 @@ //go:build race -// +build race package batcher diff --git a/batcher/slow/value.go b/batcher/slow/value.go index 00f7f48..e2e1041 100644 --- a/batcher/slow/value.go +++ b/batcher/slow/value.go @@ -1,5 +1,4 @@ //go:build !change -// +build !change package slow diff --git a/blowfish/blowfish.go b/blowfish/blowfish.go index 28a055f..12b0890 100644 --- a/blowfish/blowfish.go +++ b/blowfish/blowfish.go @@ -1,5 +1,4 @@ //go:build !solution -// +build !solution package blowfish diff --git a/ciletters/letter.go b/ciletters/letter.go index c5246ad..4130454 100644 --- a/ciletters/letter.go +++ b/ciletters/letter.go @@ -1,5 +1,4 @@ //go:build !solution -// +build !solution package ciletters diff --git a/ciletters/notification.go b/ciletters/notification.go index 61978e4..4c7d09f 100644 --- a/ciletters/notification.go +++ b/ciletters/notification.go @@ -1,5 +1,4 @@ //go:build !change -// +build !change package ciletters diff --git a/cond/cond.go b/cond/cond.go index 4d74c93..68adbc8 100644 --- a/cond/cond.go +++ b/cond/cond.go @@ -1,5 +1,4 @@ //go:build !solution -// +build !solution package cond diff --git a/coverme/app/app.go b/coverme/app/app.go index c9387cd..483f638 100644 --- a/coverme/app/app.go +++ b/coverme/app/app.go @@ -1,5 +1,4 @@ //go:build !change -// +build !change package app diff --git a/coverme/app/coverage_test.go b/coverme/app/coverage_test.go index 66b10f5..7f957c9 100644 --- a/coverme/app/coverage_test.go +++ b/coverme/app/coverage_test.go @@ -1,5 +1,4 @@ //go:build !change -// +build !change package app diff --git a/coverme/client/client.go b/coverme/client/client.go index cac5a08..793d9c8 100644 --- a/coverme/client/client.go +++ b/coverme/client/client.go @@ -1,5 +1,4 @@ //go:build !change -// +build !change package client diff --git a/coverme/main.go b/coverme/main.go index 2c97450..25262af 100644 --- a/coverme/main.go +++ b/coverme/main.go @@ -1,5 +1,4 @@ //go:build !change -// +build !change package main diff --git a/coverme/models/storage.go b/coverme/models/storage.go index 07185ee..55df0c5 100644 --- a/coverme/models/storage.go +++ b/coverme/models/storage.go @@ -1,5 +1,4 @@ //go:build !change -// +build !change package models diff --git a/coverme/models/todo.go b/coverme/models/todo.go index 80ce420..3e3ba52 100644 --- a/coverme/models/todo.go +++ b/coverme/models/todo.go @@ -1,5 +1,4 @@ //go:build !change -// +build !change package models diff --git a/coverme/utils/httputils.go b/coverme/utils/httputils.go index f052723..7cea454 100644 --- a/coverme/utils/httputils.go +++ b/coverme/utils/httputils.go @@ -1,5 +1,4 @@ //go:build !change -// +build !change package utils diff --git a/digitalclock/main.go b/digitalclock/main.go index 375bf63..2a10cda 100644 --- a/digitalclock/main.go +++ b/digitalclock/main.go @@ -1,5 +1,4 @@ //go:build !solution -// +build !solution package main diff --git a/digitalclock/symbols.go b/digitalclock/symbols.go index 6593e32..0a33dd9 100644 --- a/digitalclock/symbols.go +++ b/digitalclock/symbols.go @@ -1,5 +1,4 @@ //go:build !change -// +build !change package main diff --git a/distbuild/pkg/api/build_client.go b/distbuild/pkg/api/build_client.go index 77661a2..dbd42ae 100644 --- a/distbuild/pkg/api/build_client.go +++ b/distbuild/pkg/api/build_client.go @@ -1,5 +1,4 @@ //go:build !solution -// +build !solution package api diff --git a/distbuild/pkg/api/build_handler.go b/distbuild/pkg/api/build_handler.go index a682d15..0606c53 100644 --- a/distbuild/pkg/api/build_handler.go +++ b/distbuild/pkg/api/build_handler.go @@ -1,5 +1,4 @@ //go:build !solution -// +build !solution package api diff --git a/distbuild/pkg/api/heartbeat_client.go b/distbuild/pkg/api/heartbeat_client.go index 7306b93..105aab4 100644 --- a/distbuild/pkg/api/heartbeat_client.go +++ b/distbuild/pkg/api/heartbeat_client.go @@ -1,5 +1,4 @@ //go:build !solution -// +build !solution package api diff --git a/distbuild/pkg/api/heartbeat_handler.go b/distbuild/pkg/api/heartbeat_handler.go index a475d2d..8daaf16 100644 --- a/distbuild/pkg/api/heartbeat_handler.go +++ b/distbuild/pkg/api/heartbeat_handler.go @@ -1,5 +1,4 @@ //go:build !solution -// +build !solution package api diff --git a/distbuild/pkg/artifact/cache.go b/distbuild/pkg/artifact/cache.go index a328cf8..0d69c9d 100644 --- a/distbuild/pkg/artifact/cache.go +++ b/distbuild/pkg/artifact/cache.go @@ -1,5 +1,4 @@ //go:build !solution -// +build !solution package artifact diff --git a/distbuild/pkg/artifact/client.go b/distbuild/pkg/artifact/client.go index 057ed7d..2ae9e9d 100644 --- a/distbuild/pkg/artifact/client.go +++ b/distbuild/pkg/artifact/client.go @@ -1,5 +1,4 @@ //go:build !solution -// +build !solution package artifact diff --git a/distbuild/pkg/artifact/handler.go b/distbuild/pkg/artifact/handler.go index e12059f..34c65c4 100644 --- a/distbuild/pkg/artifact/handler.go +++ b/distbuild/pkg/artifact/handler.go @@ -1,5 +1,4 @@ //go:build !solution -// +build !solution package artifact diff --git a/distbuild/pkg/client/build.go b/distbuild/pkg/client/build.go index 7a34487..8d018e1 100644 --- a/distbuild/pkg/client/build.go +++ b/distbuild/pkg/client/build.go @@ -1,5 +1,4 @@ //go:build !solution -// +build !solution package client diff --git a/distbuild/pkg/dist/coordinator.go b/distbuild/pkg/dist/coordinator.go index 0dd7315..544762d 100644 --- a/distbuild/pkg/dist/coordinator.go +++ b/distbuild/pkg/dist/coordinator.go @@ -1,5 +1,4 @@ //go:build !solution -// +build !solution package dist diff --git a/distbuild/pkg/filecache/client.go b/distbuild/pkg/filecache/client.go index 6468ace..2840816 100644 --- a/distbuild/pkg/filecache/client.go +++ b/distbuild/pkg/filecache/client.go @@ -1,5 +1,4 @@ //go:build !solution -// +build !solution package filecache diff --git a/distbuild/pkg/filecache/filecache.go b/distbuild/pkg/filecache/filecache.go index 7d0ac8a..768f17f 100644 --- a/distbuild/pkg/filecache/filecache.go +++ b/distbuild/pkg/filecache/filecache.go @@ -1,5 +1,4 @@ //go:build !solution -// +build !solution package filecache diff --git a/distbuild/pkg/filecache/handler.go b/distbuild/pkg/filecache/handler.go index 6a948df..4a271f3 100644 --- a/distbuild/pkg/filecache/handler.go +++ b/distbuild/pkg/filecache/handler.go @@ -1,5 +1,4 @@ //go:build !solution -// +build !solution package filecache diff --git a/distbuild/pkg/scheduler/scheduler.go b/distbuild/pkg/scheduler/scheduler.go index 2b1a9f9..e026024 100644 --- a/distbuild/pkg/scheduler/scheduler.go +++ b/distbuild/pkg/scheduler/scheduler.go @@ -1,5 +1,4 @@ //go:build !solution -// +build !solution package scheduler diff --git a/distbuild/pkg/tarstream/stream.go b/distbuild/pkg/tarstream/stream.go index 114d12a..b4d760b 100644 --- a/distbuild/pkg/tarstream/stream.go +++ b/distbuild/pkg/tarstream/stream.go @@ -1,5 +1,4 @@ //go:build !solution -// +build !solution package tarstream diff --git a/distbuild/pkg/worker/worker.go b/distbuild/pkg/worker/worker.go index d9884b8..af06d12 100644 --- a/distbuild/pkg/worker/worker.go +++ b/distbuild/pkg/worker/worker.go @@ -1,5 +1,4 @@ //go:build !solution -// +build !solution package worker diff --git a/dupcall/dupcall.go b/dupcall/dupcall.go index c382e1f..9a848b7 100644 --- a/dupcall/dupcall.go +++ b/dupcall/dupcall.go @@ -1,5 +1,4 @@ //go:build !solution -// +build !solution package dupcall diff --git a/externalsort/io.go b/externalsort/io.go index 012c13a..5874ea3 100644 --- a/externalsort/io.go +++ b/externalsort/io.go @@ -1,5 +1,4 @@ //go:build !change -// +build !change package externalsort diff --git a/externalsort/sort.go b/externalsort/sort.go index 3bf00a9..b9c05b3 100644 --- a/externalsort/sort.go +++ b/externalsort/sort.go @@ -1,5 +1,4 @@ //go:build !solution -// +build !solution package externalsort diff --git a/fetchall/main.go b/fetchall/main.go index 375bf63..2a10cda 100644 --- a/fetchall/main.go +++ b/fetchall/main.go @@ -1,5 +1,4 @@ //go:build !solution -// +build !solution package main diff --git a/fetchall/main_test.go b/fetchall/main_test.go index b63d0f4..22ba64a 100644 --- a/fetchall/main_test.go +++ b/fetchall/main_test.go @@ -1,5 +1,4 @@ //go:build !change -// +build !change package main diff --git a/fileleak/fileleak.go b/fileleak/fileleak.go index 3813928..1dd423b 100644 --- a/fileleak/fileleak.go +++ b/fileleak/fileleak.go @@ -1,5 +1,4 @@ //go:build !solution -// +build !solution package fileleak diff --git a/firewall/cmd/firewall/main.go b/firewall/cmd/firewall/main.go index 375bf63..2a10cda 100644 --- a/firewall/cmd/firewall/main.go +++ b/firewall/cmd/firewall/main.go @@ -1,5 +1,4 @@ //go:build !solution -// +build !solution package main diff --git a/firewall/cmd/service/main.go b/firewall/cmd/service/main.go index 695086b..b59a053 100644 --- a/firewall/cmd/service/main.go +++ b/firewall/cmd/service/main.go @@ -1,5 +1,4 @@ //go:build !change -// +build !change package main diff --git a/forth/eval.go b/forth/eval.go index 35bd347..e0b5d66 100644 --- a/forth/eval.go +++ b/forth/eval.go @@ -1,5 +1,4 @@ //go:build !solution -// +build !solution package main diff --git a/forth/main.go b/forth/main.go index c1a87d1..63299ec 100644 --- a/forth/main.go +++ b/forth/main.go @@ -1,5 +1,4 @@ //go:build !change -// +build !change package main diff --git a/gitfame/cmd/gitfame/main.go b/gitfame/cmd/gitfame/main.go index 375bf63..2a10cda 100644 --- a/gitfame/cmd/gitfame/main.go +++ b/gitfame/cmd/gitfame/main.go @@ -1,5 +1,4 @@ //go:build !solution -// +build !solution package main diff --git a/hogwarts/courselist.go b/hogwarts/courselist.go index 8b8750d..34ea140 100644 --- a/hogwarts/courselist.go +++ b/hogwarts/courselist.go @@ -1,5 +1,4 @@ //go:build !solution -// +build !solution package hogwarts diff --git a/hotelbusiness/hotels.go b/hotelbusiness/hotels.go index d11e980..e0214e8 100644 --- a/hotelbusiness/hotels.go +++ b/hotelbusiness/hotels.go @@ -1,5 +1,4 @@ //go:build !solution -// +build !solution package hotelbusiness diff --git a/illegal/field.go b/illegal/field.go index 84eb2d0..40d2634 100644 --- a/illegal/field.go +++ b/illegal/field.go @@ -1,5 +1,4 @@ //go:build !solution -// +build !solution package illegal diff --git a/illegal/internal/struct.go b/illegal/internal/struct.go index 5023f2f..c09a1b3 100644 --- a/illegal/internal/struct.go +++ b/illegal/internal/struct.go @@ -1,5 +1,4 @@ //go:build !change -// +build !change package internal diff --git a/illegal/string.go b/illegal/string.go index 3f12b3b..2ead743 100644 --- a/illegal/string.go +++ b/illegal/string.go @@ -1,5 +1,4 @@ //go:build !solution -// +build !solution package illegal diff --git a/jsonlist/jsonlist.go b/jsonlist/jsonlist.go index 8eba2c8..98b51e3 100644 --- a/jsonlist/jsonlist.go +++ b/jsonlist/jsonlist.go @@ -1,5 +1,4 @@ //go:build !solution -// +build !solution package jsonlist diff --git a/jsonrpc/jsonrpc.go b/jsonrpc/jsonrpc.go index 5ec415e..1fe22be 100644 --- a/jsonrpc/jsonrpc.go +++ b/jsonrpc/jsonrpc.go @@ -1,5 +1,4 @@ //go:build !solution -// +build !solution package jsonrpc diff --git a/keylock/keylock.go b/keylock/keylock.go index 7e21132..7515ffb 100644 --- a/keylock/keylock.go +++ b/keylock/keylock.go @@ -1,5 +1,4 @@ //go:build !solution -// +build !solution package keylock diff --git a/lrucache/cache.go b/lrucache/cache.go index 043dec7..d0f55af 100644 --- a/lrucache/cache.go +++ b/lrucache/cache.go @@ -1,5 +1,4 @@ //go:build !change -// +build !change package lrucache diff --git a/lrucache/lru.go b/lrucache/lru.go index 357968d..7cdaedc 100644 --- a/lrucache/lru.go +++ b/lrucache/lru.go @@ -1,5 +1,4 @@ //go:build !solution -// +build !solution package lrucache diff --git a/olympics/main.go b/olympics/main.go index 375bf63..2a10cda 100644 --- a/olympics/main.go +++ b/olympics/main.go @@ -1,5 +1,4 @@ //go:build !solution -// +build !solution package main diff --git a/once/once.go b/once/once.go index 28d206f..eec3c92 100644 --- a/once/once.go +++ b/once/once.go @@ -1,5 +1,4 @@ //go:build !solution -// +build !solution package once diff --git a/otp/cipher.go b/otp/cipher.go index dafcb2f..993ab22 100644 --- a/otp/cipher.go +++ b/otp/cipher.go @@ -1,5 +1,4 @@ //go:build !solution -// +build !solution package otp diff --git a/pubsub/my_pubsub.go b/pubsub/my_pubsub.go index 81b7d6a..9ab8cc2 100644 --- a/pubsub/my_pubsub.go +++ b/pubsub/my_pubsub.go @@ -1,5 +1,4 @@ //go:build !solution -// +build !solution package pubsub diff --git a/pubsub/pubsub.go b/pubsub/pubsub.go index cae3565..0c68472 100644 --- a/pubsub/pubsub.go +++ b/pubsub/pubsub.go @@ -1,5 +1,4 @@ //go:build !change -// +build !change package pubsub diff --git a/ratelimit/ratelimit.go b/ratelimit/ratelimit.go index 8ebca19..1c2a2f5 100644 --- a/ratelimit/ratelimit.go +++ b/ratelimit/ratelimit.go @@ -1,5 +1,4 @@ //go:build !solution -// +build !solution package ratelimit diff --git a/retryupdate/kvapi/api.go b/retryupdate/kvapi/api.go index 0ce5bae..f05b61e 100644 --- a/retryupdate/kvapi/api.go +++ b/retryupdate/kvapi/api.go @@ -1,5 +1,4 @@ //go:build !change -// +build !change package kvapi diff --git a/retryupdate/kvapi/errors.go b/retryupdate/kvapi/errors.go index 28599d2..a5920a9 100644 --- a/retryupdate/kvapi/errors.go +++ b/retryupdate/kvapi/errors.go @@ -1,5 +1,4 @@ //go:build !change -// +build !change package kvapi diff --git a/retryupdate/update.go b/retryupdate/update.go index 42ade37..a404f18 100644 --- a/retryupdate/update.go +++ b/retryupdate/update.go @@ -1,5 +1,4 @@ //go:build !solution -// +build !solution package retryupdate diff --git a/reversemap/reversemap.go b/reversemap/reversemap.go index b7a99cc..0572a70 100644 --- a/reversemap/reversemap.go +++ b/reversemap/reversemap.go @@ -1,5 +1,4 @@ //go:build !solution -// +build !solution package reversemap diff --git a/rwmutex/rwmutex.go b/rwmutex/rwmutex.go index 2a7b561..4156b5e 100644 --- a/rwmutex/rwmutex.go +++ b/rwmutex/rwmutex.go @@ -1,5 +1,4 @@ //go:build !solution -// +build !solution package rwmutex diff --git a/speller/speller.go b/speller/speller.go index 0e4d114..b1f50f5 100644 --- a/speller/speller.go +++ b/speller/speller.go @@ -1,5 +1,4 @@ //go:build !solution -// +build !solution package speller diff --git a/structtags/structtags.go b/structtags/structtags.go index 091f952..b2e8625 100644 --- a/structtags/structtags.go +++ b/structtags/structtags.go @@ -1,5 +1,4 @@ //go:build !solution -// +build !solution package structtags diff --git a/sum/sum.go b/sum/sum.go index 3ae5e2d..1da0e52 100644 --- a/sum/sum.go +++ b/sum/sum.go @@ -1,5 +1,4 @@ //go:build !solution -// +build !solution package sum diff --git a/tabletest/coverage_test.go b/tabletest/coverage_test.go index 6fc9f69..34d85dc 100644 --- a/tabletest/coverage_test.go +++ b/tabletest/coverage_test.go @@ -1,5 +1,4 @@ //go:build !change -// +build !change package tabletest diff --git a/tabletest/parse_duration.go b/tabletest/parse_duration.go index f60fe08..af46f1b 100644 --- a/tabletest/parse_duration.go +++ b/tabletest/parse_duration.go @@ -1,5 +1,4 @@ //go:build !change -// +build !change package tabletest diff --git a/testequal/assertions.go b/testequal/assertions.go index b73260f..1f4a1b1 100644 --- a/testequal/assertions.go +++ b/testequal/assertions.go @@ -1,5 +1,4 @@ //go:build !solution -// +build !solution package testequal diff --git a/testequal/t.go b/testequal/t.go index 0d485cf..9d96c41 100644 --- a/testequal/t.go +++ b/testequal/t.go @@ -1,5 +1,4 @@ //go:build !change -// +build !change package testequal diff --git a/testifycheck/testifycheck.go b/testifycheck/testifycheck.go index d7886bc..3cd5400 100644 --- a/testifycheck/testifycheck.go +++ b/testifycheck/testifycheck.go @@ -1,4 +1,3 @@ //go:build !solution -// +build !solution package testifycheck diff --git a/tools/testtool/buildtags.go b/tools/testtool/buildtags.go index a9d9de3..464aea1 100644 --- a/tools/testtool/buildtags.go +++ b/tools/testtool/buildtags.go @@ -1,5 +1,4 @@ //go:build !solution -// +build !solution package testtool diff --git a/tparallel/tparallel.go b/tparallel/tparallel.go index a1bd395..56091a1 100644 --- a/tparallel/tparallel.go +++ b/tparallel/tparallel.go @@ -1,5 +1,4 @@ //go:build !solution -// +build !solution package tparallel diff --git a/urlfetch/main.go b/urlfetch/main.go index 375bf63..2a10cda 100644 --- a/urlfetch/main.go +++ b/urlfetch/main.go @@ -1,5 +1,4 @@ //go:build !solution -// +build !solution package main diff --git a/urlfetch/main_test.go b/urlfetch/main_test.go index e535134..c02af54 100644 --- a/urlfetch/main_test.go +++ b/urlfetch/main_test.go @@ -1,5 +1,4 @@ //go:build !change -// +build !change package main diff --git a/urlshortener/main.go b/urlshortener/main.go index 375bf63..2a10cda 100644 --- a/urlshortener/main.go +++ b/urlshortener/main.go @@ -1,5 +1,4 @@ //go:build !solution -// +build !solution package main diff --git a/utf8/reverse/reverse.go b/utf8/reverse/reverse.go index 885ff35..38d066c 100644 --- a/utf8/reverse/reverse.go +++ b/utf8/reverse/reverse.go @@ -1,5 +1,4 @@ //go:build !solution -// +build !solution package reverse diff --git a/utf8/spacecollapse/collapse.go b/utf8/spacecollapse/collapse.go index 34b21b8..2af1244 100644 --- a/utf8/spacecollapse/collapse.go +++ b/utf8/spacecollapse/collapse.go @@ -1,5 +1,4 @@ //go:build !solution -// +build !solution package spacecollapse diff --git a/varfmt/fmt.go b/varfmt/fmt.go index 50396c1..b093e45 100644 --- a/varfmt/fmt.go +++ b/varfmt/fmt.go @@ -1,5 +1,4 @@ //go:build !solution -// +build !solution package varfmt diff --git a/varjoin/join.go b/varjoin/join.go index 39e658f..e58f5ca 100644 --- a/varjoin/join.go +++ b/varjoin/join.go @@ -1,5 +1,4 @@ //go:build !solution -// +build !solution package varjoin diff --git a/waitgroup/waitgroup.go b/waitgroup/waitgroup.go index 6925be0..5d2b14a 100644 --- a/waitgroup/waitgroup.go +++ b/waitgroup/waitgroup.go @@ -1,5 +1,4 @@ //go:build !solution -// +build !solution package waitgroup diff --git a/wordcount/main.go b/wordcount/main.go index 375bf63..2a10cda 100644 --- a/wordcount/main.go +++ b/wordcount/main.go @@ -1,5 +1,4 @@ //go:build !solution -// +build !solution package main diff --git a/wordcount/main_test.go b/wordcount/main_test.go index f29734c..41ddb80 100644 --- a/wordcount/main_test.go +++ b/wordcount/main_test.go @@ -1,5 +1,4 @@ //go:build !change -// +build !change package main diff --git a/wscat/main.go b/wscat/main.go index 375bf63..2a10cda 100644 --- a/wscat/main.go +++ b/wscat/main.go @@ -1,5 +1,4 @@ //go:build !solution -// +build !solution package main From d242514137f179f161df2e3d1c518f12efb28e81 Mon Sep 17 00:00:00 2001 From: Fedor Korotkiy Date: Sat, 2 Apr 2022 14:34:35 +0300 Subject: [PATCH 4/4] Upgrade golangci-lint --- build.docker | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.docker b/build.docker index 24a4cf5..5c74c8b 100644 --- a/build.docker +++ b/build.docker @@ -4,7 +4,7 @@ RUN apt-get update && apt-get install -y \ rsync libssl-dev \ && rm -rf /var/lib/apt/lists/* -RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.44.0 +RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.45.2 RUN curl -L "https://github.com/docker/compose/releases/download/1.28.5/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose RUN chmod +x /usr/local/bin/docker-compose RUN curl -fsSL https://get.docker.com | sh