tablewriter icon indicating copy to clipboard operation
tablewriter copied to clipboard

[Bug]: Table doesn't fit in WASM JavascriptConsole

Open Milerius opened this issue 4 years ago • 0 comments

image

This is because GOARCH is not detected, in web browser console the URL's link are always wrapped in console

One things you can do is:

Check if the current field is an url: https://golangcode.com/how-to-check-if-a-string-is-a-url/ and if GOARCH == "wasm"

In this case you can reduce the size based on the initial string size (formula is last part of the url + 7chars + "...")

to test:

GOOS=js GOARCH=wasm go build -o your_package_that_contains_main.wasm

with a table inside and try to show an url

https://github.com/golang/go/wiki/WebAssembly

Milerius avatar Jul 23 '21 15:07 Milerius