Skip to content

Instantly share code, notes, and snippets.

View asspirin12's full-sized avatar

Sergey Kozlovskiy asspirin12

View GitHub Profile
@asspirin12
asspirin12 / errorsAs.go
Last active July 9, 2023 19:40
errorsIsAs
package main
import (
"errors"
"fmt"
"os"
)
// MyError Define a custom error type
type MyError struct {
package main
import (
"database/sql"
"fmt"
"github.com/go-sql-driver/mysql"
"log"
"os"
)
@asspirin12
asspirin12 / main.go
Created November 9, 2022 12:31
Code example for fuzz testing in GoLand
package main
import (
"fmt"
)
func Reverse(s string) string {
b := []byte(s)
for i, j := 0, len(b)-1; i < len(b)/2; i, j = i+1, j-1 {
b[i], b[j] = b[j], b[i]