681 Menu: menu.GetGlobalMenu(user, eng.Adapter.GetConnection(), ctx.Lang()).SetActiveClass(eng.config.URLRemovePrefix(ctx.Path())),
682 Panel: template.WarningPanel(ctx, err.Error()).GetContent(eng.config.IsProductionEnvironment()),
683 Assets: template.GetComponentAssetImportHTML(ctx),
684 Buttons: (*eng.NavButtons).CheckPermission(user),685 TmplHeadHTML: template.Default(ctx).GetHeadHTML(),
686 TmplFootJS: template.Default(ctx).GetFootJS(),
687 Iframe: ctx.IsIframe(),
396
397func (eng *Engine) addJumpNavButton(param navJumpButtonParam) *Engine {
398 if param.Exist {
399 *eng.NavButtons = (*eng.NavButtons).AddNavButton(param.Icon, param.BtnName,400 action.JumpInNewTab(config.Url(param.URL),
401 language.GetWithScope(param.Title, param.TitleScore)))
402 }
318 var input []byte
319 form := ctx.Request.MultipartForm
320 if form != nil {
321 input, _ = json.Marshal((*form).Value)322 }
323
324 models.OperationLog().SetConn(conn).New(user.Id, ctx.Path(), ctx.Method(), ctx.LocalIP(), string(input))
229 Config: h.config,
230 Menu: menu.GetGlobalMenu(user, h.conn, ctx.Lang(), plugName).SetActiveClass(h.config.URLRemovePrefix(ctx.Path())),
231 Animation: option.Animation,
232 Buttons: (*h.navButtons).CheckPermission(user),233 Iframe: ctx.IsIframe(),
234 IsPjax: isPjax(ctx),
235 NoCompress: option.NoCompress,
178 if plugName == "" {
179 btns = (*h.navButtons).CheckPermission(user)
180 } else {
181 btns = (*h.navButtons).Copy().182 RemoveToolNavButton().
183 RemoveSiteNavButton().
184 RemoveInfoNavButton().
Avoid unnecessary dereference expressions that can be avoided by using shorthand notations (syntactic sugar) that are available in Go.
_ = (*str).field // replace with str.field
_ = (**str).field // replace with (*str).field
(*k)[2] = 3 // replace with k[2] = 3
_ = str.field
_ = (*str).field
k[2] = 3