func handleAction(plug *PlugDJ, msg socketMessage) {
	handler, ok := actions[msg.Action]
	if ok {
		// a handler exists, lets call it,
		// but give it the param directly
		plug.Log.WithFields(log.Fields{"action": msg.Action, "len": len(msg.Action)}).Debugln("action called")
		handler(plug, msg.Parameter.(json.RawMessage))
		return
	}

	// Default action behaviour
	msg.Parameter = string(msg.Parameter.(json.RawMessage))
	plug.Log.WithFields(log.Fields{"message": msg}).Debugln("WS: ??:")
}
// Base action that executes the correct handler
// or do some debug outputs if the handler
// does not exist for the given message.
Base action that executes the correct handler
or do some debug outputs if the handler
does not exist for the given message.
// Base action that executes the correct handler // or do some debug outputs if the handler // does not exist for the given message .
func handleAction(plug *PlugDJ, msg socketMessage) {
	handler, ok := actions[msg.Action]
	if ok {
		plug.Log.WithFields(log.Fields{"action": msg.Action, "len": len(msg.Action)}).Debugln("action called")
		handler(plug, msg.Parameter.(json.RawMessage))
		return
	}
	msg.Parameter = string(msg.Parameter.(json.RawMessage))
	plug.Log.WithFields(log.Fields{"message": msg}).Debugln("WS: ??:")
}
func handleAction ( plug * PlugDJ , msg socketMessage ) { handler , ok := actions [ msg . Action ] if ok { plug . Log . WithFields ( log . Fields { " " : msg . Action , " " : len ( msg . Action ) } ) . Debugln ( " " ) handler ( plug , msg . Parameter . ( json . RawMessage ) ) return } msg . Parameter = string ( msg . Parameter . ( json . RawMessage ) ) plug . Log . WithFields ( log . Fields { " " : msg } ) . Debugln ( " " ) }
Base action that executes the correct handler
or do some debug outputs if the handler
does not exist for the given message.
Base action that executes the correct handler or do some debug outputs if the handler does not exist for the given message .
// a handler exists, lets call it, // but give it the param directly // Default action behaviour