From 46fde2b949c0cd79ab87d52eff7367af832741d6 Mon Sep 17 00:00:00 2001 From: swestmoreland Date: Thu, 11 Jan 2024 16:18:26 +0000 Subject: [PATCH] Use fstring --- build_defs/go.build_defs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/build_defs/go.build_defs b/build_defs/go.build_defs index 6890b0c..3d84a81 100644 --- a/build_defs/go.build_defs +++ b/build_defs/go.build_defs @@ -1580,12 +1580,8 @@ def _set_go_env(): def _go_library_cmds(name, import_path:str="", complete=True, all_srcs=False, cover=True, filter_srcs=True, abi=False, embedcfg=None, pgo_file=None): """Returns the commands to run for building a Go library.""" if filter_srcs: - filter_cmd = 'export SRCS_GO="$(\"${TOOLS_PLEASE_GO}\" filter' - if CONFIG.GO.BUILD_TAGS: - build_tags = ' -t ' + ' -t '.join(CONFIG.GO.BUILD_TAGS) - filter_cmd += build_tags - - filter_cmd += " $SRCS_GO)\"; " + build_tags = '-t ' + ' -t '.join(CONFIG.GO.BUILD_TAGS) if CONFIG.GO.BUILD_TAGS else '' + filter_cmd = f'export SRCS_GO="$(\"${TOOLS_PLEASE_GO}\" filter {build_tags} $SRCS_GO)"; ' else: filter_cmd = ''