// Copyright 2022 The Gogs Authors. All rights reserved.// Use of this source code is governed by a MIT-style// license that can be found in the LICENSE file.packagedbutilimport("fmt""gogs.io/gogs/internal/conf")// Quote adds surrounding double quotes for all given arguments before being// formatted if the current database is UsePostgreSQL.funcQuote(formatstring,args...string)string{anys:=make([]any,len(args))fori:=rangeargs{ifconf.UsePostgreSQL{anys[i]=`"`+args[i]+`"`}else{anys[i]=args[i]}}returnfmt.Sprintf(format,anys...)}