mirror of
https://github.com/aclindsa/moneygo.git
synced 2024-10-30 15:50:04 -04:00
18 lines
288 B
Go
18 lines
288 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"net/http"
|
|
"strconv"
|
|
"strings"
|
|
)
|
|
|
|
func GetURLID(url string) (int64, error) {
|
|
pieces := strings.Split(strings.Trim(url, "/"), "/")
|
|
return strconv.ParseInt(pieces[len(pieces)-1], 10, 0)
|
|
}
|
|
|
|
func WriteSuccess(w http.ResponseWriter) {
|
|
fmt.Fprint(w, "{}")
|
|
}
|