Use this File Watcher configuration for gometalinter
errors to appear as squiggles in your IDE.
--vendor --fast --enable-gc --tests --aggregate --disable=gotype $FileDir$ --format="{{.Path}}:{{.Line}}: {{.Message}}"
$FILE_PATH$:$LINE$:$MESSAGE$
#!/bin/bash | |
yum -y install httpd php php-mysql mariadb mariadb-server wget | |
sed -i 's/Listen 80/Listen 8080/g' /etc/httpd/conf/httpd.conf | |
service httpd restart | |
service mariadb restart | |
mkdir -p /var/www/html/ | |
wget -O /var/www/html/adminer.php https://www.adminer.org/static/download/4.2.5/adminer-4.2.5-mysql.php |
package main | |
import ( | |
"database/sql" | |
_ "github.com/go-sql-driver/mysql" | |
) | |
func main() { | |
mysqlConn, err := sql.Open("mysql", os.Getenv("MYSQL_USER")+":"+os.Getenv("MYSQL_PASS")+"@("+os.Getenv("MYSQL_HOST")+")/"+os.Getenv("MYSQL_DB") + "?parseTime=true") | |
if err != nil { |
package main | |
import ( | |
"github.com/stratexio/gclog" | |
"golang.org/x/net/context" | |
"google.golang.org/cloud" | |
"google.golang.org/cloud/storage" | |
) | |
//Removed in favor of https://github.com/ammario/temp |
I hereby claim:
To claim this, I am signing this object:
func cError(c *gin.Context, err interface{}) { | |
switch err.(type) { | |
case error: | |
c.JSON(200, gin.H{ | |
"error": err.(error).Error(), | |
}) | |
case string: | |
c.JSON(200, gin.H{ | |
"error": err.(string), | |
}) |
I hereby claim:
To claim this, I am signing this object: