Skip to content

Instantly share code, notes, and snippets.

View lucas-code42's full-sized avatar
📖
learning

Lucas lucas-code42

📖
learning
  • Stone.co
  • São Paulo, SP
View GitHub Profile
@lucas-code42
lucas-code42 / ip.go
Created March 31, 2024 22:42 — forked from miguelmota/ip.go
Golang get IP address from web HTTP request handler
package main
import (
"errors"
"log"
"net"
"net/http"
"strings"
)
@lucas-code42
lucas-code42 / error.go
Created January 15, 2024 01:40 — forked from renanbastos93/error.go
Custom errors in Golang
// ./custom/error.go
package myerrors
import (
"fmt"
)
type myError struct {
code int
msg string