Skip to content

Commit

Permalink
tests: Generate implementation changed (#48)
Browse files Browse the repository at this point in the history
* tests: Generate implementation changed

so we can generate not only tests, but MIROR_FUNCS.md

* docs: New generated MIRROR_FUNCS.md
* tools: clean up and tidy tools
* chores: bump go version in test pipeline
  • Loading branch information
butuzov committed Dec 8, 2023
1 parent 2ae0341 commit 4a63766
Show file tree
Hide file tree
Showing 21 changed files with 647 additions and 260 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
go:
- "1.19"
- "1.20"
- "1.21"
steps:

- uses: actions/checkout@v4
Expand All @@ -40,11 +41,11 @@ jobs:

- name: Install goveralls
env: { GO111MODULE: "off" }
if: matrix.go == '1.20'
if: matrix.go == '1.21'
run: go get github.com/mattn/goveralls

- name: Coverage - Sending Report to Coveral
if: matrix.go == '1.20'
if: matrix.go == '1.21'
env:
COVERALLS_TOKEN: ${{ secrets.github_token }}
run: goveralls -coverprofile=coverage.cov -service=github
Expand All @@ -59,5 +60,5 @@ jobs:
version: latest
skip-build-cache: true
skip-pkg-cache: true
args: -D deadcode --skip-dirs "^(cmd|testdata)"
args: --skip-dirs "^(cmd|testdata)"

213 changes: 132 additions & 81 deletions MIRROR_FUNCS.md
Original file line number Diff line number Diff line change
@@ -1,150 +1,201 @@
<table><tr>
<td><code>func (b *bufio.Writer) WriteString(s string) (int, error)</code></td>
<td>
<code>func (b *bufio.Writer) Write(p []byte) (int, error)</code>
<code>func (b *bufio.Writer) WriteRune(r rune) (int, error)</code>
</td>
<tr>
<td><code>func (*bufio.Writer) Write([]byte) (int, error)</code></td>
<td><code>func (*bufio.Writer) WriteString(string) (int, error)</code></td>
</tr>
<tr>
<td><code>func (*bufio.Writer) WriteRune(rune) (int, error)</code></td>
<td><code>func (*bufio.Writer) WriteString(string) (int, error)</code></td>
</tr>
<tr>
<td><code>func (*bytes.Buffer) Write([]byte) (int, error)</code></td>
<td><code>func (*bytes.Buffer) WriteString(string) (int, error)</code></td>
</tr>
<tr>
<td><code>func (*bytes.Buffer) WriteRune(rune) (int, error)</code></td>
<td><code>func (*bytes.Buffer) WriteString(string) (int, error)</code></td>
</tr>
<tr>
<td><code>func bytes.Compare([]byte, []byte) int</code></td>
<td><code>func strings.Compare(string, string) int</code></td>
</tr>
<tr>
<td><code>func bytes.Contains([]byte, []byte) bool</code></td>
<td><code>func strings.Contains(string, string) bool</code></td>
</tr>
<tr>
<td><code>func bytes.ContainsAny([]byte, string) bool</code></td>
<td><code>func strings.ContainsAny(string, string) bool</code></td>
</tr>
<tr>
<td><code>func bytes.ContainsRune([]byte, byte) bool</code></td>
<td><code>func strings.ContainsRune(string, byte) bool</code></td>
</tr>
<tr>
<td><code>func bytes.Count([]byte, []byte) int</code></td>
<td><code>func strings.Count(string, string) int</code></td>
</tr>
<tr>
<td><code>func bytes.EqualFold([]byte, []byte) bool</code></td>
<td><code>func strings.EqualFold(string, string) bool</code></td>
</tr>
<tr>
<td><code>func bytes.HasPrefix([]byte, []byte) bool</code></td>
<td><code>func strings.HasPrefix(string, string) bool</code></td>
</tr>
<tr>
<td><code>func bytes.HasSuffix([]byte, []byte) bool</code></td>
<td><code>func strings.HasSuffix(string, string) bool</code></td>
</tr>
<tr>
<td><code>func bytes.Index([]byte, []byte) int</code></td>
<td><code>func strings.Index(string, string) int</code></td>
</tr>
<tr>
<td><code>func bytes.IndexAny([]byte, string) int</code></td>
<td><code>func strings.IndexAny(string, string) int</code></td>
</tr>
<tr>
<td><code>func bytes.IndexByte([]byte, byte) int</code></td>
<td><code>func strings.IndexByte(string, byte) int</code></td>
</tr>
<tr>
<td><code>func bytes.IndexFunc([]byte, func(rune) bool) int</code></td>
<td><code>func strings.IndexFunc(string, func(rune) bool) int</code></td>
</tr>
<tr>
<td><code>func (b *bytes.Buffer) WriteString(s string) (int, error)</code></td>
<td>
<code>func (b *bytes.Buffer) Write(p []byte) (int, error)</code>
<code>func (b *bytes.Buffer) WriteRune(r rune) (int, error)</code>
</td>
<td><code>func bytes.IndexRune([]byte, rune) int</code></td>
<td><code>func strings.IndexRune(string, rune) int</code></td>
</tr>
<tr>
<td><code>func strings.Compare(a, b string) int</code></td>
<td><code>func bytes.Compare(a, b []byte) int</code></td>
<td><code>func bytes.LastIndex([]byte, []byte) int</code></td>
<td><code>func strings.LastIndex(string, string) int</code></td>
</tr>
<tr>
<td><code>func strings.Contains(s, substr string) bool</code></td>
<td><code>func bytes.Contains(b, subslice []byte) bool</code></td>
<td><code>func bytes.LastIndexAny([]byte, string) int</code></td>
<td><code>func strings.LastIndexAny(string, string) int</code></td>
</tr>
<tr>
<td><code>func strings.ContainsAny(s, chars string) bool</code></td>
<td><code>func bytes.ContainsAny(b []byte, chars string) bool</code></td>
<td><code>func bytes.LastIndexByte([]byte, byte) int</code></td>
<td><code>func strings.LastIndexByte(string, byte) int</code></td>
</tr>
<tr>
<td><code>func strings.ContainsRune(s string, r rune) bool</code></td>
<td><code>func bytes.ContainsRune(b []byte, r rune) bool</code></td>
<td><code>func bytes.LastIndexFunc([]byte, func(rune) bool) int</code></td>
<td><code>func strings.LastIndexFunc(string, func(rune) bool) int</code></td>
</tr>
<tr>
<td><code>func strings.Count(s, substr string) int</code></td>
<td><code>func bytes.Count(s, sep []byte) int</code></td>
<td><code>func bytes.NewBuffer([]byte) *bytes.Buffer</code></td>
<td><code>func bytes.NewBufferString(string) *bytes.Buffer</code></td>
</tr>
<tr>
<td><code>func strings.EqualFold(s, t string) bool</code></td>
<td><code>func bytes.EqualFold(s, t []byte) bool</code></td>
<td><code>func (*httptest.ResponseRecorder) Write([]byte) (int, error)</code></td>
<td><code>func (*httptest.ResponseRecorder) WriteString(string) (int, error)</code></td>
</tr>
<tr>
<td><code>func strings.HasPrefix(s, prefix string) bool</code></td>
<td><code>func bytes.HasPrefix(s, prefix []byte) bool</code></td>
<td><code>func (*maphash.Hash) Write([]byte) (int, error)</code></td>
<td><code>func (*maphash.Hash) WriteString(string) (int, error)</code></td>
</tr>
<tr>
<td><code>func strings.HasSuffix(s, suffix string) bool</code></td>
<td><code>func bytes.HasSuffix(s, suffix []byte) bool</code></td>
<td><code>func (*os.File) Write([]byte) (int, error)</code></td>
<td><code>func (*os.File) WriteString(string) (int, error)</code></td>
</tr>
<tr>
<td><code>func strings.Index(s, substr string) int</code></td>
<td><code>func bytes.Index(s, sep []byte) int</code></td>
<td><code>func regexp.Match(string, []byte) (bool, error)</code></td>
<td><code>func regexp.MatchString(string, string) (bool, error)</code></td>
</tr>
<tr>
<td><code>func strings.IndexAny(s, chars string) int</code></td>
<td><code>func bytes.IndexAny(s []byte, chars string) int</code></td>
<td><code>func (*regexp.Regexp) FindAllIndex([]byte, int) [][]int</code></td>
<td><code>func (*regexp.Regexp) FindAllStringIndex(string, int) [][]int</code></td>
</tr>
<tr>
<td><code>func strings.IndexByte(s string, c byte) int</code></td>
<td><code>func bytes.IndexByte(b []byte, c byte) int</code></td>
<td><code>func (*regexp.Regexp) FindAllSubmatchIndex([]byte, int) [][]int</code></td>
<td><code>func (*regexp.Regexp) FindAllStringSubmatchIndex(string, int) [][]int</code></td>
</tr>
<tr>
<td><code>func strings.IndexFunc(s string, f func(rune) bool) int</code></td>
<td><code>func bytes.IndexFunc(s []byte, f func(r rune) bool) int</code></td>
<td><code>func (*regexp.Regexp) FindIndex([]byte) []int</code></td>
<td><code>func (*regexp.Regexp) FindStringIndex(string) []int</code></td>
</tr>
<tr>
<td><code>func strings.IndexRune(s string, r rune) int</code></td>
<td><code>func bytes.IndexRune(s []byte, r rune) int</code></td>
<td><code>func (*regexp.Regexp) FindSubmatchIndex([]byte) []int</code></td>
<td><code>func (*regexp.Regexp) FindStringSubmatchIndex(string) []int</code></td>
</tr>
<tr>
<td><code>func strings.LastIndex(s, sep string) int</code></td>
<td><code>func bytes.LastIndex(s, sep []byte) int</code></td>
<td><code>func (*regexp.Regexp) Match([]byte) bool</code></td>
<td><code>func (*regexp.Regexp) MatchString(string) bool</code></td>
</tr>
<tr>
<td><code>func strings.LastIndexAny(s, chars string) int</code></td>
<td><code>func bytes.LastIndexAny(s []byte, chars string) int</code></td>
<td><code>func (*strings.Builder) Write([]byte) (int, error)</code></td>
<td><code>func (*strings.Builder) WriteString(string) (int, error)</code></td>
</tr>
<tr>
<td><code>func strings.LastIndexByte(s string, c byte) int</code></td>
<td><code>func bytes.LastIndexByte(s []byte, c byte) int</code></td>
<td><code>func (*strings.Builder) WriteRune(rune) (int, error)</code></td>
<td><code>func (*strings.Builder) WriteString(string) (int, error)</code></td>
</tr>
<tr>
<td><code>func strings.LastIndexFunc(s string, f func(rune) bool) int</code></td>
<td><code>func bytes.LastIndexFunc(s []byte, f func(r rune) bool) int</code></td>
<td><code>func strings.Compare(string) int</code></td>
<td><code>func bytes.Compare([]byte) int</code></td>
</tr>
<tr>
<td><code>func bytes.NewBufferString(s string) *bytes.Buffer</code></td>
<td><code>func bytes.NewBuffer(buf []byte *bytes.Buffer</code></td>
<td><code>func strings.Contains(string) bool</code></td>
<td><code>func bytes.Contains([]byte) bool</code></td>
</tr>
<tr>
<td><code>func (h *hash/maphash.Hash) WriteString(s string) (int, error)</code></td>
<td><code>func (h *hash/maphash.Hash) Write(b []byte) (int, error)</code></td>
<td><code>func strings.ContainsAny(string) bool</code></td>
<td><code>func bytes.ContainsAny([]byte) bool</code></td>
</tr>
<tr>
<td><code>func (rw *net/http/httptest.ResponseRecorder) WriteString(str string) (int, error)</code></td>
<td><code>func (rw *net/http/httptest.ResponseRecorder) Write(buf []byte) (int, error)</code></td>
<td><code>func strings.ContainsRune(string) bool</code></td>
<td><code>func bytes.ContainsRune([]byte) bool</code></td>
</tr>
<tr>
<td><code>func (f *os.File) WriteString(s string) (n int, err error)</code></td>
<td><code>func (f *os.File) Write(b []byte) (n int, err error)</code></td>
<td><code>func strings.EqualFold(string) bool</code></td>
<td><code>func bytes.EqualFold([]byte) bool</code></td>
</tr>
<tr>
<td><code>func regexp.MatchString(pattern string, s string) (bool, error)</code></td>
<td><code>func regexp.Match(pattern string, b []byte) (bool, error)</code></td>
<td><code>func strings.HasPrefix(string) bool</code></td>
<td><code>func bytes.HasPrefix([]byte) bool</code></td>
</tr>
<tr>
<td><code>func (re *regexp.Regexp) FindAllStringIndex(s string, n int) [][]int</code></td>
<td><code>func (re *regexp.Regexp) FindAllIndex(b []byte, n int) [][]int</code></td>
<td><code>func strings.HasSuffix(string) bool</code></td>
<td><code>func bytes.HasSuffix([]byte) bool</code></td>
</tr>
<tr>
<td><code>func (re *regexp.Regexp) FindAllStringSubmatch(s string, n int) [][]string</code></td>
<td><code>func (re *regexp.Regexp) FindAllSubmatch(b []byte, n int) [][][]byte</code></td>
<td><code>func strings.Index(string) int</code></td>
<td><code>func bytes.Index([]byte) int</code></td>
</tr>
<tr>
<td><code>func (re *regexp.Regexp) FindStringIndex(s string) (loc []int)</code></td>
<td><code>func (re *regexp.Regexp) FindIndex(b []byte) (loc []int)</code></td>
<td><code>func strings.IndexFunc(string, func(r rune) bool) int</code></td>
<td><code>func bytes.IndexFunc([]byte, func(r rune) bool) int</code></td>
</tr>
<tr>
<td><code>func (re *regexp.Regexp) FindStringSubmatchIndex(s string) []int</code></td>
<td><code>func (re *regexp.Regexp) FindSubmatchIndex(b []byte) []int</code></td>
<td><code>func strings.LastIndex(string) int</code></td>
<td><code>func bytes.LastIndex([]byte) int</code></td>
</tr>
<tr>
<td><code>func (re *regexp.Regexp) MatchString(s string) bool</code></td>
<td><code>func (re *regexp.Regexp) Match(b []byte) bool</code></td>
<td><code>func strings.LastIndexAny(string) int</code></td>
<td><code>func bytes.LastIndexAny([]byte) int</code></td>
</tr>
<tr>
<td><code>func (b *strings.Builder) WriteString(s string) error</code></td>
<td>
<code>func (b *strings.Builder) Write(p []byte) (int, error)</code>
<code>func (b *strings.Builder) WriteRune(r rune) (int, error)</code>
</td>
<td><code>func strings.LastIndexFunc(string, func(r rune) bool) int</code></td>
<td><code>func bytes.LastIndexFunc([]byte, func(r rune) bool) int</code></td>
</tr>
<tr>
<td><code>func utf8.ValidString(s string) bool</code></td>
<td><code>func utf8.Valid(p []byte) bool</code></td>
<td><code>func utf8.DecodeLastRune([]byte) (rune, int)</code></td>
<td><code>func utf8.DecodeLastRuneInString(string) (rune, int)</code></td>
</tr>
<tr>
<td><code>func utf8.FullRuneInString(s string) bool</code></td>
<td><code>func utf8.FullRune(p []byte) bool</code></td>
<td><code>func utf8.DecodeRune([]byte) (rune, int)</code></td>
<td><code>func utf8.DecodeRuneInString(string) (rune, int)</code></td>
</tr>
<tr>
<td><code>func utf8.RuneCountInString(s string) (n int)</code></td>
<td><code>func utf8.RuneCount(p []byte) int</code></td>
<td><code>func utf8.FullRune([]byte) bool</code></td>
<td><code>func utf8.FullRuneInString(string) bool</code></td>
</tr>
<tr>
<td><code>func utf8.DecodeLastRuneInString(s string) (rune, int)</code></td>
<td><code>func utf8.DecodeLastRune(p []byte) (rune, int)</code></td>
<td><code>func utf8.RuneCount([]byte) int</code></td>
<td><code>func utf8.RuneCountInString(string) int</code></td>
</tr>
<tr>
<td><code>func utf8.DecodeRuneInString(s string) (une, int)</code></td>
<td><code>func utf8.DecodeRune(p []byte) (rune, int)</code></td>
<td><code>func utf8.Valid([]byte) bool</code></td>
<td><code>func utf8.ValidString(string) bool</code></td>
</tr>
</table>

Loading

0 comments on commit 4a63766

Please sign in to comment.