Skip to content

Commit

Permalink
Add Go Module support (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
FelicianoTech authored Oct 16, 2023
1 parent 320519b commit 13f1d99
Show file tree
Hide file tree
Showing 17 changed files with 19 additions and 2,000 deletions.
16 changes: 0 additions & 16 deletions Godeps/Godeps.json

This file was deleted.

5 changes: 0 additions & 5 deletions Godeps/Readme

This file was deleted.

5 changes: 3 additions & 2 deletions api/get_ip.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ package api
import (
"encoding/json"
"fmt"
"github.com/julienschmidt/httprouter"
"github.com/rdegges/ipify-api/models"
"net"
"net/http"
"strings"

"github.com/cloud-unpacked/ippi/models"
"github.com/julienschmidt/httprouter"
)

// GetIP returns a user's public facing IP address (IPv4 OR IPv6).
Expand Down
8 changes: 8 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module github.com/cloud-unpacked/ippi

go 1.21

require (
github.com/julienschmidt/httprouter v1.3.0
github.com/rs/cors v1.10.1
)
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
github.com/julienschmidt/httprouter v1.3.0 h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U=
github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM=
github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo=
github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU=
7 changes: 4 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@
package main

import (
"github.com/julienschmidt/httprouter"
"github.com/rdegges/ipify-api/api"
"github.com/rs/cors"
"log"
"net/http"
"os"

"github.com/cloud-unpacked/ippi/api"
"github.com/julienschmidt/httprouter"
"github.com/rs/cors"
)

// main launches our web server which runs indefinitely.
Expand Down
9 changes: 0 additions & 9 deletions vendor/github.com/julienschmidt/httprouter/.travis.yml

This file was deleted.

24 changes: 0 additions & 24 deletions vendor/github.com/julienschmidt/httprouter/LICENSE

This file was deleted.

Loading

0 comments on commit 13f1d99

Please sign in to comment.