Merge branch 'go-1.18'

This commit is contained in:
Fedor Korotkiy 2022-04-02 14:44:39 +03:00
commit 7658844998
91 changed files with 9 additions and 91 deletions

View file

@ -1,6 +1,6 @@
# Курс по Го в ШАД
Для работы с кодом нужен go 1.17 или выше.
Для работы с кодом нужен go 1.18 или выше.
```sh
git clone https://gitlab.com/slon/shad-go.git

View file

@ -1,5 +1,4 @@
//go:build !solution
// +build !solution
package allocs

View file

@ -1,5 +1,4 @@
//go:build !solution && !change
// +build !solution,!change
package allocs

View file

@ -1,5 +1,4 @@
//go:build !solution
// +build !solution
package batcher

View file

@ -1,5 +1,4 @@
//go:build race
// +build race
package batcher

View file

@ -1,5 +1,4 @@
//go:build !change
// +build !change
package slow

View file

@ -1,5 +1,4 @@
//go:build !solution
// +build !solution
package blowfish

View file

@ -1,10 +1,10 @@
FROM golang:1.17
FROM golang:1.18
RUN apt-get update && apt-get install -y \
rsync libssl-dev postgresql sudo redis-server \
&& 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

View file

@ -1,5 +1,4 @@
//go:build !solution
// +build !solution
package ciletters

View file

@ -1,5 +1,4 @@
//go:build !change
// +build !change
package ciletters

View file

@ -1,5 +1,4 @@
//go:build !solution
// +build !solution
package cond

View file

@ -1,5 +1,4 @@
//go:build !change
// +build !change
package app

View file

@ -1,5 +1,4 @@
//go:build !change
// +build !change
package app

View file

@ -1,5 +1,4 @@
//go:build !change
// +build !change
package client

View file

@ -1,5 +1,4 @@
//go:build !change
// +build !change
package main

View file

@ -1,5 +1,4 @@
//go:build !change
// +build !change
package models

View file

@ -1,5 +1,4 @@
//go:build !change
// +build !change
package models

View file

@ -1,5 +1,4 @@
//go:build !change
// +build !change
package utils

View file

@ -1,5 +1,4 @@
//go:build !solution
// +build !solution
package main

View file

@ -1,5 +1,4 @@
//go:build !change
// +build !change
package main

View file

@ -1,5 +1,4 @@
//go:build !solution
// +build !solution
package api

View file

@ -1,5 +1,4 @@
//go:build !solution
// +build !solution
package api

View file

@ -1,5 +1,4 @@
//go:build !solution
// +build !solution
package api

View file

@ -1,5 +1,4 @@
//go:build !solution
// +build !solution
package api

View file

@ -1,5 +1,4 @@
//go:build !solution
// +build !solution
package artifact

View file

@ -1,5 +1,4 @@
//go:build !solution
// +build !solution
package artifact

View file

@ -1,5 +1,4 @@
//go:build !solution
// +build !solution
package artifact

View file

@ -1,5 +1,4 @@
//go:build !solution
// +build !solution
package client

View file

@ -1,5 +1,4 @@
//go:build !solution
// +build !solution
package dist

View file

@ -1,5 +1,4 @@
//go:build !solution
// +build !solution
package filecache

View file

@ -1,5 +1,4 @@
//go:build !solution
// +build !solution
package filecache

View file

@ -1,5 +1,4 @@
//go:build !solution
// +build !solution
package filecache

View file

@ -1,5 +1,4 @@
//go:build !solution
// +build !solution
package scheduler

View file

@ -1,5 +1,4 @@
//go:build !solution
// +build !solution
package tarstream

View file

@ -1,5 +1,4 @@
//go:build !solution
// +build !solution
package worker

View file

@ -1,5 +1,4 @@
//go:build !solution
// +build !solution
package dupcall

View file

@ -1,5 +1,4 @@
//go:build !change
// +build !change
package externalsort

View file

@ -1,5 +1,4 @@
//go:build !solution
// +build !solution
package externalsort

View file

@ -1,5 +1,4 @@
//go:build !solution
// +build !solution
package main

View file

@ -1,5 +1,4 @@
//go:build !change
// +build !change
package main

View file

@ -1,5 +1,4 @@
//go:build !solution
// +build !solution
package fileleak

View file

@ -1,5 +1,4 @@
//go:build !solution
// +build !solution
package main

View file

@ -1,5 +1,4 @@
//go:build !change
// +build !change
package main

View file

@ -1,5 +1,4 @@
//go:build !solution
// +build !solution
package main

View file

@ -1,5 +1,4 @@
//go:build !change
// +build !change
package main

View file

@ -1,5 +1,4 @@
//go:build !solution
// +build !solution
package main

2
go.mod
View file

@ -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

View file

@ -1,5 +1,4 @@
//go:build !solution
// +build !solution
package hogwarts

View file

@ -1,5 +1,4 @@
//go:build !solution
// +build !solution
package hotelbusiness

View file

@ -1,5 +1,4 @@
//go:build !solution
// +build !solution
package illegal

View file

@ -1,5 +1,4 @@
//go:build !change
// +build !change
package internal

View file

@ -1,5 +1,4 @@
//go:build !solution
// +build !solution
package illegal

View file

@ -1,5 +1,4 @@
//go:build !solution
// +build !solution
package jsonlist

View file

@ -1,5 +1,4 @@
//go:build !solution
// +build !solution
package jsonrpc

View file

@ -1,5 +1,4 @@
//go:build !solution
// +build !solution
package keylock

View file

@ -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()

View file

@ -1,6 +1,7 @@
package redis
import (
"context"
"log"
"time"

View file

@ -1,5 +1,4 @@
//go:build !change
// +build !change
package lrucache

View file

@ -1,5 +1,4 @@
//go:build !solution
// +build !solution
package lrucache

View file

@ -1,5 +1,4 @@
//go:build !solution
// +build !solution
package main

View file

@ -1,5 +1,4 @@
//go:build !solution
// +build !solution
package once

View file

@ -1,5 +1,4 @@
//go:build !solution
// +build !solution
package otp

View file

@ -1,5 +1,4 @@
//go:build !solution
// +build !solution
package pubsub

View file

@ -1,5 +1,4 @@
//go:build !change
// +build !change
package pubsub

View file

@ -1,5 +1,4 @@
//go:build !solution
// +build !solution
package ratelimit

View file

@ -1,5 +1,4 @@
//go:build !change
// +build !change
package kvapi

View file

@ -1,5 +1,4 @@
//go:build !change
// +build !change
package kvapi

View file

@ -1,5 +1,4 @@
//go:build !solution
// +build !solution
package retryupdate

View file

@ -1,5 +1,4 @@
//go:build !solution
// +build !solution
package reversemap

View file

@ -1,5 +1,4 @@
//go:build !solution
// +build !solution
package rwmutex

View file

@ -1,5 +1,4 @@
//go:build !solution
// +build !solution
package speller

View file

@ -1,5 +1,4 @@
//go:build !solution
// +build !solution
package structtags

View file

@ -1,5 +1,4 @@
//go:build !solution
// +build !solution
package sum

View file

@ -1,5 +1,4 @@
//go:build !change
// +build !change
package tabletest

View file

@ -1,5 +1,4 @@
//go:build !change
// +build !change
package tabletest

View file

@ -1,5 +1,4 @@
//go:build !solution
// +build !solution
package testequal

View file

@ -1,5 +1,4 @@
//go:build !change
// +build !change
package testequal

View file

@ -1,4 +1,3 @@
//go:build !solution
// +build !solution
package testifycheck

View file

@ -1,5 +1,4 @@
//go:build !solution
// +build !solution
package testtool

View file

@ -1,5 +1,4 @@
//go:build !solution
// +build !solution
package tparallel

View file

@ -1,5 +1,4 @@
//go:build !solution
// +build !solution
package main

View file

@ -1,5 +1,4 @@
//go:build !change
// +build !change
package main

View file

@ -1,5 +1,4 @@
//go:build !solution
// +build !solution
package main

View file

@ -1,5 +1,4 @@
//go:build !solution
// +build !solution
package reverse

View file

@ -1,5 +1,4 @@
//go:build !solution
// +build !solution
package spacecollapse

View file

@ -1,5 +1,4 @@
//go:build !solution
// +build !solution
package varfmt

View file

@ -1,5 +1,4 @@
//go:build !solution
// +build !solution
package varjoin

View file

@ -1,5 +1,4 @@
//go:build !solution
// +build !solution
package waitgroup

View file

@ -1,5 +1,4 @@
//go:build !solution
// +build !solution
package main

View file

@ -1,5 +1,4 @@
//go:build !change
// +build !change
package main

View file

@ -1,5 +1,4 @@
//go:build !solution
// +build !solution
package main