package helpers
import "github.com/evanw/esbuild/internal/helpers"
Index ¶
- func MimeTypeByExtension(ext string) string
- type BitSet
- func NewBitSet(bitCount uint) BitSet
- func (bs BitSet) Equals(other BitSet) bool
- func (bs BitSet) HasBit(bit uint) bool
- func (bs *BitSet) IsAllZeros() bool
- func (bs BitSet) SetBit(bit uint)
- func (bs BitSet) String() string
- type Joiner
Functions ¶
func MimeTypeByExtension ¶
This is used instead of Go's built-in "mime.TypeByExtension" function because that function is broken on Windows: https://github.com/golang/go/issues/32350.
Types ¶
type BitSet ¶
type BitSet struct {
// contains filtered or unexported fields
}
func NewBitSet ¶
func (BitSet) Equals ¶
func (BitSet) HasBit ¶
func (*BitSet) IsAllZeros ¶
func (BitSet) SetBit ¶
func (BitSet) String ¶
type Joiner ¶
type Joiner struct {
// contains filtered or unexported fields
}
This provides an efficient way to join lots of big string and byte slices together. It avoids the cost of repeatedly reallocating as the buffer grows by measuring exactly how big the buffer should be and then allocating once. This is a measurable speedup.
func (*Joiner) AddBytes ¶
func (*Joiner) AddString ¶
func (*Joiner) Done ¶
func (*Joiner) EnsureNewlineAtEnd ¶
func (j *Joiner) EnsureNewlineAtEnd()
func (*Joiner) LastByte ¶
func (*Joiner) Length ¶
Source Files ¶
- Version
- v0.11.5
- Published
- Apr 3, 2021
- Platform
- windows/amd64
- Imports
- 2 packages
- Last checked
- 1 minute ago –
Tools for package owners.