to is heavy (1528 bytes); consider passing it by pointer
2785 return nil
2786}
2787
2788func (m *model) CommitConfiguration(from, to config.Configuration) bool {2789 // TODO: This should not use reflect, and should take more care to try to handle stuff without restart.
2790
2791 // Delay processing config changes until after the initial setup
from is heavy (1528 bytes); consider passing it by pointer
2785 return nil
2786}
2787
2788func (m *model) CommitConfiguration(from, to config.Configuration) bool {2789 // TODO: This should not use reflect, and should take more care to try to handle stuff without restart.
2790
2791 // Delay processing config changes until after the initial setup
to is heavy (1528 bytes); consider passing it by pointer
2774 return fmt.Sprintf("model@%p", m)
2775}
2776
2777func (m *model) VerifyConfiguration(from, to config.Configuration) error {2778 toFolders := to.FolderMap()
2779 for _, from := range from.Folders {
2780 to, ok := toFolders[from.ID]
from is heavy (1528 bytes); consider passing it by pointer
2774 return fmt.Sprintf("model@%p", m)
2775}
2776
2777func (m *model) VerifyConfiguration(from, to config.Configuration) error {2778 toFolders := to.FolderMap()
2779 for _, from := range from.Folders {
2780 to, ok := toFolders[from.ID]
cfg is heavy (1528 bytes); consider passing it by pointer
279 }
280}
281
282func (m *model) initFolders(cfg config.Configuration) error { 283 clusterConfigDevices := make(deviceIDSet, len(cfg.Devices))
284 for _, folderCfg := range cfg.Folders {
285 if folderCfg.Paused {
Description
When a param big in size (more than 80 bytes) is passed to another function, it is better to pass a pointer to the value around, rather than the value itself.
Bad practice
func f(x [1024]int) {}
Recommended
func f(x *[1024]int) {}