1
0
Fork 0
mirror of https://github.com/diamondburned/arikawa.git synced 2024-11-20 05:43:21 +00:00
arikawa/internal/moreatomic/string.go
Maximilian von Lindern 32789bb6e2 *: Separate utils and internal (#129)
* Utils: move package utils/heart to internal/heart

* Utils: move package utils/moreatomic to internal/moreatomic

* Utils: move package utils/zlib to internal/zlib
2020-07-29 16:58:33 -07:00

19 lines
234 B
Go

package moreatomic
import "sync/atomic"
type String struct {
v atomic.Value
}
func (s *String) Get() string {
if v, ok := s.v.Load().(string); ok {
return v
}
return ""
}
func (s *String) Set(str string) {
s.v.Store(str)
}