import{_ as s,o as a,c as n,X as l}from"./chunks/framework.6e839c56.js";const g=JSON.parse('{"title":"Installation","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/getting_started.md","filePath":"en/guide/getting_started.md"}'),o={name:"en/guide/getting_started.md"},e=l(`
go get github.com/duke-git/lancet/v2 // will install latest version of v2.x.xgo get github.com/duke-git/lancet/v2 // will install latest version of v2.x.xgo get github.com/duke-git/lancet // below go1.18, install latest version of v1.x.xgo get github.com/duke-git/lancet // below go1.18, install latest version of v1.x.xLancet organizes the code into package structure, and you need to import the corresponding package name when use it. For example, if you use string-related functions, just import the strutil package like below:
import "github.com/duke-git/lancet/v2/strutil"import "github.com/duke-git/lancet/v2/strutil"Here takes the string function Reverse (reverse order string) as an example, and the strutil package needs to be imported.
package main
import (
"fmt"
"github.com/duke-git/lancet/v2/strutil"
)
func main() {
s := "hello"
rs := strutil.Reverse(s)
fmt.Println(rs) //olleh
}package main
import (
"fmt"
"github.com/duke-git/lancet/v2/strutil"
)
func main() {
s := "hello"
rs := strutil.Reverse(s)
fmt.Println(rs) //olleh
}Check out the APIs for details.
`,13),p=[e];function t(c,r,i,y,d,F){return a(),n("div",null,p)}const h=s(o,[["render",t]]);export{g as __pageData,h as default};