You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when i use cmd tinygo build -ldflags "-X 'main.WASM_NAME=ws_conn.wasm'" to change the variable WASM_NAME in main package like golang, i got the return val in default val, is it not work?
The text was updated successfully, but these errors were encountered:
The documentation mentions that if a default value is set for a variable, value passed with ldflags will be ignored.
One important thing to note is that you cannot use a default value in your code if you want to be able to set that value using -ldflags. If you set the variable to a default value, then the value you pass using ldflags will be ignored.
when i use cmd
tinygo build -ldflags "-X 'main.WASM_NAME=ws_conn.wasm'"
to change the variableWASM_NAME
in main package like golang, i got the return val in default val, is it not work?The text was updated successfully, but these errors were encountered: