Skip to content

Instantly share code, notes, and snippets.

@matipan
matipan / beego_monitor_filter.go
Created September 21, 2018 03:10
Monitor how long take requests to process with a beego filter using logrus for structured output
package filters
import (
"time"
"github.com/Sirupsen/logrus"
"github.com/astaxie/beego"
"github.com/astaxie/beego/context"
uuid "github.com/hashicorp/go-uuid"
)
program Parcial;
uses sysutils;
const
valoralto = 9999;
type
producto = record
codigo : integer;
nombre : string[20];
descripcion : string[40];
precio : real;
Program ej2;
const
valoralto = 999999;
type
vivienda = record
codigo : integer;
precio : real;
habitaciones : integer;
descripcion : string[20];
end;
Program ej8;
const
valoralto = 9999;
type
producto = record
codigo : integer;
nombre : string[20];
precio : real;
stock : integer;
stockMinimo : integer;
Program ej2;
uses sysutils;
const
valoralto = 99999;
type
producto = record
codigo : integer;
nombre : string[20];
descripcion : string[30];
stock : integer;
Program ej1;
const
valoralto = 99999;
type
votos = array [0..4] of integer;
partido = record
codigo : integer;
nombre : string[20];
codLocal : integer;
nombreLocal : string[20];
package main
import (
"context"
"fmt"
"net"
"os"
"github.com/matipan/qsy"
)
program ejercicio2;
const
valoralto = 9999;
type
viajeTipo = record
codViaje: integer;
nombre: string[20];
desc: string[100];
precio: real;
cantPasajes: integer;
package main
import (
"bufio"
"fmt"
"log"
"net/http"
"net/url"
"os"
"strings"
package main
import (
"fmt"
"log"
"time"
"gobot.io/x/gobot"
"gobot.io/x/gobot/drivers/gpio"
"gobot.io/x/gobot/platforms/firmata"