1
0
mirror of https://github.com/ManyakRus/starter.git synced 2025-12-03 23:59:17 +02:00

сделал ReplaceTemporaryTableNamesToUnique()

This commit is contained in:
Nikitin Aleksandr
2024-04-26 11:10:23 +03:00
parent 1d033238b2
commit 95fee1846d
940 changed files with 65295 additions and 109754 deletions

View File

@@ -1 +1 @@
8.4.5
8.5.0

View File

@@ -30,7 +30,7 @@ type RemoteJobStream struct {
type RemoteJobStreamMetadata struct {
Worker string `json:"worker"`
Timeout string `json:"timeout"`
Timeout int64 `json:"timeout"`
FetchVariables []string `json:"fetchVariables"`
}

View File

@@ -1,14 +1,13 @@
package message
import (
"bytes"
"encoding/base64"
"errors"
"fmt"
"io"
"mime/quotedprintable"
"strings"
"github.com/emersion/go-textwrapper"
)
type UnknownEncodingError struct {
@@ -57,9 +56,9 @@ func encodingWriter(enc string, w io.Writer) (io.WriteCloser, error) {
case "quoted-printable":
wc = quotedprintable.NewWriter(w)
case "base64":
wc = base64.NewEncoder(base64.StdEncoding, textwrapper.NewRFC822(w))
wc = base64.NewEncoder(base64.StdEncoding, &lineWrapper{w: w, maxLineLen: 76})
case "7bit", "8bit":
wc = nopCloser{textwrapper.New(w, "\r\n", 1000)}
wc = nopCloser{&lineWrapper{w: w, maxLineLen: 998}}
case "binary", "":
wc = nopCloser{w}
default:
@@ -86,3 +85,67 @@ func (r *whitespaceReplacingReader) Read(p []byte) (int, error) {
return n, err
}
type lineWrapper struct {
w io.Writer
maxLineLen int
curLineLen int
cr bool
}
func (w *lineWrapper) Write(b []byte) (int, error) {
var written int
for len(b) > 0 {
var l []byte
l, b = cutLine(b, w.maxLineLen-w.curLineLen)
lf := bytes.HasSuffix(l, []byte("\n"))
l = bytes.TrimSuffix(l, []byte("\n"))
n, err := w.w.Write(l)
if err != nil {
return written, err
}
written += n
cr := bytes.HasSuffix(l, []byte("\r"))
if len(l) == 0 {
cr = w.cr
}
if !lf && len(b) == 0 {
w.curLineLen += len(l)
w.cr = cr
break
}
w.curLineLen = 0
ending := []byte("\r\n")
if cr {
ending = []byte("\n")
}
_, err = w.w.Write(ending)
if err != nil {
return written, err
}
w.cr = false
}
return written, nil
}
func cutLine(b []byte, max int) ([]byte, []byte) {
for i := 0; i < len(b); i++ {
if b[i] == '\r' && i == max {
continue
}
if b[i] == '\n' {
return b[:i+1], b[i+1:]
}
if i >= max {
return b[:i], b[i:]
}
}
return b, nil
}

View File

@@ -187,9 +187,13 @@ func (e *Entity) WriteTo(w io.Writer) error {
if err != nil {
return err
}
defer ew.Close()
return e.writeBodyTo(ew)
if err := e.writeBodyTo(ew); err != nil {
ew.Close()
return err
}
return ew.Close()
}
// WalkFunc is the type of the function called for each part visited by Walk.

View File

@@ -195,9 +195,9 @@ func (p *headerParser) parseMsgID() (string, error) {
right, err = p.parseNoFoldLiteral()
} else {
right, err = p.parseAtomText(true)
if err != nil {
return "", err
}
}
if err != nil {
return "", err
}
if !p.consume('>') {

View File

@@ -69,8 +69,7 @@ func createWriter(w io.Writer, header *Header) (*Writer, error) {
// encoding, data written to the Writer will automatically be encoded with it.
// The charset needs to be utf-8 or us-ascii.
func CreateWriter(w io.Writer, header Header) (*Writer, error) {
// ensure that modifications are invisible to the caller
// Ensure that modifications are invisible to the caller
header = header.Copy()
// If the message uses MIME, it has to include MIME-Version

View File

@@ -1,24 +0,0 @@
# Compiled Object files, Static and Dynamic libs (Shared Objects)
*.o
*.a
*.so
# Folders
_obj
_test
# Architecture specific extensions/prefixes
*.[568vq]
[568vq].out
*.cgo1.go
*.cgo2.c
_cgo_defun.c
_cgo_gotypes.go
_cgo_export.*
_testmain.go
*.exe
*.test
*.prof

View File

@@ -1 +0,0 @@
language: go

View File

@@ -1,21 +0,0 @@
The MIT License (MIT)
Copyright (c) 2016 emersion
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -1,27 +0,0 @@
# go-textwrapper
[![GoDoc](https://godoc.org/github.com/emersion/go-textwrapper?status.svg)](https://godoc.org/github.com/emersion/go-textwrapper)
[![Build Status](https://travis-ci.org/emersion/go-textwrapper.svg?branch=master)](https://travis-ci.org/emersion/go-textwrapper)
A writer that wraps long text lines to a specified length
## Usage
```go
import (
"os"
"github.com/emersion/go-textwrapper"
)
func main() {
w := textwrapper.New(os.Stdout, "/", 5)
w.Write([]byte("helloworldhelloworldhelloworld"))
// Output: hello/world/hello/world/hello/world
}
```
## License
MIT

View File

@@ -1,61 +0,0 @@
// A writer that wraps long text lines to a specified length.
package textwrapper
import (
"io"
)
type writer struct {
Len int
sepBytes []byte
w io.Writer
i int
}
func (w *writer) Write(b []byte) (N int, err error) {
to := w.Len - w.i
for len(b) > to {
var n int
n, err = w.w.Write(b[:to])
if err != nil {
return
}
N += n
b = b[to:]
_, err = w.w.Write(w.sepBytes)
if err != nil {
return
}
w.i = 0
to = w.Len
}
w.i += len(b)
n, err := w.w.Write(b)
if err != nil {
return
}
N += n
return
}
// Returns a writer that splits its input into multiple parts that have the same
// length and adds a separator between these parts.
func New(w io.Writer, sep string, l int) io.Writer {
return &writer{
Len: l,
sepBytes: []byte(sep),
w: w,
}
}
// Creates a RFC822 text wrapper. It adds a CRLF (ie. \r\n) each 76 characters.
func NewRFC822(w io.Writer) io.Writer {
return New(w, "\r\n", 76)
}

View File

@@ -1,103 +0,0 @@
[
true,
false,
true,
false,
true,
false,
true,
false,
true,
false,
true,
false,
true,
false,
true,
false,
true,
false,
true,
false,
true,
false,
true,
false,
true,
false,
true,
false,
true,
false,
true,
false,
true,
false,
true,
false,
true,
false,
true,
false,
true,
false,
true,
false,
true,
false,
true,
false,
true,
false,
true,
false,
true,
false,
true,
false,
true,
false,
true,
false,
true,
false,
true,
false,
true,
false,
true,
false,
true,
false,
true,
false,
true,
false,
true,
false,
true,
false,
true,
false,
true,
false,
true,
false,
true,
false,
true,
false,
true,
false,
true,
false,
true,
false,
true,
false,
true,
false,
true,
false
]

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@@ -1,102 +0,0 @@
[
0.6,
0.9,
0.6,
0.4,
0.4,
0.6,
0.0,
0.1,
0.0,
0.3,
0.5,
0.8,
0.2,
0.3,
0.3,
0.4,
0.2,
0.2,
0.6,
0.2,
0.2,
0.3,
0.5,
0.8,
0.2,
0.2,
0.7,
0.2,
0.8,
0.6,
0.5,
0.0,
0.1,
0.6,
0.9,
0.0,
0.5,
0.0,
0.6,
0.3,
0.1,
0.5,
0.5,
0.2,
0.4,
0.5,
0.2,
0.2,
0.7,
0.3,
0.8,
0.2,
0.8,
0.0,
0.9,
0.0,
0.2,
0.6,
0.2,
0.3,
0.9,
0.7,
0.8,
0.7,
0.1,
0.4,
0.8,
0.6,
0.9,
0.9,
0.0,
0.4,
0.9,
0.9,
0.3,
0.6,
0.7,
0.5,
0.6,
0.5,
0.7,
0.4,
0.1,
0.9,
0.8,
0.3,
0.7,
0.6,
0.0,
0.6,
0.6,
0.3,
0.2,
0.5,
0.1,
0.2,
0.6,
0.1,
0.2,
0.4
]

View File

@@ -1,102 +0,0 @@
[
604660287,
940509088,
664560053,
437714187,
424637497,
686823072,
656370192,
156519254,
969695189,
300911860,
515212628,
813639960,
214263872,
380657189,
318058174,
468889844,
283034151,
293101857,
679084675,
218553052,
203186876,
360871416,
570673276,
862491437,
293114244,
297082563,
752573035,
206582661,
865335013,
696719165,
523820306,
283030833,
158328277,
607253439,
975241618,
794536233,
594808597,
591206513,
692024587,
301522681,
173266238,
541099855,
544155573,
278507621,
423152201,
530585715,
253540500,
282080994,
788604915,
361805480,
880543122,
297112260,
894361729,
974546183,
976916868,
742909989,
222289417,
681078312,
241515088,
311522444,
932846428,
741848923,
801055013,
730231483,
182924943,
428357078,
896991927,
682653438,
978929376,
922212269,
908372708,
493141904,
926986842,
954945418,
347953929,
690838889,
710907151,
563779544,
649489404,
551765049,
755823578,
403803235,
130651117,
985964767,
896341761,
322083917,
721147741,
644539794,
855205023,
669575245,
622728345,
369692819,
236822552,
535281861,
187246105,
238840786,
628098133,
126752913,
281330223,
410322847
]

File diff suppressed because one or more lines are too long

View File

@@ -1,95 +0,0 @@
[
{
"person": {
"id": "d50887ca-a6ce-4e59-b89f-14f0b5d03b03",
"name": {
"fullName": "Leonid Bugaev",
"givenName": "Leonid",
"familyName": "Bugaev"
},
"email": "leonsbox@gmail.com",
"gender": "male",
"location": "Saint Petersburg, Saint Petersburg, RU",
"geo": {
"city": "Saint Petersburg",
"state": "Saint Petersburg",
"country": "Russia",
"lat": 59.9342802,
"lng": 30.3350986
},
"bio": "Senior engineer at Granify.com",
"site": "http://flickfaver.com",
"avatar": "https://d1ts43dypk8bqh.cloudfront.net/v1/avatars/d50887ca-a6ce-4e59-b89f-14f0b5d03b03",
"employment": {
"name": "www.latera.ru",
"title": "Software Engineer",
"domain": "gmail.com"
},
"facebook": {
"handle": "leonid.bugaev"
},
"github": {
"handle": "buger",
"id": 14009,
"avatar": "https://avatars.githubusercontent.com/u/14009?v=3",
"company": "Granify",
"blog": "http://leonsbox.com",
"followers": 95,
"following": 10
},
"twitter": {
"handle": "flickfaver",
"id": 77004410,
"bio": null,
"followers": 2,
"following": 1,
"statuses": 5,
"favorites": 0,
"location": "",
"site": "http://flickfaver.com",
"avatar": null
},
"linkedin": {
"handle": "in/leonidbugaev"
},
"googleplus": {
"handle": null
},
"angellist": {
"handle": "leonid-bugaev",
"id": 61541,
"bio": "Senior engineer at Granify.com",
"blog": "http://buger.github.com",
"site": "http://buger.github.com",
"followers": 41,
"avatar": "https://d1qb2nb5cznatu.cloudfront.net/users/61541-medium_jpg?1405474390"
},
"klout": {
"handle": null,
"score": null
},
"foursquare": {
"handle": null
},
"aboutme": {
"handle": "leonid.bugaev",
"bio": null,
"avatar": null
},
"gravatar": {
"handle": "buger",
"urls": [
],
"avatar": "http://1.gravatar.com/avatar/f7c8edd577d13b8930d5522f28123510",
"avatars": [
{
"url": "http://1.gravatar.com/avatar/f7c8edd577d13b8930d5522f28123510",
"type": "thumbnail"
}
]
},
"fuzzy": false
},
"company": "hello"
}
]

View File

@@ -1,103 +0,0 @@
[
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
]

View File

@@ -1,18 +0,0 @@
{
"Timestamp": "1586960586000000000",
"Attributes": {
"http.status_code": 500,
"http.url": "http://example.com",
"my.custom.application.tag": "hello"
},
"Resource": {
"service.name": "donut_shop",
"service.version": "2.0.0",
"k8s.pod.uid": "1138528c-c36e-11e9-a1a7-42010a800198"
},
"TraceId": "13e2a0921288b3ff80df0a0482d4fc46",
"SpanId": "43222c2d51a7abe3",
"SeverityText": "INFO",
"SeverityNumber": 9,
"Body": "20200415T072306-0700 INFO I like donuts"
}

View File

@@ -1,102 +0,0 @@
[
0.6046602879796196,
0.9405090880450124,
0.6645600532184904,
0.4377141871869802,
0.4246374970712657,
0.6868230728671094,
0.06563701921747622,
0.15651925473279124,
0.09696951891448456,
0.30091186058528707,
0.5152126285020654,
0.8136399609900968,
0.21426387258237492,
0.380657189299686,
0.31805817433032985,
0.4688898449024232,
0.28303415118044517,
0.29310185733681576,
0.6790846759202163,
0.21855305259276428,
0.20318687664732285,
0.360871416856906,
0.5706732760710226,
0.8624914374478864,
0.29311424455385804,
0.29708256355629153,
0.7525730355516119,
0.2065826619136986,
0.865335013001561,
0.6967191657466347,
0.5238203060500009,
0.028303083325889995,
0.15832827774512764,
0.6072534395455154,
0.9752416188605784,
0.07945362337387198,
0.5948085976830626,
0.05912065131387529,
0.692024587353112,
0.30152268100656,
0.17326623818270528,
0.5410998550087353,
0.544155573000885,
0.27850762181610883,
0.4231522015718281,
0.5305857153507052,
0.2535405005150605,
0.28208099496492467,
0.7886049150193449,
0.3618054804803169,
0.8805431227416171,
0.2971122606397708,
0.8943617293304537,
0.09745461839911657,
0.9769168685862624,
0.07429099894984302,
0.22228941700678773,
0.6810783123925709,
0.24151508854715265,
0.31152244431052484,
0.932846428518434,
0.741848959991823,
0.8010550426526613,
0.7302314772948083,
0.18292491645390843,
0.4283570818068078,
0.8969919575618727,
0.6826534880132438,
0.9789293555766876,
0.9222122589217269,
0.09083727535388708,
0.4931419977048804,
0.9269868035744142,
0.9549454404167818,
0.3479539636282229,
0.6908388315056789,
0.7109071952999951,
0.5637795958152644,
0.6494894605929404,
0.5517650490127749,
0.7558235074915978,
0.40380328579570035,
0.13065111702897217,
0.9859647293402467,
0.8963417453962161,
0.3220839705208817,
0.7211477651926741,
0.6445397825093294,
0.08552050754191123,
0.6695752976997745,
0.6227283173637045,
0.3696928436398219,
0.2368225468054852,
0.5352818906344061,
0.18724610140105305,
0.2388407028053186,
0.6280981712183633,
0.1267529293726013,
0.28133029380535923,
0.41032284435628247
]

View File

@@ -1,11 +0,0 @@
{
"st": 1,
"sid": 486,
"tt": "active",
"gr": 0,
"uuid": "de305d54-75b4-431b-adb2-eb6b9e546014",
"ip": "127.0.0.1",
"ua": "user_agent",
"tz": -6,
"v": 1
}

View File

@@ -1,21 +0,0 @@
MIT License
Copyright (c) 2016 Nicolas Seriot
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -1 +0,0 @@
[123.456e-789]

View File

@@ -1 +0,0 @@
[0.4e00669999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999969999999006]

View File

@@ -1 +0,0 @@
[-1e+9999]

View File

@@ -1 +0,0 @@
[1.5e+9999]

View File

@@ -1 +0,0 @@
[-123123e100000]

View File

@@ -1 +0,0 @@
[123123e100000]

View File

@@ -1 +0,0 @@
[123e-10000000]

View File

@@ -1 +0,0 @@
[-123123123123123123123123123123]

View File

@@ -1 +0,0 @@
[100000000000000000000]

View File

@@ -1 +0,0 @@
[-237462374673276894279832749832423479823246327846]

View File

@@ -1 +0,0 @@
{"\uDFAA":0}

View File

@@ -1 +0,0 @@
["日ш�"]

View File

@@ -1 +0,0 @@
["���"]

View File

@@ -1 +0,0 @@
["\ud800abc"]

View File

@@ -1 +0,0 @@
["�"]

View File

@@ -1 +0,0 @@
["\uDd1e\uD834"]

View File

@@ -1 +0,0 @@
["�"]

View File

@@ -1 +0,0 @@
["\uDFAA"]

View File

@@ -1 +0,0 @@
["����"]

View File

@@ -1 +0,0 @@
["������"]

View File

@@ -1 +0,0 @@
["������"]

View File

@@ -1 +0,0 @@
["��"]

View File

@@ -1 +0,0 @@
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]

View File

@@ -1 +0,0 @@
[a]

View File

@@ -1 +0,0 @@
[1,,2]

View File

@@ -1 +0,0 @@
["x",,]

View File

@@ -1 +0,0 @@
["x"]]

View File

@@ -1 +0,0 @@
["",]

View File

@@ -1 +0,0 @@
["x"

View File

@@ -1 +0,0 @@
[]

View File

@@ -1 +0,0 @@
[,]

View File

@@ -1 +0,0 @@
[-]

View File

@@ -1 +0,0 @@
[ , ""]

View File

@@ -1,3 +0,0 @@
["a",
4
,1,

View File

@@ -1 +0,0 @@
[*]

View File

@@ -1 +0,0 @@
[""

View File

@@ -1 +0,0 @@
[fals]

View File

@@ -1 +0,0 @@
[nul]

View File

@@ -1 +0,0 @@
[tru]

View File

@@ -1 +0,0 @@
[++1234]

View File

@@ -1 +0,0 @@
[+1]

View File

@@ -1 +0,0 @@
[+Inf]

View File

@@ -1 +0,0 @@
[-01]

View File

@@ -1 +0,0 @@
[-1.0.]

View File

@@ -1 +0,0 @@
[-2.]

View File

@@ -1 +0,0 @@
[-NaN]

View File

@@ -1 +0,0 @@
[.-1]

View File

@@ -1 +0,0 @@
[.2e-3]

View File

@@ -1 +0,0 @@
[0.1.2]

View File

@@ -1 +0,0 @@
[0.3e+]

Some files were not shown because too many files have changed in this diff Show More