FAQ
Hi,

When trying to use gomobile bind to create an AAR file for a simple
package, I get the error:

gomobile: unsupported, direct named type github.com/evahlis/spm.PasswordDb:
struct{github.com/evahlis/spm.passwordDbInternals; key [32]byte;
keyWasInited bool}

The type in question is defined as follows:


type passwordDbInternals struct {
  data map[string]string
  passwordNonce [32]byte
}

type PasswordDb struct {
  passwordDbInternals
  key [32]byte
  keyWasInited bool
}


Since structs are supposed to be supported, I expected this to work. What
am I missing?

--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

  • Hyang-Ah Hana Kim at Jun 21, 2015 at 4:43 pm
    That looks like the NewPasswordDb function that returns PasswordDb.
    Is it possible to change NewPasswordDb to return *PasswordDb for now?

    I created an issue to track this bug:

    https://github.com/golang/go/issues/11318

    2015-06-21 9:01 GMT-04:00 <evahlis@gmail.com>:
    Hi,

    When trying to use gomobile bind to create an AAR file for a simple
    package, I get the error:

    gomobile: unsupported, direct named type github.com/evahlis/spm.PasswordDb:
    struct{github.com/evahlis/spm.passwordDbInternals; key [32]byte;
    keyWasInited bool}

    The type in question is defined as follows:


    type passwordDbInternals struct {
    data map[string]string
    passwordNonce [32]byte
    }

    type PasswordDb struct {
    passwordDbInternals
    key [32]byte
    keyWasInited bool
    }


    Since structs are supposed to be supported, I expected this to work. What
    am I missing?

    --
    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+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.


    --
    __

    --
    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+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Evahlis at Jun 21, 2015 at 5:05 pm
    That worked. It should be *PasswordDb anyway, but it would be good to
    support both versions or give a better error message.

    Thanks for the quick response.
    On Sunday, June 21, 2015 at 12:43:06 PM UTC-4, Hyang-Ah Hana Kim wrote:

    That looks like the NewPasswordDb function that returns PasswordDb.
    Is it possible to change NewPasswordDb to return *PasswordDb for now?

    I created an issue to track this bug:

    https://github.com/golang/go/issues/11318

    2015-06-21 9:01 GMT-04:00 <eva...@gmail.com <javascript:>>:
    Hi,

    When trying to use gomobile bind to create an AAR file for a simple
    package, I get the error:

    gomobile: unsupported, direct named type
    github.com/evahlis/spm.PasswordDb: struct{
    github.com/evahlis/spm.passwordDbInternals; key [32]byte; keyWasInited
    bool}

    The type in question is defined as follows:


    type passwordDbInternals struct {
    data map[string]string
    passwordNonce [32]byte
    }

    type PasswordDb struct {
    passwordDbInternals
    key [32]byte
    keyWasInited bool
    }


    Since structs are supposed to be supported, I expected this to work. What
    am I missing?

    --
    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...@googlegroups.com <javascript:>.
    For more options, visit https://groups.google.com/d/optout.


    --
    __
    --
    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+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedJun 21, '15 at 2:06p
activeJun 21, '15 at 5:05p
posts3
users2
websitegolang.org

2 users in discussion

Evahlis: 2 posts Hyang-Ah Hana Kim: 1 post

People

Translate

site design / logo © 2022 Grokbase