Git Product home page Git Product logo

Comments (8)

masseelch avatar masseelch commented on August 24, 2024 1

Can you run:

go get -u github.com/masseelch/render 
go get -u github.com/liip/sheriff
goimports -w .
go run -mod=mod main.go

I will set up a clean GO_ENV this evening and try to reproduce the issue. Might have something to with cached packages by go get.

from elk.

masseelch avatar masseelch commented on August 24, 2024

Hey @imperiutx, thank you for reaching out and reporting this.

Can you please show me the contents of your go.mod file?

Does goimports -w . add the missing imports?

from elk.

imperiutx avatar imperiutx commented on August 24, 2024

The contents of go.mod file:

module elk-example

go 1.16

require (
entgo.io/ent v0.8.1-0.20210720072308-756517e559eb
github.com/go-chi/chi/v5 v5.0.3
github.com/go-playground/validator/v10 v10.7.0
github.com/leodido/go-urn v1.2.1 // indirect
github.com/lib/pq v1.10.2
go.uber.org/atomic v1.8.0 // indirect
go.uber.org/multierr v1.7.0 // indirect
go.uber.org/zap v1.18.1
golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e // indirect
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c // indirect
golang.org/x/text v0.3.6 // indirect
)

I tried to install goimports but it returned:
go imports -w .
go imports: unknown command

from elk.

masseelch avatar masseelch commented on August 24, 2024

The correct command is goimports instead of go imports. Note the missing space. So in whole:

goimports -w . in the root of your project (most likely elk-example).

from elk.

imperiutx avatar imperiutx commented on August 24, 2024

I'm sorry, my bad. After re-run the commands below, the errors are still there:
➜ elk-example go generate ./...
go: finding module for package github.com/masseelch/elk
go: found github.com/masseelch/elk in github.com/masseelch/elk v0.2.2
➜ elk-example goimports -w .
➜ elk-example go run -mod=mod main.go
# elk-example/ent/http
ent/http/create.go:28:3: undefined: render
ent/http/create.go:42:3: undefined: render
ent/http/create.go:53:4: undefined: render
ent/http/create.go:56:4: undefined: render
ent/http/create.go:60:12: undefined: sheriff
ent/http/create.go:66:3: undefined: render
ent/http/create.go:70:2: undefined: render
ent/http/create.go:84:3: undefined: render
ent/http/create.go:92:3: undefined: render
ent/http/create.go:103:4: undefined: render
ent/http/create.go:103:4: too many errors

from elk.

masseelch avatar masseelch commented on August 24, 2024

Weird 🤔 I'll look into it. Sorry for the inconvenience!

from elk.

imperiutx avatar imperiutx commented on August 24, 2024

After running the above commands, server is running. Thank you for your support

from elk.

masseelch avatar masseelch commented on August 24, 2024

Glad i could help. I will update the post. Thank you again for reporting this!

from elk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.