Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5e67425

Browse files
committed
Use pointer receiver in stateData
1 parent24b26aa commit5e67425

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

‎server/state.go‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -236,28 +236,28 @@ type stateData struct {
236236
lock sync.Mutex
237237
}
238238

239-
func (sstateData)Get(keystring)interface{} {
239+
func (s*stateData)Get(keystring)interface{} {
240240
s.lock.Lock()
241241
v:=s.m[key]
242242
s.lock.Unlock()
243243
returnv
244244
}
245245

246-
func (sstateData)Set(keystring,valueinterface{}) {
246+
func (s*stateData)Set(keystring,valueinterface{}) {
247247
s.lock.Lock()
248248
s.m[key]=value
249249
s.lock.Unlock()
250250
}
251251

252-
func (sstateData)String(keystring)string {
252+
func (s*stateData)String(keystring)string {
253253
returns.Get(key).(string)
254254
}
255255

256-
func (sstateData)Int(keystring)int {
256+
func (s*stateData)Int(keystring)int {
257257
returns.Get(key).(int)
258258
}
259259

260-
func (sstateData)Bool(keystring)bool {
260+
func (s*stateData)Bool(keystring)bool {
261261
returns.Get(key).(bool)
262262
}
263263

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp