Skip to content

Instantly share code, notes, and snippets.

View trietphm's full-sized avatar
🍄
1 Up

Triet Pham trietphm

🍄
1 Up
View GitHub Profile
package views
import (
"encoding/json"
"time"
)
type Timestamp time.Time
func (t Timestamp) MarshalJSON() ([]byte, error) {
{
"env": {
"GOPATH": "/home/windyzboy/project/go",
"GOROOT": "/usr/local/go"
},
"on_save":
[{
"cmd": "gs9o_open", "args": {
"run": ["clear"],
"focus_view": false
case get_format(conn) do
"json" ->
cond do
kind == :error ->
case reason.__struct__ do
Ecto.NoResultsError ->
error_view = "404.json"
App.Utils.Error.NotFound ->
error_view = "404.json"