Coder Social home page Coder Social logo

kameria's Introduction

kameria

前途一片黑暗, 不知道未来还能不能养得起房东, 心好累

阿库娅大人说: "今天能养得起房东就今天养吧,反正明天也不一定养得起。就算养不起了,那也是世界的错!"

我老婆说: "我讨厌的事有三件『办不到、好累、好麻烦』这三句话非常不好, 会抹杀人类所拥有的无限可能。"

随意堆砌, 企图发酵

胡闹

func StructTagMap(tag string, model interface{}) (map[string]interface{}, error)

映射struct tag对应元素的指针地址

后面应该会基于这个功能写一些方便操作

func IPv4StringToInt(ipStr string) (int64, error)

IPv4三点数表示法转10进制值地址

func IPv4IntToString(ipInt int64) (string, error)

10进制地址转IPv4三点数表示法

func Limit4Int(min, mid, max int) int
func Limit4Int64(min, mid, max int64) int64
func Limit4Float32(min, mid, max float32) float32
func Limit4Float64(min, mid, max float64) float64

范围取值

func uintptrAddress(v interface{}) (uintptr, error)

获取元素指针地址值, 暂不开放

func Href2Url(href, baseURL string) string

href转完整的url

func Float2String(i interface{}) string

浮点数转字符串, 格式为'f'

[]interface{}转化

kameria.SliceToInterfaces(slice interface{}) []interface{}

失败时返回nil

Unique

切片去重

kameria.Unique.Ints(x []int) []int
kameria.Unique.Int64s(x []int64) []int64
kameria.Unique.Strings(x []string) []string

其他

日常定时器

任务队列

k-math

algorithm

[]byte 转 fs.FS

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.