Configurations are separated in files in the folder config
Connection to database by a package to import when needed
Models will be in a model package for better maintenance
Services access to the models
Utils are tools or functions that can be used anywhere
main.go cleaned a bit and other files modifications are there for the above modifications
Added a new Variable SearchForm as an argument to replace the list of arguments (cat,order,status,sort,query)
Added a construction function for it so we can have default values (NewSearchForm() output a SearchForm{} with default values)
Fixed the view template so we show one torrent and not a list
Added a ViewTemplateVariables for the page
Design copied from NyaaTorrents
Reorganised some sql queries
Added dynamic navigation within torrents
Added nesting templates support
Added more variables/functions imported in the templates
Separated templates functions and variables in other files for more clarity
Added a new main function to get Torrents with orderBy parameter
Added a new function to get all torrents with orderBy parameter
Simplifying the other function that get torrents so they pass through one main function that manage db requests.
Commented AutoMigrate functions, it emits warning when you execute it after having migrated once
Changing from plain sql queries to GORM for better maintenance and stability
Use of Models for database tables and added JSON objects
Cleaned a bit the code and added some comments in the files
No CSS and Javascript in the index.html, more easy to maintain the design and the code.
Added a select for the number of item to show and added the new parameter to the SQL query.
Total number of item determined by the SQL query and not fixed.