utils

package
v4.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 30, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func QuoteJoin

func QuoteJoin(elems []string, sep string) string

QuoteJoin give a string slice return a quoted join string by sep

func UpperFirst

func UpperFirst(s string) string

UpperFirst make first rune upper in s string

Types

type HttpMethodSet

type HttpMethodSet map[string]struct{}

HttpMethodSet http method set struct

func (HttpMethodSet) Add

func (s HttpMethodSet) Add(methods ...string)

func (HttpMethodSet) List

func (s HttpMethodSet) List() []string

type OnceFunc

type OnceFunc func(string) error

OnceFunc used after OnceSet add it

type Set

type Set interface {
	Add(string) error
	Exist(string) bool
	List() []string
}

Set once set

func NewMuxSet

func NewMuxSet() Set

NewMuxSet return a goroutine safe set

func NewOnceSet

func NewOnceSet(onceFunc OnceFunc) Set

NewOnceSet return an OnceSet instance Warning: OnceSet is not goroutine safe

func NewStrSet

func NewStrSet() Set

NewStrSet return a str sets

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL