v0.5: fixed nil dereference for empty autocert config, fixed and simplified 'error' module, small readme and docs update

This commit is contained in:
default
2024-08-13 04:59:34 +08:00
parent 2fc82c3790
commit 85fb637551
20 changed files with 209 additions and 235 deletions

View File

@@ -37,11 +37,13 @@ func (s *Slice[T]) Set(i int, v T) {
}
func (s *Slice[T]) Add(e T) *Slice[T] {
return &Slice[T]{append(s.s, e)}
s.s = append(s.s, e)
return s
}
func (s *Slice[T]) AddRange(other *Slice[T]) *Slice[T] {
return &Slice[T]{append(s.s, other.s...)}
s.s = append(s.s, other.s...)
return s
}
func (s *Slice[T]) ForEach(do func(T)) {