package ip import ( "github.com/gin-gonic/gin" "ipv6-test-node/internal/pkg/response" "ipv6-test-node/internal/pkg/utils" "net/http" "strconv" ) func MyIP(c *gin.Context) { version, err := utils.GetIPVersion(c.ClientIP()) if err != nil { return } c.JSON(http.StatusOK, response.MyIPResponse{ Address: c.ClientIP(), Version: strconv.Itoa(version), }) }