From fa29c14e4bdd3629e6c7660c420b7210839f9950 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Tue, 3 Jan 2023 11:20:17 +0100 Subject: [PATCH] README: clarify that -literals affects -ldflags=-X too --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 5876e54..adfdfc8 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,7 @@ $ PATH=$(go1.17.1 env GOROOT)/bin:${PATH} garble build Using the `-literals` flag causes literal expressions such as strings to be replaced with more complex expressions, resolving to the same value at run-time. +String literals injected via `-ldflags=-X` are also replaced by this flag. This feature is opt-in, as it can cause slow-downs depending on the input code. Literals used in constant expressions cannot be obfuscated, since they are