I have sizable Go WASM application that creates map[string]interface{} and
passes to JS or reads from JS library.
Go maps do not have predefined key order. But JS has object property order
predictable in JavaScript objects since ES2015.
Problem: when JS objects are transferred from JS into Go an
youre-running-windows-7-try-installing-service-pack-1/>.
>
>
>
> While it is possible that this is a problem specific to the Go installer,
> most likely it is not. So I suggest googling for other people with similar
> issues installing other software.
>
> Good Luck.
Yes, I also use js.Value.String() .
I have also looked at TypedArray, but that goes from Go into JS types as
well. One example use case would be for calling JS splice function from Go.
On Friday, October 5, 2018 at 2:04:01 PM UTC-4, Carl Mastrangelo wrote:
>
> While trying out the Wasm compiler
Thank you. Will wait for official fix for this.
Go WASM is nice. I have tried it in number of smaller projects. Ability to
have single language on both client and server side is awesome.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubs
Go Webassembly runs out of memory on Android. Very simple app with just few
event handlers.
I had to use remote debugger to see console. There is resulting screenshot.
Device is Samsung Galaxy S7 edge, model: SM-G935T.
Used Go 1.11 windows/amd64.
Simply used go build with GOOS=js and GOARCH=wasm.
I am struggling to get this working.
How to post Form data to the web server using Go WASM?
Do I use fetch API or XMLHttpRequest?
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it,
Found it:
go list -f "{{.ImportPath}} {{.Imports}}" ./... | grep %1
Replace %1 with package you are looking for.
Run this at GOPATH root to scan all packages.
On Friday, August 17, 2018 at 12:08:48 PM UTC-4, Tad Vizbaras wrote:
>
> I have a package. Let say a/b/c. How to fin
I have a package. Let say a/b/c. How to find what are other packages in my
GOPATH using it?
I am basically trying to clean up GOPATH from all unused packages installed
and downloaded over the years.
Finding "dead" packages in GOPATH.
Tried go list and go doc but only got list of dependencies:
It has been almost two years since this post:
https://dave.cheney.net/2016/06/12/stack-traces-and-the-errors-package
What is current best practice? Should I use some package to gift wrap
errors in order to get stack trace attached to them?
Standard library errors package is really "bare bones".
Found it. The key is to use function x509.ParseCertificate(block.Bytes) .
Code below is not clean but should help anyone looking for a way to parse
pem file into x509.Certificate.
f, err := os.Open(sn.recpCertFile)
if err != nil {
log.Fatal(err)
}
defer f.Close()
pubPEM, err := ioutil.ReadAll(f
Note: I know how to get to *rsa.PublicKey from pem file. Probably missing
something really obvious.
On Thursday, February 1, 2018 at 11:07:38 AM UTC-5, Tad Vizbaras wrote:
>
> How to get X509.Certificate struct from public key in pem file?
>
>
--
You received this message bec
How to get X509.Certificate struct from public key in pem file?
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to golang-nuts+unsubscr...@googlegroups.com.
For more
I just realized that encryption and signing (optional) has to be done for
S/MIME and PKCS7.
Does standard library covers this?
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send
Very helpful. Thanks.
Can I use 3DES encryption instead of sha256.New() ?
Inside this call:
ciphertext, err := rsa.EncryptOAEP(sha256.New(), rng, &public,
secretMessage, label)
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe fr
Looking for source code example on how to load private/public key from .pem
file.
Then use it to encrypt/decrypt/sign using RSA.
Standard library examples are too low level.
My requirement is rather basic: load pem file and then use various RSA
functions.
I was looking at rsa.EncryptOAEP but
Yes, that what I have used. I feel that package
https://github.com/pkg/errors is good enough to be in the standard library.
At least part of it that does stack trace.
In all respects Go worked very well for this project.
--
You received this message because you are subscribed to the Google Gr
Summary: adding *.syso file to main packages directory stops normal race
detector enabled build on windows/amd64.
This in essence prevents race detection on Windows apps with GUI interface
that use binary resources (icons, etc.).
--
You received this message because you are subscribed to the
This is windows/amd64 setup.
go build -race works in other scenarios. Example: building console apps.
It also works if *.syso file with binary resources (icons, etc.) is NOT in
the build directory.
Once you place rsrc.syso or any *.syso "go build -race" stops working.
There is the output:
go b
I used "walk" for prototyping but found it too complex. I do not mean this
as criticism. "walk" uses many closures to init controls and
get GUI working. This is fine if you are into this style of programming. I
find reading "walk" internal code challenging.
"walk" was an inspiration. It is possi
are already a few
>> libs, although some of them are still barebones...
>>
>> https://github.com/lxn/walk
>> https://github.com/andlabs/ui
>>
>> Of course there are also bindings for gtk and qt.
>>
>> On Monday, 15 January 2018 22:32:33 UTC+2, Tad
Experience Report building OCR in Go:
http://recoink.com/goreport
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to golang-nuts+unsubscr...@googlegroups.com.
For
Looks like I found the solution in
https://golang.org/pkg/encoding/json/#Decoder.Decode
Example (Stream).
This should do it.
On Tuesday, December 19, 2017 at 11:11:25 AM UTC-5, Tad Vizbaras wrote:
>
>
> I have this:
>
> type Runner interface {
> TaskName() string
> Ru
I have this:
type Runner interface {
TaskName() string
Run(ctx context.Context) error
}
type Job struct {
Tasks []Runner
}
1. I have number of structs that implement Runner interface and get added
into slice of Tasks.
2. I use json.Encoder to save Job into JSON file.
3. But when I try to loa
x27;s RAW files. Is this a similar thing or is it just reading
> all the IFD's? I plan to implement a SubIFD decoder for tiff, unless
> someone else has done it.
>
> On Sun, Sep 24, 2017 at 8:21 PM Tad Vizbaras > wrote:
>
>> Sad.
>>
>> Any chance to add multi p
D.
>
> On Friday, September 22, 2017 at 1:49:47 PM UTC-4, Tad Vizbaras wrote:
>>
>> No problem reading single page TIFF images using: "golang.org/x/image/tiff".
>>
>> It works great.
>>
>>
>> Question: how to read multi-page scanned TIFFs?
No problem reading single page TIFF images using: "golang.org/x/image/tiff".
It works great.
Question: how to read multi-page scanned TIFFs? How to access pages 2, 3, etc.?
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from
There is also library called lumberjack. It integrates nicely with standard
library.
quote: `Lumberjack is a Go package for writing logs to rolling files.`
https://github.com/natefinch/lumberjack
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group
Thank you for detailed explanation.
I find myself never using "var a map[int]int" or similar var like map.
Maybe just my limited understanding.
But I am glad we end up with map[int]int instead of *map[int]int.
--
You received this message because you are subscribed to the Google Groups
"gola
Making zero value useful is great idea. It works for slice, mutex and many
others.
var a []int
a = append(a, 1)
fmt.Println(a)
This works and prints:
[1]
Sadly maps do not seem to have useful zero value. They require call to
make() or literal to get to useful state.
var a map[int]int
a[1] =
Slicing is useful but is there a difference between simple slice assignment
and [:] ?
Like this:
A := []int{1, 2, 3}
b := A[:] vs. b := A
Why would I want to use A[:] if A is a slice? If A is an array I would
understand. But it is a slice.
I found this in some third party library and got puz
30 matches
Mail list logo