\documentclass{article}

\usepackage[record=only]{glossaries-extra}
\GlsXtrLoadResources[src={example-glossaries-brief}]

\newcommand*{\sampleformat}[1]{\glsxtrentryfmt{\glslabel}{#1}}

\glssetcategoryattribute{general}{textformat}{sampleformat}

\begin{document}
\gls{lorem}
\printunsrtglossaries
\end{document}
