kristijorgji / goseeder Goto Github PK
View Code? Open in Web Editor NEWGo database seeder inspired from Laravel/Lumen seeder and more
License: MIT License
Go database seeder inspired from Laravel/Lumen seeder and more
License: MIT License
Line 128 in cfffdf1
On the line referenced, the c.env == ""
condition is true for all seeders in the common env, so all seeders get run, that is, including ones that are registered for specific environments.
When I run go run main.go --gseed
, I see
Running all seeders...
[categoriesSeeder] started seeding...
[categoriesSeeder] seeded successfully, duration 9.838459ms
[testCategoriesSeeder] started seeding...
[testCategoriesSeeder] seeded successfully, duration 55.890833ms
This seems contrary to the idea that those seeds are registered to only run in the specified environments.
It seems like the c.env == ""
should be removed ( as you really need both c.env and seeder.env to be "", which is covered by the following c.env == seeder.env
)
Or am I misunderstanding something?
Aside, the c.skipCommon == false
at the end of the line could just be !c.skipCommon
, right?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.