diff --git a/.gitignore b/.gitignore index 7d03aec378b08ad74a87ff8f5ca30374cbc1341d..d8ad6bd5253033b57502d718038fa91e2870551f 100644 --- a/.gitignore +++ b/.gitignore @@ -3,7 +3,7 @@ *.a *.so -InstallLogs.txt +*.txt # Folders _obj @@ -23,4 +23,6 @@ _testmain.go *.exe *.test -*.bench \ No newline at end of file +*.bench + +vendor \ No newline at end of file diff --git a/GoGetScript.sh b/GoGetScript.sh index db1b359fe7159dc117db41ea0252a3fb7a976383..950d3f0da2ab50ca816a1ed2fcf38758110b42c5 100755 --- a/GoGetScript.sh +++ b/GoGetScript.sh @@ -5,25 +5,25 @@ NOW=$(date +"%d-%b-%Y %H:%M:%S") echo $NOW " : Installed \"github.com/allegro/bigcache\"" >> InstallLogs.txt -# echo "Installing : \"github.com/spf13/viper\"" -# go get "github.com/spf13/viper" -# echo "Done" -# NOW=$(date +"%d-%b-%Y %H:%M:%S") -# echo $NOW " : Installed \"github.com/spf13/viper\"" >> InstallLogs.txt +echo "Installing : \"github.com/spf13/viper\"" +go get "github.com/spf13/viper" +echo "Done" +NOW=$(date +"%d-%b-%Y %H:%M:%S") +echo $NOW " : Installed \"github.com/spf13/viper\"" >> InstallLogs.txt -# echo "Installing : \"github.com/gocraft/dbr\"" -# go get "github.com/gocraft/dbr" -# echo "Done" -# NOW=$(date +"%d-%b-%Y %H:%M:%S") -# echo $NOW " : Installed \"github.com/gocraft/dbr\"" >> InstallLogs.txt +echo "Installing : \"github.com/gocraft/dbr\"" +go get "github.com/gocraft/dbr" +echo "Done" +NOW=$(date +"%d-%b-%Y %H:%M:%S") +echo $NOW " : Installed \"github.com/gocraft/dbr\"" >> InstallLogs.txt -# echo "Installing : \"gopkg.in/mgo.v2\"" -# go get "gopkg.in/mgo.v2" -# echo "Done" -# NOW=$(date +"%d-%b-%Y %H:%M:%S") -# echo $NOW " : Installed \"gopkg.in/mgo.v2\"" >> InstallLogs.txt +echo "Installing : \"gopkg.in/mgo.v2\"" +go get "gopkg.in/mgo.v2" +echo "Done" +NOW=$(date +"%d-%b-%Y %H:%M:%S") +echo $NOW " : Installed \"gopkg.in/mgo.v2\"" >> InstallLogs.txt echo "Installing : \"github.com/garyburd/redigo/redis\"" @@ -33,25 +33,25 @@ NOW=$(date +"%d-%b-%Y %H:%M:%S") echo $NOW " : Installed \"github.com/garyburd/redigo/redis\"" >> InstallLogs.txt -# echo "Installing : \"github.com/stretchr/testify/assert\"" -# go get "github.com/stretchr/testify/assert" -# echo "Done" -# NOW=$(date +"%d-%b-%Y %H:%M:%S") -# echo $NOW " : Installed \"github.com/stretchr/testify/assert\"" >> InstallLogs.txt +echo "Installing : \"github.com/stretchr/testify/assert\"" +go get "github.com/stretchr/testify/assert" +echo "Done" +NOW=$(date +"%d-%b-%Y %H:%M:%S") +echo $NOW " : Installed \"github.com/stretchr/testify/assert\"" >> InstallLogs.txt -# echo "Installing : \"github.com/labstack/echo\"" -# go get "github.com/labstack/echo" -# echo "Done" -# NOW=$(date +"%d-%b-%Y %H:%M:%S") -# echo $NOW " : Installed \"github.com/labstack/echo\"" >> InstallLogs.txt +echo "Installing : \"github.com/labstack/echo\"" +go get "github.com/labstack/echo" +echo "Done" +NOW=$(date +"%d-%b-%Y %H:%M:%S") +echo $NOW " : Installed \"github.com/labstack/echo\"" >> InstallLogs.txt -# echo "Installing : \"gopkg.in/mgo.v2/bson\"" -# go get "gopkg.in/mgo.v2/bson" -# echo "Done" -# NOW=$(date +"%d-%b-%Y %H:%M:%S") -# echo $NOW " : Installed \"gopkg.in/mgo.v2/bson\"" >> InstallLogs.txt +echo "Installing : \"gopkg.in/mgo.v2/bson\"" +go get "gopkg.in/mgo.v2/bson" +echo "Done" +NOW=$(date +"%d-%b-%Y %H:%M:%S") +echo $NOW " : Installed \"gopkg.in/mgo.v2/bson\"" >> InstallLogs.txt echo "Installing : \"github.com/dgrijalva/jwt-go\"" @@ -61,32 +61,32 @@ NOW=$(date +"%d-%b-%Y %H:%M:%S") echo $NOW " : Installed \"github.com/dgrijalva/jwt-go\"" >> InstallLogs.txt -# echo "Installing : \"github.com/labstack/echo/middleware\"" -# go get "github.com/labstack/echo/middleware" -# echo "Done" -# NOW=$(date +"%d-%b-%Y %H:%M:%S") -# echo $NOW " : Installed \"github.com/labstack/echo/middleware\"" >> InstallLogs.txt +echo "Installing : \"github.com/labstack/echo/middleware\"" +go get "github.com/labstack/echo/middleware" +echo "Done" +NOW=$(date +"%d-%b-%Y %H:%M:%S") +echo $NOW " : Installed \"github.com/labstack/echo/middleware\"" >> InstallLogs.txt -# echo "Installing : \"github.com/sirupsen/logrus\"" -# go get "github.com/sirupsen/logrus" -# echo "Done" -# NOW=$(date +"%d-%b-%Y %H:%M:%S") -# echo $NOW " : Installed \"github.com/sirupsen/logrus\"" >> InstallLogs.txt +echo "Installing : \"github.com/sirupsen/logrus\"" +go get "github.com/sirupsen/logrus" +echo "Done" +NOW=$(date +"%d-%b-%Y %H:%M:%S") +echo $NOW " : Installed \"github.com/sirupsen/logrus\"" >> InstallLogs.txt -# echo "Installing : \"github.com/go-playground/locales/en\"" -# go get "github.com/go-playground/locales/en" -# echo "Done" -# NOW=$(date +"%d-%b-%Y %H:%M:%S") -# echo $NOW " : Installed \"github.com/go-playground/locales/en\"" >> InstallLogs.txt +echo "Installing : \"github.com/go-playground/locales/en\"" +go get "github.com/go-playground/locales/en" +echo "Done" +NOW=$(date +"%d-%b-%Y %H:%M:%S") +echo $NOW " : Installed \"github.com/go-playground/locales/en\"" >> InstallLogs.txt -# echo "Installing : \"gopkg.in/go-playground/validator.v9\"" -# go get "gopkg.in/go-playground/validator.v9" -# echo "Done" -# NOW=$(date +"%d-%b-%Y %H:%M:%S") -# echo $NOW " : Installed \"gopkg.in/go-playground/validator.v9\"" >> InstallLogs.txt +echo "Installing : \"gopkg.in/go-playground/validator.v9\"" +go get "gopkg.in/go-playground/validator.v9" +echo "Done" +NOW=$(date +"%d-%b-%Y %H:%M:%S") +echo $NOW " : Installed \"gopkg.in/go-playground/validator.v9\"" >> InstallLogs.txt echo "Installing : \"github.com/go-playground/universal-translator\"" @@ -96,17 +96,17 @@ NOW=$(date +"%d-%b-%Y %H:%M:%S") echo $NOW " : Installed \"github.com/go-playground/universal-translator\"" >> InstallLogs.txt -# echo "Installing : \"gopkg.in/go-playground/validator.v9/translations/en\"" -# go get "gopkg.in/go-playground/validator.v9/translations/en" -# echo "Done" -# NOW=$(date +"%d-%b-%Y %H:%M:%S") -# echo $NOW " : Installed \"gopkg.in/go-playground/validator.v9/translations/en\"" >> InstallLogs.txt +echo "Installing : \"gopkg.in/go-playground/validator.v9/translations/en\"" +go get "gopkg.in/go-playground/validator.v9/translations/en" +echo "Done" +NOW=$(date +"%d-%b-%Y %H:%M:%S") +echo $NOW " : Installed \"gopkg.in/go-playground/validator.v9/translations/en\"" >> InstallLogs.txt -# echo "******************************************" -# echo "Installation complete" -# echo "******************************************" +echo "******************************************" +echo "Installation complete" +echo "******************************************" -# NOW=$(date +"%d-%b-%Y %H:%M:%S") -# echo "******************************************" >> InstallLogs.txt -# echo $NOW "Installation complete" >> InstallLogs.txt -# echo "******************************************" >> InstallLogs.txt \ No newline at end of file +NOW=$(date +"%d-%b-%Y %H:%M:%S") +echo "******************************************" >> InstallLogs.txt +echo $NOW "Installation complete" >> InstallLogs.txt +echo "******************************************" >> InstallLogs.txt \ No newline at end of file diff --git a/cacheHelper.go b/cacheHelper.go index 9d3eebc62c78878cb7d85ded1bb0daa4e1974924..8f677db0c6e44399e9893a1bb6bb7b93271e3dd5 100644 --- a/cacheHelper.go +++ b/cacheHelper.go @@ -60,4 +60,4 @@ func GetLength() int { //Executed only when onRemove of cache config poting to this function func onRemove(key string, entry []byte) { fmt.Println(key + " removed at " + time.Now().String()) -} +} \ No newline at end of file diff --git a/configHelper.go b/configHelper.go index e9a2ed71d8fc3723479ca7dbf680fe85051dbf5b..214cb1a9c4f82b00abb86157982e4f7c7d2d503e 100644 --- a/configHelper.go +++ b/configHelper.go @@ -1,27 +1,21 @@ package coreos -import ( - "fmt" - - "github.com/spf13/viper" -) - //InitViper function to initialize viper func InitViper() { - viper.SetConfigName("config") // name of config file (without extension) - viper.AddConfigPath(".") // optionally look for config in the working directory - err := viper.ReadInConfig() - // Find and read the config file - if err != nil { // Handle errors reading the config file - panic(fmt.Errorf("Fatal error config file %s ", err)) - } + // viper.SetConfigName("config") // name of config file (without extension) + // viper.AddConfigPath(".") // optionally look for config in the working directory + // err := viper.ReadInConfig() + // // Find and read the config file + // if err != nil { // Handle errors reading the config file + // panic(fmt.Errorf("Fatal error config file %s ", err)) + // } } //GetConfig method to get configs from config file func GetConfig(keyName string) string { - keyValue := viper.GetString(keyName) - - return keyValue + // keyValue := viper.GetString(keyName) + // return keyValue + return "" } diff --git a/glide.yaml b/glide.yaml index ebda40f8b2f0332942a023f3a0ce3f0a6a0831a0..7a5ff983cc3ecd8b63652bba79d1d8e6a377606b 100644 --- a/glide.yaml +++ b/glide.yaml @@ -1,5 +1,6 @@ package: coreospackage import: +- package: GolangFullStack/server/api/server/config - package: github.com/allegro/bigcache - package: github.com/dgrijalva/jwt-go version: ^3.0.0