diff --git a/.travis.yml b/.travis.yml index c0a274f1..2bf2f803 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,7 @@ before_install: script: # Downloads deps automatically. No need to add manually. -- go list -f '{{.Deps}}' | tr "[" " " | tr "]" " " | xargs go list -e -f '{{if not .Standard}}{{.ImportPath}}{{end}}' | grep -v 'github.com/ewhal/nyaa' | xargs go get -v +- go list -f '{{.Deps}}' | tr "[" " " | tr "]" " " | xargs go list -e -f '{{if not .Standard}}{{.ImportPath}}{{end}}' | grep -v 'github.com/NyaaPantsu/nyaa' | xargs go get -v - go get - go build - go vet diff --git a/LICENSE.md b/LICENSE.md index a751266c..c0831c37 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,4 +1,4 @@ -Copyright (c) 2016 Eliot Whalan +Copyright (c) 2016 PantsuDev Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in diff --git a/README.md b/README.md index e4644854..7170b4bc 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ![nyanpasu~](https://my.mixtape.moe/aglaxe.png) -# Nyaa replacement [![Build Status](https://travis-ci.org/ewhal/nyaa.svg?branch=master)](https://travis-ci.org/ewhal/nyaa) +# Nyaa replacement [![Build Status](https://travis-ci.org/NyaaPantsu/nyaa.svg?branch=master)](https://travis-ci.org/NyaaPantsu/nyaa) ## Motivation The aim of this project is to write a fully featured nyaa replacement in golang @@ -18,7 +18,7 @@ You can view the public trello board [here](https://trello.com/b/gMJBwoRq/nyaa-p # Installation Ubuntu 17.04 fails to build, use a different OS or docker * Install [Golang](https://golang.org/doc/install) (version >=1.8) -* `go get github.com/ewhal/nyaa` +* `go get github.com/NyaaPantsu/nyaa` * `go build` * Download DB and place it in your root folder named as "nyaa.db" * `./nyaa` @@ -57,7 +57,7 @@ download [dos2unix](https://sourceforge.net/projects/dos2unix/files/latest/downl on the /deploy/init.sh to convert CR+LF to LF. ```sh -# Make sure the project is in here $GOPATH/src/github.com/ewhal/nyaa +# Make sure the project is in here $GOPATH/src/github.com/NyaaPantsu/nyaa $ cd deploy/ # You may choose another backend by pointing to the # appropriate docker-compose file. diff --git a/cache/cache.go b/cache/cache.go index c16a16d9..27291ec0 100644 --- a/cache/cache.go +++ b/cache/cache.go @@ -1,12 +1,12 @@ package cache import ( - "github.com/ewhal/nyaa/cache/memcache" - "github.com/ewhal/nyaa/cache/native" - "github.com/ewhal/nyaa/cache/nop" - "github.com/ewhal/nyaa/common" - "github.com/ewhal/nyaa/config" - "github.com/ewhal/nyaa/model" + "github.com/NyaaPantsu/nyaa/cache/memcache" + "github.com/NyaaPantsu/nyaa/cache/native" + "github.com/NyaaPantsu/nyaa/cache/nop" + "github.com/NyaaPantsu/nyaa/common" + "github.com/NyaaPantsu/nyaa/config" + "github.com/NyaaPantsu/nyaa/model" ) // Cache defines interface for caching search results diff --git a/cache/memcache/memcache.go b/cache/memcache/memcache.go index 57f36d96..7188a4b6 100644 --- a/cache/memcache/memcache.go +++ b/cache/memcache/memcache.go @@ -1,8 +1,8 @@ package memcache import ( - "github.com/ewhal/nyaa/common" - "github.com/ewhal/nyaa/model" + "github.com/NyaaPantsu/nyaa/common" + "github.com/NyaaPantsu/nyaa/model" ) type Memcache struct { diff --git a/cache/native/native.go b/cache/native/native.go index 56c1094c..9442f3d3 100644 --- a/cache/native/native.go +++ b/cache/native/native.go @@ -5,8 +5,8 @@ import ( "sync" "time" - "github.com/ewhal/nyaa/common" - "github.com/ewhal/nyaa/model" + "github.com/NyaaPantsu/nyaa/common" + "github.com/NyaaPantsu/nyaa/model" ) const expiryTime = time.Minute diff --git a/cache/native/native_test.go b/cache/native/native_test.go index 6c977ed4..13a2fb50 100644 --- a/cache/native/native_test.go +++ b/cache/native/native_test.go @@ -4,8 +4,8 @@ import ( "sync" "testing" - "github.com/ewhal/nyaa/common" - "github.com/ewhal/nyaa/model" + "github.com/NyaaPantsu/nyaa/common" + "github.com/NyaaPantsu/nyaa/model" ) // Basic test for deadlocks and race conditions diff --git a/cache/nop/nop.go b/cache/nop/nop.go index 21c10580..85b5234f 100644 --- a/cache/nop/nop.go +++ b/cache/nop/nop.go @@ -1,8 +1,8 @@ package nop import ( - "github.com/ewhal/nyaa/common" - "github.com/ewhal/nyaa/model" + "github.com/NyaaPantsu/nyaa/common" + "github.com/NyaaPantsu/nyaa/model" ) type NopCache struct { diff --git a/database/database.go b/database/database.go index 761adcd9..2059d508 100644 --- a/database/database.go +++ b/database/database.go @@ -1,12 +1,12 @@ package database import ( - "github.com/ewhal/nyaa/common" - "github.com/ewhal/nyaa/config" - "github.com/ewhal/nyaa/database/postgres" - //"github.com/ewhal/nyaa/db/sqlite" - "github.com/ewhal/nyaa/model" - "github.com/ewhal/nyaa/util/log" + "github.com/NyaaPantsu/nyaa/common" + "github.com/NyaaPantsu/nyaa/config" + "github.com/NyaaPantsu/nyaa/database/postgres" + //"github.com/NyaaPantsu/nyaa/db/sqlite" + "github.com/NyaaPantsu/nyaa/model" + "github.com/NyaaPantsu/nyaa/util/log" "errors" ) diff --git a/database/postgres/comments.go b/database/postgres/comments.go index 3a31c8e3..b4feec0a 100644 --- a/database/postgres/comments.go +++ b/database/postgres/comments.go @@ -1,8 +1,8 @@ package postgres import ( - "github.com/ewhal/nyaa/common" - "github.com/ewhal/nyaa/model" + "github.com/NyaaPantsu/nyaa/common" + "github.com/NyaaPantsu/nyaa/model" ) func (db *Database) InsertComment(comment *model.Comment) (err error) { diff --git a/database/postgres/postgres.go b/database/postgres/postgres.go index e235ec4b..4cb7fcb6 100644 --- a/database/postgres/postgres.go +++ b/database/postgres/postgres.go @@ -3,7 +3,7 @@ package postgres import ( "database/sql" - "github.com/ewhal/nyaa/util/log" + "github.com/NyaaPantsu/nyaa/util/log" _ "github.com/lib/pq" ) diff --git a/database/postgres/report.go b/database/postgres/report.go index e1f6a925..a8665354 100644 --- a/database/postgres/report.go +++ b/database/postgres/report.go @@ -4,8 +4,8 @@ import ( "database/sql" "fmt" - "github.com/ewhal/nyaa/common" - "github.com/ewhal/nyaa/model" + "github.com/NyaaPantsu/nyaa/common" + "github.com/NyaaPantsu/nyaa/model" ) func (db *Database) InsertTorrentReport(report *model.TorrentReport) (err error) { diff --git a/database/postgres/scrape.go b/database/postgres/scrape.go index 3a81daeb..db37ca8c 100644 --- a/database/postgres/scrape.go +++ b/database/postgres/scrape.go @@ -2,7 +2,7 @@ package postgres import ( "database/sql" - "github.com/ewhal/nyaa/common" + "github.com/NyaaPantsu/nyaa/common" ) func (db *Database) RecordScrapes(scrape []common.ScrapeResult) (err error) { diff --git a/database/postgres/statements.go b/database/postgres/statements.go index 58ee6ba7..923e53f8 100644 --- a/database/postgres/statements.go +++ b/database/postgres/statements.go @@ -4,7 +4,7 @@ import ( "database/sql" "fmt" - "github.com/ewhal/nyaa/model" + "github.com/NyaaPantsu/nyaa/model" ) const queryGetAllTorrents = "GetAllTorrents" diff --git a/database/postgres/torrent.go b/database/postgres/torrent.go index bd3e932a..77bfc690 100644 --- a/database/postgres/torrent.go +++ b/database/postgres/torrent.go @@ -1,7 +1,7 @@ package postgres import ( - "github.com/ewhal/nyaa/model" + "github.com/NyaaPantsu/nyaa/model" "database/sql" ) diff --git a/database/postgres/user.go b/database/postgres/user.go index f7f420ae..92c3aa44 100644 --- a/database/postgres/user.go +++ b/database/postgres/user.go @@ -4,8 +4,8 @@ import ( "database/sql" "fmt" - "github.com/ewhal/nyaa/common" - "github.com/ewhal/nyaa/model" + "github.com/NyaaPantsu/nyaa/common" + "github.com/NyaaPantsu/nyaa/model" ) func userParamToSelectQuery(p *common.UserParam) (q sqlQuery) { diff --git a/database/postgres/where.go b/database/postgres/where.go index 845c55be..8f52d9e8 100644 --- a/database/postgres/where.go +++ b/database/postgres/where.go @@ -5,8 +5,8 @@ import ( "fmt" "strings" - "github.com/ewhal/nyaa/common" - "github.com/ewhal/nyaa/model" + "github.com/NyaaPantsu/nyaa/common" + "github.com/NyaaPantsu/nyaa/model" ) // build sql query from SearchParam for torrent search diff --git a/db/gorm.go b/db/gorm.go index 74c42a07..ebe2fd43 100644 --- a/db/gorm.go +++ b/db/gorm.go @@ -1,10 +1,10 @@ package db import ( + "github.com/NyaaPantsu/nyaa/config" + "github.com/NyaaPantsu/nyaa/model" + "github.com/NyaaPantsu/nyaa/util/log" "github.com/azhao12345/gorm" - "github.com/ewhal/nyaa/config" - "github.com/ewhal/nyaa/model" - "github.com/ewhal/nyaa/util/log" _ "github.com/jinzhu/gorm/dialects/postgres" _ "github.com/jinzhu/gorm/dialects/sqlite" ) diff --git a/db/gorm_test.go b/db/gorm_test.go index ec61824a..f5073c4c 100644 --- a/db/gorm_test.go +++ b/db/gorm_test.go @@ -4,8 +4,8 @@ import ( "fmt" "testing" + "github.com/NyaaPantsu/nyaa/config" "github.com/azhao12345/gorm" - "github.com/ewhal/nyaa/config" ) type errorLogger struct { @@ -54,7 +54,7 @@ func TestGormInitSqlite(t *testing.T) { // - psql -c "CREATE USER nyaapantsu WITH PASSWORD 'nyaapantsu';" -U postgres // // Then enable the test by setting this variable to "true" via ldflags: -// go test ./... -v -ldflags="-X github.com/ewhal/nyaa/db.testPostgres=true" +// go test ./... -v -ldflags="-X github.com/NyaaPantsu/nyaa/db.testPostgres=true" var testPostgres = "false" func TestGormInitPostgres(t *testing.T) { diff --git a/deploy/init.sh b/deploy/init.sh index 88e21f10..b42cd08c 100755 --- a/deploy/init.sh +++ b/deploy/init.sh @@ -8,7 +8,7 @@ if [[ "${PANTSU_DBTYPE}" = "postgres" ]]; then sleep 40 fi -go get github.com/ewhal/nyaa +go get github.com/NyaaPantsu/nyaa go build ./nyaa -host 0.0.0.0 \ -port "${PANTSU_INTERNAL_PORT}" \ diff --git a/main.go b/main.go index 6f38db24..373a0145 100644 --- a/main.go +++ b/main.go @@ -8,18 +8,18 @@ import ( "os" "time" - "github.com/ewhal/nyaa/cache" - "github.com/ewhal/nyaa/config" - "github.com/ewhal/nyaa/db" - "github.com/ewhal/nyaa/network" - "github.com/ewhal/nyaa/router" - "github.com/ewhal/nyaa/service/scraper" - "github.com/ewhal/nyaa/service/torrent/metainfoFetcher" - "github.com/ewhal/nyaa/service/user" - "github.com/ewhal/nyaa/util/languages" - "github.com/ewhal/nyaa/util/log" - "github.com/ewhal/nyaa/util/search" - "github.com/ewhal/nyaa/util/signals" + "github.com/NyaaPantsu/nyaa/cache" + "github.com/NyaaPantsu/nyaa/config" + "github.com/NyaaPantsu/nyaa/db" + "github.com/NyaaPantsu/nyaa/network" + "github.com/NyaaPantsu/nyaa/router" + "github.com/NyaaPantsu/nyaa/service/scraper" + "github.com/NyaaPantsu/nyaa/service/torrent/metainfoFetcher" + "github.com/NyaaPantsu/nyaa/service/user" + "github.com/NyaaPantsu/nyaa/util/languages" + "github.com/NyaaPantsu/nyaa/util/log" + "github.com/NyaaPantsu/nyaa/util/search" + "github.com/NyaaPantsu/nyaa/util/signals" ) // RunServer runs webapp mainloop diff --git a/model/comment.go b/model/comment.go index fa57e535..22d97667 100644 --- a/model/comment.go +++ b/model/comment.go @@ -1,7 +1,7 @@ package model import ( - "github.com/ewhal/nyaa/config" + "github.com/NyaaPantsu/nyaa/config" "time" ) diff --git a/model/torrent.go b/model/torrent.go index b7669e53..61b88b33 100644 --- a/model/torrent.go +++ b/model/torrent.go @@ -1,8 +1,8 @@ package model import ( - "github.com/ewhal/nyaa/config" - "github.com/ewhal/nyaa/util" + "github.com/NyaaPantsu/nyaa/config" + "github.com/NyaaPantsu/nyaa/util" "fmt" "html/template" @@ -132,10 +132,10 @@ func (t *Torrent) ToJSON() TorrentJSON { commentsJSON = append(commentsJSON, CommentJSON{Username: c.Username, UserID: -1, Content: template.HTML(c.Content), Date: c.Date.UTC()}) } for _, c := range t.Comments { - if (c.User != nil) { - commentsJSON = append(commentsJSON, CommentJSON{Username: c.User.Username, UserID: int(c.User.ID), Content: util.MarkdownToHTML(c.Content), Date: c.CreatedAt.UTC()}) + if c.User != nil { + commentsJSON = append(commentsJSON, CommentJSON{Username: c.User.Username, UserID: int(c.User.ID), Content: util.MarkdownToHTML(c.Content), Date: c.CreatedAt.UTC()}) } else { - commentsJSON = append(commentsJSON, CommentJSON{}) + commentsJSON = append(commentsJSON, CommentJSON{}) } } fileListJSON := make([]FileJSON, 0, len(t.FileList)) diff --git a/network/network.go b/network/network.go index 58ad8eb3..3ff1138d 100644 --- a/network/network.go +++ b/network/network.go @@ -2,8 +2,8 @@ package network import ( "fmt" - "github.com/ewhal/nyaa/config" - "github.com/ewhal/nyaa/util/log" + "github.com/NyaaPantsu/nyaa/config" + "github.com/NyaaPantsu/nyaa/util/log" "github.com/majestrate/i2p-tools/lib/i2p" "net" ) diff --git a/router/apiHandler.go b/router/apiHandler.go index 548b0862..6c2b4e6c 100644 --- a/router/apiHandler.go +++ b/router/apiHandler.go @@ -9,14 +9,14 @@ import ( "strings" "time" - "github.com/ewhal/nyaa/config" - "github.com/ewhal/nyaa/db" - "github.com/ewhal/nyaa/model" - "github.com/ewhal/nyaa/service" - "github.com/ewhal/nyaa/service/api" - "github.com/ewhal/nyaa/service/torrent" - "github.com/ewhal/nyaa/util" - "github.com/ewhal/nyaa/util/log" + "github.com/NyaaPantsu/nyaa/config" + "github.com/NyaaPantsu/nyaa/db" + "github.com/NyaaPantsu/nyaa/model" + "github.com/NyaaPantsu/nyaa/service" + "github.com/NyaaPantsu/nyaa/service/api" + "github.com/NyaaPantsu/nyaa/service/torrent" + "github.com/NyaaPantsu/nyaa/util" + "github.com/NyaaPantsu/nyaa/util/log" "github.com/gorilla/mux" ) diff --git a/router/changeLanguageHandler.go b/router/changeLanguageHandler.go index 9bef6d58..b28fbd75 100644 --- a/router/changeLanguageHandler.go +++ b/router/changeLanguageHandler.go @@ -1,16 +1,16 @@ -package router; +package router import ( "encoding/json" "net/http" - "github.com/ewhal/nyaa/util/languages" - "github.com/ewhal/nyaa/service/user" + "github.com/NyaaPantsu/nyaa/service/user" + "github.com/NyaaPantsu/nyaa/util/languages" "github.com/gorilla/mux" ) type LanguagesJSONResponse struct { - Current string `json:"current"` + Current string `json:"current"` Languages map[string]string `json:"languages"` } @@ -59,4 +59,3 @@ func ChangeLanguageHandler(w http.ResponseWriter, r *http.Request) { url, _ := Router.Get("home").URL() http.Redirect(w, r, url.String(), http.StatusSeeOther) } - diff --git a/router/faqHandler.go b/router/faqHandler.go index 0dd20f1e..dd2d3e73 100644 --- a/router/faqHandler.go +++ b/router/faqHandler.go @@ -3,7 +3,7 @@ package router import ( "net/http" - "github.com/ewhal/nyaa/util/languages" + "github.com/NyaaPantsu/nyaa/util/languages" "github.com/gorilla/mux" ) diff --git a/router/homeHandler.go b/router/homeHandler.go index 464e8f99..91acd94c 100644 --- a/router/homeHandler.go +++ b/router/homeHandler.go @@ -5,13 +5,13 @@ import ( "net/http" "strconv" - "github.com/ewhal/nyaa/cache" - "github.com/ewhal/nyaa/common" - "github.com/ewhal/nyaa/model" - "github.com/ewhal/nyaa/service/torrent" - "github.com/ewhal/nyaa/util" - "github.com/ewhal/nyaa/util/languages" - "github.com/ewhal/nyaa/util/log" + "github.com/NyaaPantsu/nyaa/cache" + "github.com/NyaaPantsu/nyaa/common" + "github.com/NyaaPantsu/nyaa/model" + "github.com/NyaaPantsu/nyaa/service/torrent" + "github.com/NyaaPantsu/nyaa/util" + "github.com/NyaaPantsu/nyaa/util/languages" + "github.com/NyaaPantsu/nyaa/util/log" "github.com/gorilla/mux" ) diff --git a/router/modpanel.go b/router/modpanel.go index 2f4ce0d5..f947d270 100644 --- a/router/modpanel.go +++ b/router/modpanel.go @@ -7,18 +7,18 @@ import ( "strconv" "strings" - "github.com/ewhal/nyaa/db" - "github.com/ewhal/nyaa/model" - "github.com/ewhal/nyaa/service" - "github.com/ewhal/nyaa/service/comment" - "github.com/ewhal/nyaa/service/report" - "github.com/ewhal/nyaa/service/torrent" - "github.com/ewhal/nyaa/service/user" - form "github.com/ewhal/nyaa/service/user/form" - "github.com/ewhal/nyaa/service/user/permission" - "github.com/ewhal/nyaa/util/languages" - "github.com/ewhal/nyaa/util/log" - "github.com/ewhal/nyaa/util/search" + "github.com/NyaaPantsu/nyaa/db" + "github.com/NyaaPantsu/nyaa/model" + "github.com/NyaaPantsu/nyaa/service" + "github.com/NyaaPantsu/nyaa/service/comment" + "github.com/NyaaPantsu/nyaa/service/report" + "github.com/NyaaPantsu/nyaa/service/torrent" + "github.com/NyaaPantsu/nyaa/service/user" + form "github.com/NyaaPantsu/nyaa/service/user/form" + "github.com/NyaaPantsu/nyaa/service/user/permission" + "github.com/NyaaPantsu/nyaa/util/languages" + "github.com/NyaaPantsu/nyaa/util/log" + "github.com/NyaaPantsu/nyaa/util/search" "github.com/gorilla/mux" ) diff --git a/router/notFoundHandler.go b/router/notFoundHandler.go index 82e95386..8bbfe6c5 100644 --- a/router/notFoundHandler.go +++ b/router/notFoundHandler.go @@ -3,7 +3,7 @@ package router import ( "net/http" - "github.com/ewhal/nyaa/util/languages" + "github.com/NyaaPantsu/nyaa/util/languages" "github.com/gorilla/mux" ) diff --git a/router/router.go b/router/router.go index c90c3d17..ab420f9a 100755 --- a/router/router.go +++ b/router/router.go @@ -3,7 +3,7 @@ package router import ( "net/http" - "github.com/ewhal/nyaa/service/captcha" + "github.com/NyaaPantsu/nyaa/service/captcha" // "github.com/gorilla/handlers" "github.com/gorilla/mux" ) @@ -22,34 +22,34 @@ func init() { gzipUserProfileHandler := http.HandlerFunc(UserProfileHandler) gzipUserDetailsHandler := http.HandlerFunc(UserDetailsHandler) gzipUserProfileFormHandler := http.HandlerFunc(UserProfileFormHandler) -/* - // Enable GZIP compression for all handlers except imgHandler and captcha - gzipCSSHandler := cssHandler) - gzipJSHandler:= jsHandler) - gzipSearchHandler:= http.HandlerFunc(SearchHandler) - gzipAPIUploadHandler := http.HandlerFunc(ApiUploadHandler) - gzipAPIUpdateHandler := http.HandlerFunc(ApiUpdateHandler) - gzipFaqHandler := http.HandlerFunc(FaqHandler) - gzipRSSHandler := http.HandlerFunc(RSSHandler) - gzipUploadHandler := http.HandlerFunc(UploadHandler) - gzipUserRegisterFormHandler := http.HandlerFunc(UserRegisterFormHandler) - gzipUserLoginFormHandler := http.HandlerFunc(UserLoginFormHandler) - gzipUserVerifyEmailHandler := http.HandlerFunc(UserVerifyEmailHandler) - gzipUserRegisterPostHandler := http.HandlerFunc(UserRegisterPostHandler) - gzipUserLoginPostHandler := http.HandlerFunc(UserLoginPostHandler) - gzipUserLogoutHandler := http.HandlerFunc(UserLogoutHandler) - gzipUserFollowHandler := http.HandlerFunc(UserFollowHandler) + /* + // Enable GZIP compression for all handlers except imgHandler and captcha + gzipCSSHandler := cssHandler) + gzipJSHandler:= jsHandler) + gzipSearchHandler:= http.HandlerFunc(SearchHandler) + gzipAPIUploadHandler := http.HandlerFunc(ApiUploadHandler) + gzipAPIUpdateHandler := http.HandlerFunc(ApiUpdateHandler) + gzipFaqHandler := http.HandlerFunc(FaqHandler) + gzipRSSHandler := http.HandlerFunc(RSSHandler) + gzipUploadHandler := http.HandlerFunc(UploadHandler) + gzipUserRegisterFormHandler := http.HandlerFunc(UserRegisterFormHandler) + gzipUserLoginFormHandler := http.HandlerFunc(UserLoginFormHandler) + gzipUserVerifyEmailHandler := http.HandlerFunc(UserVerifyEmailHandler) + gzipUserRegisterPostHandler := http.HandlerFunc(UserRegisterPostHandler) + gzipUserLoginPostHandler := http.HandlerFunc(UserLoginPostHandler) + gzipUserLogoutHandler := http.HandlerFunc(UserLogoutHandler) + gzipUserFollowHandler := http.HandlerFunc(UserFollowHandler) - gzipIndexModPanel := http.HandlerFunc(IndexModPanel) - gzipTorrentsListPanel := http.HandlerFunc(TorrentsListPanel) - gzipTorrentReportListPanel := http.HandlerFunc(TorrentReportListPanel) - gzipUsersListPanel := http.HandlerFunc(UsersListPanel) - gzipCommentsListPanel := http.HandlerFunc(CommentsListPanel) - gzipTorrentEditModPanel := http.HandlerFunc(TorrentEditModPanel) - gzipTorrentPostEditModPanel := http.HandlerFunc(TorrentPostEditModPanel) - gzipCommentDeleteModPanel := http.HandlerFunc(CommentDeleteModPanel) - gzipTorrentDeleteModPanel := http.HandlerFunc(TorrentDeleteModPanel) - gzipTorrentReportDeleteModPanel := http.HandlerFunc(TorrentReportDeleteModPanel)*/ + gzipIndexModPanel := http.HandlerFunc(IndexModPanel) + gzipTorrentsListPanel := http.HandlerFunc(TorrentsListPanel) + gzipTorrentReportListPanel := http.HandlerFunc(TorrentReportListPanel) + gzipUsersListPanel := http.HandlerFunc(UsersListPanel) + gzipCommentsListPanel := http.HandlerFunc(CommentsListPanel) + gzipTorrentEditModPanel := http.HandlerFunc(TorrentEditModPanel) + gzipTorrentPostEditModPanel := http.HandlerFunc(TorrentPostEditModPanel) + gzipCommentDeleteModPanel := http.HandlerFunc(CommentDeleteModPanel) + gzipTorrentDeleteModPanel := http.HandlerFunc(TorrentDeleteModPanel) + gzipTorrentReportDeleteModPanel := http.HandlerFunc(TorrentReportDeleteModPanel)*/ //gzipTorrentReportCreateHandler := http.HandlerFunc(CreateTorrentReportHandler) //gzipTorrentReportDeleteHandler := http.HandlerFunc(DeleteTorrentReportHandler) diff --git a/router/rssHandler.go b/router/rssHandler.go index 6bde08f3..5f036ab9 100644 --- a/router/rssHandler.go +++ b/router/rssHandler.go @@ -1,11 +1,11 @@ package router import ( - "github.com/ewhal/nyaa/config" - "github.com/ewhal/nyaa/util" - "github.com/ewhal/nyaa/util/search" - "github.com/gorilla/mux" + "github.com/NyaaPantsu/nyaa/config" + "github.com/NyaaPantsu/nyaa/util" + "github.com/NyaaPantsu/nyaa/util/search" "github.com/gorilla/feeds" + "github.com/gorilla/mux" "html" "net/http" "strconv" @@ -15,7 +15,7 @@ import ( func RSSHandler(w http.ResponseWriter, r *http.Request) { vars := mux.Vars(r) page := vars["page"] - + var err error pagenum := 1 if page != "" { diff --git a/router/searchHandler.go b/router/searchHandler.go index e9edcaea..00546870 100644 --- a/router/searchHandler.go +++ b/router/searchHandler.go @@ -1,11 +1,11 @@ package router import ( - "github.com/ewhal/nyaa/model" - "github.com/ewhal/nyaa/util" - "github.com/ewhal/nyaa/util/languages" - "github.com/ewhal/nyaa/util/log" - "github.com/ewhal/nyaa/util/search" + "github.com/NyaaPantsu/nyaa/model" + "github.com/NyaaPantsu/nyaa/util" + "github.com/NyaaPantsu/nyaa/util/languages" + "github.com/NyaaPantsu/nyaa/util/log" + "github.com/NyaaPantsu/nyaa/util/search" "github.com/gorilla/mux" "html" "net/http" diff --git a/router/templateFunctions.go b/router/templateFunctions.go index 5bbb1939..c489fde6 100644 --- a/router/templateFunctions.go +++ b/router/templateFunctions.go @@ -7,9 +7,9 @@ import ( "net/url" "strconv" - "github.com/ewhal/nyaa/config" - "github.com/ewhal/nyaa/service/user/permission" - "github.com/ewhal/nyaa/util/languages" + "github.com/NyaaPantsu/nyaa/config" + "github.com/NyaaPantsu/nyaa/service/user/permission" + "github.com/NyaaPantsu/nyaa/util/languages" "github.com/nicksnyder/go-i18n/i18n" ) diff --git a/router/templateVariables.go b/router/templateVariables.go index c6f5d9c0..e7a858b4 100644 --- a/router/templateVariables.go +++ b/router/templateVariables.go @@ -4,10 +4,10 @@ import ( "net/http" "net/url" - "github.com/ewhal/nyaa/common" - "github.com/ewhal/nyaa/model" - "github.com/ewhal/nyaa/service/user" - userForms "github.com/ewhal/nyaa/service/user/form" + "github.com/NyaaPantsu/nyaa/common" + "github.com/NyaaPantsu/nyaa/model" + "github.com/NyaaPantsu/nyaa/service/user" + userForms "github.com/NyaaPantsu/nyaa/service/user/form" "github.com/gorilla/mux" ) @@ -188,7 +188,7 @@ type PanelTorrentReassignVbs struct { */ type Navigation struct { TotalItem int - MaxItemPerPage int // FIXME: shouldn't this be in SearchForm? + MaxItemPerPage int // FIXME: shouldn't this be in SearchForm? CurrentPage int Route string } diff --git a/router/torrentReportHandler.go b/router/torrentReportHandler.go index 92f61d58..e0199dcc 100644 --- a/router/torrentReportHandler.go +++ b/router/torrentReportHandler.go @@ -4,9 +4,9 @@ package router "net/http" "strconv" - "github.com/ewhal/nyaa/model" - "github.com/ewhal/nyaa/service/moderation" - "github.com/ewhal/nyaa/service/user/permission" + "github.com/NyaaPantsu/nyaa/model" + "github.com/NyaaPantsu/nyaa/service/moderation" + "github.com/NyaaPantsu/nyaa/service/user/permission" "github.com/gorilla/mux" )*/ diff --git a/router/upload.go b/router/upload.go index 2ec9f05f..5deb2b31 100644 --- a/router/upload.go +++ b/router/upload.go @@ -15,11 +15,11 @@ import ( "strconv" "strings" - "github.com/ewhal/nyaa/cache" - "github.com/ewhal/nyaa/config" - "github.com/ewhal/nyaa/service/upload" - "github.com/ewhal/nyaa/util" - "github.com/ewhal/nyaa/util/metainfo" + "github.com/NyaaPantsu/nyaa/cache" + "github.com/NyaaPantsu/nyaa/config" + "github.com/NyaaPantsu/nyaa/service/upload" + "github.com/NyaaPantsu/nyaa/util" + "github.com/NyaaPantsu/nyaa/util/metainfo" "github.com/microcosm-cc/bluemonday" "github.com/zeebo/bencode" ) @@ -158,12 +158,12 @@ func (f *UploadForm) ExtractInfo(r *http.Request) error { // extract filesize f.Filesize = int64(torrent.TotalSize()) - + // extract filelist fileInfos := torrent.Info.GetFiles() for _, fileInfo := range fileInfos { f.FileList = append(f.FileList, UploadedFile{ - Path: fileInfo.Path, + Path: fileInfo.Path, Filesize: int64(fileInfo.Length), }) } diff --git a/router/uploadHandler.go b/router/uploadHandler.go index de6add14..018d447b 100644 --- a/router/uploadHandler.go +++ b/router/uploadHandler.go @@ -6,12 +6,12 @@ import ( "strconv" "time" - "github.com/ewhal/nyaa/config" - "github.com/ewhal/nyaa/db" - "github.com/ewhal/nyaa/model" - "github.com/ewhal/nyaa/service/captcha" - "github.com/ewhal/nyaa/service/user/permission" - "github.com/ewhal/nyaa/util/languages" + "github.com/NyaaPantsu/nyaa/config" + "github.com/NyaaPantsu/nyaa/db" + "github.com/NyaaPantsu/nyaa/model" + "github.com/NyaaPantsu/nyaa/service/captcha" + "github.com/NyaaPantsu/nyaa/service/user/permission" + "github.com/NyaaPantsu/nyaa/util/languages" "github.com/gorilla/mux" ) diff --git a/router/userHandler.go b/router/userHandler.go index a2cb0755..6744559a 100755 --- a/router/userHandler.go +++ b/router/userHandler.go @@ -5,13 +5,13 @@ import ( "net/http" "strconv" - "github.com/ewhal/nyaa/model" - "github.com/ewhal/nyaa/service/captcha" - "github.com/ewhal/nyaa/service/user" - "github.com/ewhal/nyaa/service/user/form" - "github.com/ewhal/nyaa/service/user/permission" - "github.com/ewhal/nyaa/util/languages" - "github.com/ewhal/nyaa/util/modelHelper" + "github.com/NyaaPantsu/nyaa/model" + "github.com/NyaaPantsu/nyaa/service/captcha" + "github.com/NyaaPantsu/nyaa/service/user" + "github.com/NyaaPantsu/nyaa/service/user/form" + "github.com/NyaaPantsu/nyaa/service/user/permission" + "github.com/NyaaPantsu/nyaa/util/languages" + "github.com/NyaaPantsu/nyaa/util/modelHelper" "github.com/gorilla/mux" ) diff --git a/router/viewTorrentHandler.go b/router/viewTorrentHandler.go index 739c077d..13026f77 100644 --- a/router/viewTorrentHandler.go +++ b/router/viewTorrentHandler.go @@ -6,14 +6,14 @@ import ( "strings" "time" - "github.com/ewhal/nyaa/db" - "github.com/ewhal/nyaa/model" - "github.com/ewhal/nyaa/service/captcha" - "github.com/ewhal/nyaa/service/torrent" - "github.com/ewhal/nyaa/service/user/permission" - "github.com/ewhal/nyaa/util" - "github.com/ewhal/nyaa/util/languages" - "github.com/ewhal/nyaa/util/log" + "github.com/NyaaPantsu/nyaa/db" + "github.com/NyaaPantsu/nyaa/model" + "github.com/NyaaPantsu/nyaa/service/captcha" + "github.com/NyaaPantsu/nyaa/service/torrent" + "github.com/NyaaPantsu/nyaa/service/user/permission" + "github.com/NyaaPantsu/nyaa/util" + "github.com/NyaaPantsu/nyaa/util/languages" + "github.com/NyaaPantsu/nyaa/util/log" "github.com/gorilla/mux" ) diff --git a/service/api/api.go b/service/api/api.go index 268ee80c..3c789cb0 100644 --- a/service/api/api.go +++ b/service/api/api.go @@ -12,10 +12,10 @@ import ( "regexp" "strings" - "github.com/ewhal/nyaa/model" - "github.com/ewhal/nyaa/service" - "github.com/ewhal/nyaa/service/upload" - "github.com/ewhal/nyaa/util/metainfo" + "github.com/NyaaPantsu/nyaa/model" + "github.com/NyaaPantsu/nyaa/service" + "github.com/NyaaPantsu/nyaa/service/upload" + "github.com/NyaaPantsu/nyaa/util/metainfo" "github.com/zeebo/bencode" ) diff --git a/service/comment/comment.go b/service/comment/comment.go index 2ac4f3df..5e2a5567 100644 --- a/service/comment/comment.go +++ b/service/comment/comment.go @@ -1,9 +1,9 @@ package commentService import ( - "github.com/ewhal/nyaa/config" - "github.com/ewhal/nyaa/db" - "github.com/ewhal/nyaa/model" + "github.com/NyaaPantsu/nyaa/config" + "github.com/NyaaPantsu/nyaa/db" + "github.com/NyaaPantsu/nyaa/model" ) func GetAllComments(limit int, offset int, conditions string, values ...interface{}) ([]model.Comment, int) { diff --git a/service/report/report.go b/service/report/report.go index 7b32eba1..4d16eb6c 100644 --- a/service/report/report.go +++ b/service/report/report.go @@ -6,9 +6,9 @@ import ( "strconv" "strings" - "github.com/ewhal/nyaa/db" - "github.com/ewhal/nyaa/model" - "github.com/ewhal/nyaa/service" + "github.com/NyaaPantsu/nyaa/db" + "github.com/NyaaPantsu/nyaa/model" + "github.com/NyaaPantsu/nyaa/service" ) // Return torrentReport in case we did modified it (ie: CreatedAt field) diff --git a/service/scraper/bucket.go b/service/scraper/bucket.go index bf8c34f9..b6a0cdcc 100644 --- a/service/scraper/bucket.go +++ b/service/scraper/bucket.go @@ -5,7 +5,7 @@ import ( "net" "sync" - "github.com/ewhal/nyaa/model" + "github.com/NyaaPantsu/nyaa/model" ) const InitialConnectionID = 0x41727101980 diff --git a/service/scraper/scraper.go b/service/scraper/scraper.go index 482c9540..96aadc0f 100644 --- a/service/scraper/scraper.go +++ b/service/scraper/scraper.go @@ -1,10 +1,10 @@ package scraperService import ( - "github.com/ewhal/nyaa/config" - "github.com/ewhal/nyaa/db" - "github.com/ewhal/nyaa/model" - "github.com/ewhal/nyaa/util/log" + "github.com/NyaaPantsu/nyaa/config" + "github.com/NyaaPantsu/nyaa/db" + "github.com/NyaaPantsu/nyaa/model" + "github.com/NyaaPantsu/nyaa/util/log" "net" "net/url" "time" diff --git a/service/scraper/transaction.go b/service/scraper/transaction.go index fb698769..c517b2f9 100644 --- a/service/scraper/transaction.go +++ b/service/scraper/transaction.go @@ -6,10 +6,10 @@ import ( "net" "time" - "github.com/ewhal/nyaa/config" - "github.com/ewhal/nyaa/db" - "github.com/ewhal/nyaa/model" - "github.com/ewhal/nyaa/util/log" + "github.com/NyaaPantsu/nyaa/config" + "github.com/NyaaPantsu/nyaa/db" + "github.com/NyaaPantsu/nyaa/model" + "github.com/NyaaPantsu/nyaa/util/log" ) // TransactionTimeout 30 second timeout for transactions diff --git a/service/torrent/metainfoFetcher/metainfoFetcher.go b/service/torrent/metainfoFetcher/metainfoFetcher.go index 912a67e7..2c492896 100644 --- a/service/torrent/metainfoFetcher/metainfoFetcher.go +++ b/service/torrent/metainfoFetcher/metainfoFetcher.go @@ -1,14 +1,14 @@ package metainfoFetcher import ( + "github.com/NyaaPantsu/nyaa/config" + "github.com/NyaaPantsu/nyaa/db" + "github.com/NyaaPantsu/nyaa/model" + serviceBase "github.com/NyaaPantsu/nyaa/service" + torrentService "github.com/NyaaPantsu/nyaa/service/torrent" + "github.com/NyaaPantsu/nyaa/util/log" "github.com/anacrolix/torrent" "github.com/anacrolix/torrent/metainfo" - "github.com/ewhal/nyaa/config" - "github.com/ewhal/nyaa/db" - "github.com/ewhal/nyaa/model" - serviceBase "github.com/ewhal/nyaa/service" - torrentService "github.com/ewhal/nyaa/service/torrent" - "github.com/ewhal/nyaa/util/log" "golang.org/x/time/rate" "math" "sync" diff --git a/service/torrent/metainfoFetcher/operation.go b/service/torrent/metainfoFetcher/operation.go index 92eada2e..7b9e035f 100644 --- a/service/torrent/metainfoFetcher/operation.go +++ b/service/torrent/metainfoFetcher/operation.go @@ -1,19 +1,19 @@ -package metainfoFetcher; +package metainfoFetcher import ( - "github.com/anacrolix/torrent/metainfo" - "github.com/ewhal/nyaa/config" - "github.com/ewhal/nyaa/model" - "github.com/ewhal/nyaa/util" "errors" - "time" + "github.com/NyaaPantsu/nyaa/config" + "github.com/NyaaPantsu/nyaa/model" + "github.com/NyaaPantsu/nyaa/util" + "github.com/anacrolix/torrent/metainfo" "strings" + "time" ) type FetchOperation struct { - fetcher *MetainfoFetcher - torrent model.Torrent - done chan int + fetcher *MetainfoFetcher + torrent model.Torrent + done chan int } type Result struct { @@ -24,9 +24,9 @@ type Result struct { func NewFetchOperation(fetcher *MetainfoFetcher, dbEntry model.Torrent) (op *FetchOperation) { op = &FetchOperation{ - fetcher: fetcher, - torrent: dbEntry, - done: make(chan int, 1), + fetcher: fetcher, + torrent: dbEntry, + done: make(chan int, 1), } return } @@ -56,5 +56,3 @@ func (op *FetchOperation) Start(out chan Result) { break } } - - diff --git a/service/torrent/metainfoFetcher/operation_test.go b/service/torrent/metainfoFetcher/operation_test.go index 1be73474..5e3babcd 100644 --- a/service/torrent/metainfoFetcher/operation_test.go +++ b/service/torrent/metainfoFetcher/operation_test.go @@ -1,10 +1,10 @@ -package metainfoFetcher; +package metainfoFetcher import ( "testing" + "github.com/NyaaPantsu/nyaa/model" "github.com/anacrolix/torrent" - "github.com/ewhal/nyaa/model" ) func TestInvalidHash(t *testing.T) { @@ -14,9 +14,9 @@ func TestInvalidHash(t *testing.T) { } fetcher := &MetainfoFetcher{ - timeout: 5, + timeout: 5, torrentClient: client, - results: make(chan Result, 1), + results: make(chan Result, 1), } dbEntry := model.Torrent{ @@ -42,4 +42,3 @@ func TestInvalidHash(t *testing.T) { t.Logf("Got error %s, shouldn't be timeout", res.err) } - diff --git a/service/torrent/torrent.go b/service/torrent/torrent.go index dac2f303..1c41e88b 100644 --- a/service/torrent/torrent.go +++ b/service/torrent/torrent.go @@ -6,11 +6,11 @@ import ( "strconv" "strings" - "github.com/ewhal/nyaa/config" - "github.com/ewhal/nyaa/db" - "github.com/ewhal/nyaa/model" - "github.com/ewhal/nyaa/service" - "github.com/ewhal/nyaa/util" + "github.com/NyaaPantsu/nyaa/config" + "github.com/NyaaPantsu/nyaa/db" + "github.com/NyaaPantsu/nyaa/model" + "github.com/NyaaPantsu/nyaa/service" + "github.com/NyaaPantsu/nyaa/util" ) /* Function to interact with Models diff --git a/service/user/cookieHelper.go b/service/user/cookieHelper.go index 940d5b3d..12290abc 100644 --- a/service/user/cookieHelper.go +++ b/service/user/cookieHelper.go @@ -2,11 +2,11 @@ package userService import ( "errors" - "github.com/ewhal/nyaa/db" - "github.com/ewhal/nyaa/model" - formStruct "github.com/ewhal/nyaa/service/user/form" - "github.com/ewhal/nyaa/util/modelHelper" - "github.com/ewhal/nyaa/util/timeHelper" + "github.com/NyaaPantsu/nyaa/db" + "github.com/NyaaPantsu/nyaa/model" + formStruct "github.com/NyaaPantsu/nyaa/service/user/form" + "github.com/NyaaPantsu/nyaa/util/modelHelper" + "github.com/NyaaPantsu/nyaa/util/timeHelper" "github.com/gorilla/securecookie" "golang.org/x/crypto/bcrypt" "net/http" @@ -47,11 +47,11 @@ func EncodeCookie(user_id uint) (string, error) { func ClearCookie(w http.ResponseWriter) (int, error) { cookie := &http.Cookie{ - Name: CookieName, - Value: "", - Path: "/", + Name: CookieName, + Value: "", + Path: "/", HttpOnly: true, - MaxAge: -1, + MaxAge: -1, } http.SetCookie(w, cookie) return http.StatusOK, nil @@ -88,9 +88,9 @@ func SetCookieHandler(w http.ResponseWriter, email string, pass string) (int, er return http.StatusInternalServerError, err } cookie := &http.Cookie{ - Name: CookieName, - Value: encoded, - Path: "/", + Name: CookieName, + Value: encoded, + Path: "/", HttpOnly: true, } http.SetCookie(w, cookie) diff --git a/service/user/form/formValidator.go b/service/user/form/formValidator.go index 5ee026b1..16dcc0a1 100644 --- a/service/user/form/formValidator.go +++ b/service/user/form/formValidator.go @@ -3,7 +3,7 @@ package form import ( "regexp" - "github.com/ewhal/nyaa/util/log" + "github.com/NyaaPantsu/nyaa/util/log" ) const EMAIL_REGEX = `(\w[-._\w]*\w@\w[-._\w]*\w\.\w{2,3})` @@ -64,13 +64,13 @@ type LoginForm struct { // UserForm is used when updating a user. type UserForm struct { - Username string `form:"username" needed:"true" len_min:"3" len_max:"20"` - Email string `form:"email"` - Language string `form:"language" default:"en-us"` - CurrentPassword string `form:"current_password" len_min:"6" len_max:"72" omit:"true"` - Password string `form:"password" len_min:"6" len_max:"72" equalInput:"Confirm_Password"` - Confirm_Password string `form:"password_confirmation" omit:"true"` - Status int `form:"status" default:"0"` + Username string `form:"username" needed:"true" len_min:"3" len_max:"20"` + Email string `form:"email"` + Language string `form:"language" default:"en-us"` + CurrentPassword string `form:"current_password" len_min:"6" len_max:"72" omit:"true"` + Password string `form:"password" len_min:"6" len_max:"72" equalInput:"Confirm_Password"` + Confirm_Password string `form:"password_confirmation" omit:"true"` + Status int `form:"status" default:"0"` } // PasswordForm is used when updating a user password. diff --git a/service/user/permission/permission.go b/service/user/permission/permission.go index 5bdca117..e75e460c 100644 --- a/service/user/permission/permission.go +++ b/service/user/permission/permission.go @@ -1,12 +1,11 @@ package userPermission import ( - "github.com/ewhal/nyaa/db" - "github.com/ewhal/nyaa/model" - "github.com/ewhal/nyaa/util/log" + "github.com/NyaaPantsu/nyaa/db" + "github.com/NyaaPantsu/nyaa/model" + "github.com/NyaaPantsu/nyaa/util/log" ) - // HasAdmin checks that user has an admin permission. func HasAdmin(user *model.User) bool { return user.Status == 2 diff --git a/service/user/user.go b/service/user/user.go index ac0f945a..c021a012 100644 --- a/service/user/user.go +++ b/service/user/user.go @@ -7,14 +7,14 @@ import ( "strconv" "time" - "github.com/ewhal/nyaa/config" - "github.com/ewhal/nyaa/db" - "github.com/ewhal/nyaa/model" - formStruct "github.com/ewhal/nyaa/service/user/form" - "github.com/ewhal/nyaa/service/user/permission" - "github.com/ewhal/nyaa/util/crypto" - "github.com/ewhal/nyaa/util/log" - "github.com/ewhal/nyaa/util/modelHelper" + "github.com/NyaaPantsu/nyaa/config" + "github.com/NyaaPantsu/nyaa/db" + "github.com/NyaaPantsu/nyaa/model" + formStruct "github.com/NyaaPantsu/nyaa/service/user/form" + "github.com/NyaaPantsu/nyaa/service/user/permission" + "github.com/NyaaPantsu/nyaa/util/crypto" + "github.com/NyaaPantsu/nyaa/util/log" + "github.com/NyaaPantsu/nyaa/util/modelHelper" "golang.org/x/crypto/bcrypt" ) diff --git a/service/user/userHelper.go b/service/user/userHelper.go index 57e4dd09..67547306 100644 --- a/service/user/userHelper.go +++ b/service/user/userHelper.go @@ -2,11 +2,11 @@ package userService import ( "errors" - "github.com/ewhal/nyaa/db" - "github.com/ewhal/nyaa/model" + "github.com/NyaaPantsu/nyaa/db" + "github.com/NyaaPantsu/nyaa/model" "net/http" - "github.com/ewhal/nyaa/util/log" + "github.com/NyaaPantsu/nyaa/util/log" ) // FindUserByUserName creates a user. diff --git a/service/user/verification.go b/service/user/verification.go index e34093ec..fe3ae755 100644 --- a/service/user/verification.go +++ b/service/user/verification.go @@ -7,12 +7,12 @@ import ( "strconv" "time" - "github.com/ewhal/nyaa/config" - "github.com/ewhal/nyaa/db" - "github.com/ewhal/nyaa/model" - "github.com/ewhal/nyaa/util/email" - "github.com/ewhal/nyaa/util/languages" - "github.com/ewhal/nyaa/util/timeHelper" + "github.com/NyaaPantsu/nyaa/config" + "github.com/NyaaPantsu/nyaa/db" + "github.com/NyaaPantsu/nyaa/model" + "github.com/NyaaPantsu/nyaa/util/email" + "github.com/NyaaPantsu/nyaa/util/languages" + "github.com/NyaaPantsu/nyaa/util/timeHelper" "github.com/gorilla/securecookie" ) diff --git a/templates/FAQ.html b/templates/FAQ.html index 677b443f..09b38dcc 100644 --- a/templates/FAQ.html +++ b/templates/FAQ.html @@ -57,7 +57,7 @@ http://tracker.baka-sub.cf/announce

{{T "answer_how_can_i_help"}}

{{T "your_design_sucks_found_a_bug"}}

-

https://github.com/ewhal/nyaa/issues.

+

https://github.com/NyaaPantsu/nyaa/issues.

{{T "why_written_in_go"}}

{{T "authors_favorite_language"}}

diff --git a/util/email/email.go b/util/email/email.go index f4a95479..101dc4be 100644 --- a/util/email/email.go +++ b/util/email/email.go @@ -3,8 +3,8 @@ package email import ( "path/filepath" - "github.com/ewhal/nyaa/config" - "github.com/ewhal/nyaa/util/log" + "github.com/NyaaPantsu/nyaa/config" + "github.com/NyaaPantsu/nyaa/util/log" gomail "gopkg.in/gomail.v2" ) diff --git a/util/languages/translation.go b/util/languages/translation.go index d7c21892..d2bd5b6d 100644 --- a/util/languages/translation.go +++ b/util/languages/translation.go @@ -8,8 +8,8 @@ import ( "path" "path/filepath" - "github.com/ewhal/nyaa/config" - "github.com/ewhal/nyaa/model" + "github.com/NyaaPantsu/nyaa/config" + "github.com/NyaaPantsu/nyaa/model" "github.com/nicksnyder/go-i18n/i18n" "github.com/nicksnyder/go-i18n/i18n/language" ) diff --git a/util/languages/translation_test.go b/util/languages/translation_test.go index 81fa6966..9146bd8a 100644 --- a/util/languages/translation_test.go +++ b/util/languages/translation_test.go @@ -4,7 +4,7 @@ import ( "path" "testing" - "github.com/ewhal/nyaa/config" + "github.com/NyaaPantsu/nyaa/config" ) func TestInitI18n(t *testing.T) { diff --git a/util/log/logger.go b/util/log/logger.go index 6eacfe17..3db9872d 100644 --- a/util/log/logger.go +++ b/util/log/logger.go @@ -4,8 +4,8 @@ import ( "net/http" "os" + "github.com/NyaaPantsu/nyaa/config" "github.com/Sirupsen/logrus" - "github.com/ewhal/nyaa/config" lumberjack "gopkg.in/natefinch/lumberjack.v2" ) diff --git a/util/modelHelper/modelHelper.go b/util/modelHelper/modelHelper.go index fcbad6b5..9d42f5cd 100644 --- a/util/modelHelper/modelHelper.go +++ b/util/modelHelper/modelHelper.go @@ -2,7 +2,7 @@ package modelHelper import ( "fmt" - "github.com/ewhal/nyaa/util/log" + "github.com/NyaaPantsu/nyaa/util/log" "net/http" "reflect" "strconv" diff --git a/util/search/search.go b/util/search/search.go index 3d760874..c7ca74a7 100644 --- a/util/search/search.go +++ b/util/search/search.go @@ -7,14 +7,14 @@ import ( "unicode" "unicode/utf8" - "github.com/ewhal/nyaa/cache" - "github.com/ewhal/nyaa/common" - "github.com/ewhal/nyaa/config" - "github.com/ewhal/nyaa/db" - "github.com/ewhal/nyaa/model" - "github.com/ewhal/nyaa/service" - "github.com/ewhal/nyaa/service/torrent" - "github.com/ewhal/nyaa/util/log" + "github.com/NyaaPantsu/nyaa/cache" + "github.com/NyaaPantsu/nyaa/common" + "github.com/NyaaPantsu/nyaa/config" + "github.com/NyaaPantsu/nyaa/db" + "github.com/NyaaPantsu/nyaa/model" + "github.com/NyaaPantsu/nyaa/service" + "github.com/NyaaPantsu/nyaa/service/torrent" + "github.com/NyaaPantsu/nyaa/util/log" ) var searchOperator string diff --git a/util/server.go b/util/server.go index caf557a4..aa73a669 100644 --- a/util/server.go +++ b/util/server.go @@ -4,7 +4,7 @@ import ( "net/http" "runtime/debug" - "github.com/ewhal/nyaa/util/log" + "github.com/NyaaPantsu/nyaa/util/log" ) func SendError(w http.ResponseWriter, err error, code int) { diff --git a/util/signals/unix.go b/util/signals/unix.go index fe395001..f6f40850 100644 --- a/util/signals/unix.go +++ b/util/signals/unix.go @@ -3,8 +3,8 @@ package signals import ( - "github.com/ewhal/nyaa/router" - "github.com/ewhal/nyaa/util/log" + "github.com/NyaaPantsu/nyaa/router" + "github.com/NyaaPantsu/nyaa/util/log" "os" "os/signal" "syscall" diff --git a/util/timeHelper/timeHelper.go b/util/timeHelper/timeHelper.go index 38c84737..ba28c34d 100644 --- a/util/timeHelper/timeHelper.go +++ b/util/timeHelper/timeHelper.go @@ -3,7 +3,7 @@ package timeHelper import ( "time" - "github.com/ewhal/nyaa/util/log" + "github.com/NyaaPantsu/nyaa/util/log" ) func FewDaysLater(day int) time.Time { diff --git a/util/unzlib.go b/util/unzlib.go index 070b1440..470328d5 100644 --- a/util/unzlib.go +++ b/util/unzlib.go @@ -1,7 +1,7 @@ package util import ( - "github.com/ewhal/nyaa/util/log" + "github.com/NyaaPantsu/nyaa/util/log" "bytes" "compress/zlib"