GoAdminGroup / go-admin

Method modifies receiver RVV-B0006
Bug risk
Major
8 occurrences in this check
suspicious assignment to a by-value method receiver
313			refreshTime = p.RefreshInterval[0]
314		}
315
316		p.Content += `<script>317window.setTimeout(function(){
318	$.pjax.reload('#pjax-container');	
319}, ` + template.HTML(strconv.Itoa(refreshTime*1000)) + `);
suspicious assignment to a by-value method receiver
305
306	p.Content = `<div` + animation + style + ">" + p.Content + "</div>" + remove
307	if p.MiniSidebar {
308		p.Content += `<script>$("body").addClass("sidebar-collapse")</script>`309	}
310	if p.AutoRefresh {
311		refreshTime := 60
suspicious assignment to a by-value method receiver
303		</script>`)
304	}
305
306	p.Content = `<div` + animation + style + ">" + p.Content + "</div>" + remove307	if p.MiniSidebar {
308		p.Content += `<script>$("body").addClass("sidebar-collapse")</script>`
309	}
suspicious assignment to a by-value method receiver
261func (p Panel) AddComponent(comp Component) Panel {
262	p.JS += comp.GetJS()
263	p.CSS += comp.GetCSS()
264	p.Content += comp.GetContent()265	p.Callbacks = append(p.Callbacks, comp.GetCallbacks()...)
266	return p
267}
suspicious assignment to a by-value method receiver
260
261func (p Panel) AddComponent(comp Component) Panel {
262	p.JS += comp.GetJS()
263	p.CSS += comp.GetCSS()264	p.Content += comp.GetContent()
265	p.Callbacks = append(p.Callbacks, comp.GetCallbacks()...)
266	return p
suspicious assignment to a by-value method receiver
259}
260
261func (p Panel) AddComponent(comp Component) Panel {
262	p.JS += comp.GetJS()263	p.CSS += comp.GetCSS()
264	p.Content += comp.GetContent()
265	p.Callbacks = append(p.Callbacks, comp.GetCallbacks()...)
suspicious assignment to a by-value method receiver
262	p.JS += comp.GetJS()
263	p.CSS += comp.GetCSS()
264	p.Content += comp.GetContent()
265	p.Callbacks = append(p.Callbacks, comp.GetCallbacks()...)266	return p
267}
268
suspicious assignment to a by-value method receiver
267}
268
269func (p Panel) AddJS(js template.JS) Panel {
270	p.JS += js271	return p
272}
273