Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

easyjson didn't generate all data. MFTI/perfomance/json example #373

Open
RomanAvdeenko opened this issue Jun 9, 2022 · 1 comment
Open

Comments

@RomanAvdeenko
Copy link

Hi.
My golang version is go1.18.3 linux/amd64

I ran the command:
rav@PC:~/Go/MFTI/perfomance/json$ easyjson struct.go
And got an error:
# command-line-arguments
main.main: relocation target type.json_test.EasyJSON_exporter_User not defined
Bootstrap failed: exit status 2

File struct_easyjson.go has only lines:
// TEMPORARY AUTOGENERATED FILE: easyjson stub code to make the package
// compilable during generation.

_package main

import (
"github.com/mailru/easyjson/jwriter"
"github.com/mailru/easyjson/jlexer"
)

func ( User ) MarshalJSON() ([]byte, error) { return nil, nil }
func (* User ) UnmarshalJSON([]byte) error { return nil }
func ( User ) MarshalEasyJSON(w jwriter.Writer) {}
func (
User ) UnmarshalEasyJSON(l *jlexer.Lexer) {}

type EasyJSON_exporter_User *User__

@zenoleg
Copy link

zenoleg commented Oct 1, 2022

Try to move your go file into it's own package, It worked for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants