Skip to content

xjh22222228/gosh

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Golang utility library, With additional functions such as JavaScript/Python!

Installation

go get -d github.com/xjh22222228/gosh

Getting Started

package main

import (
    "fmt"
    "time"
    "github.com/xjh22222228/gosh/gstr"
    "github.com/xjh22222228/gosh/gslice"
    "github.com/xjh22222228/gosh/gtime"
)

func main() {
    s := gstr.Reverse("Hello World")
    fmt.Println(s) // => dlroW olleH


    months := []string{"Jan", "March", "April", "June"}
    deleteItem := gslice.Splice(&months, 4, 1, "May")
    fmt.Println(months, deleteItem)  // => [Jan March April June May] []
    
    // Format date
    fmt.Println(gtime.Format(time.Now(), "YYYY-MM-DD HH:mm:ss"))
    // => 2021-03-12 21:25:37
}

More in-depth info can be found in the runtime documentation.

Contributing

We appreciate your help!

About

🛺 Golang utility library, With additional functions such as JavaScript/Python! Golang实用程序库。

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages