started adding user info
This commit is contained in:
6
tool.go
6
tool.go
@@ -135,7 +135,6 @@ func int64Ptr(i int64) *int64 {
|
||||
}
|
||||
|
||||
func hexToDecimal(hexColor string) int {
|
||||
// Remove the hash symbol if it's present
|
||||
hexColor = strings.TrimPrefix(hexColor, "#")
|
||||
decimal, err := strconv.ParseInt(hexColor, 16, 64)
|
||||
if err != nil {
|
||||
@@ -144,6 +143,11 @@ func hexToDecimal(hexColor string) int {
|
||||
return int(decimal)
|
||||
}
|
||||
|
||||
func decimalToHex(decimal int) string {
|
||||
hexString := strconv.FormatInt(int64(decimal), 16)
|
||||
return hexString
|
||||
}
|
||||
|
||||
func simpleGetFromAPI(key string, url string) interface{} {
|
||||
client := &http.Client{}
|
||||
req, err := http.NewRequest("GET", url, nil)
|
||||
|
Reference in New Issue
Block a user