This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"net/http" | |
"github.com/gorilla/mux" | |
) | |
func main() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"database/sql" | |
"encoding/json" | |
"fmt" | |
"log" | |
"net/http" | |
"os" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/etc/supervisor/conf.d/myapp.conf | |
[program:myapp] | |
directory=/root/gocode/src/github.com/monirz/myapp | |
command=/root/gocode/src/github.com/monirz/myapp/myapp | |
autostart=true | |
autorestart=true | |
stderr_logfile=/var/log/myapp.err | |
stdout_logfile=/var/log/myapp.log | |
environment=CODENATION_ENV=prod |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"errors" | |
"fmt" | |
"os" | |
) | |
func main() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"context" | |
"log" | |
"github.com/tinode/chat/pbx" | |
"google.golang.org/grpc" | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func formatDateTime(t time.Time) string { | |
layout := "2006-08-2 11:08:09" | |
str := t.Format(layout) | |
return str | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package validator | |
import ( | |
"log" | |
"net/http" | |
"reflect" | |
"strconv" | |
"strings" | |
"github.com/asaskevich/govalidator" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%%% | |
%%% ejabberd configuration file | |
%%% | |
%%%' | |
%%% The parameters used in this configuration file are explained in more detail | |
%%% in the ejabberd Installation and Operation Guide. | |
%%% Please consult the Guide in case of doubts, it is included with | |
%%% your copy of ejabberd, and is also available online at | |
%%% http://www.process-one.net/en/ejabberd/docs/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{deps, [ | |
{cowboy, "2.0.0", {git, "git://github.com/ninenines/cowboy.git", {tag, "2.0.0"}}}, | |
{riakc, "2.5.*", {git, "https://github.com/basho/riak-erlang-client", {tag, "2.5.1"}}}, | |
{riak_pb, {git, "https://github.com/basho/riak_pb", {tag, "2.1.4.2"}}} | |
] | |
}. | |
{plugins, [rebar3_run]}. | |
{relx, [{release, { cowboy_riak, "0.1.0" }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"log" | |
"net/http" | |
"strconv" | |
"time" |