There are some key values that the time.Parse
is looking for.
By changing:
test, err := time.Parse("10/15/1983", "10/15/1983")
to
import { z } from 'zod' | |
/** | |
* @summary Function returns default object from Zod schema | |
* @version 23.05.15.2 | |
* @link https://gist.github.com/TonyGravagno/2b744ceb99e415c4b53e8b35b309c29c | |
* @author Jacob Weisenburger, Josh Andromidas, Thomas Moiluiavon, Tony Gravagno | |
* @param schema z.object schema definition | |
* @param options Optional object, see Example for details | |
* @returns Object of type schema with defaults for all fields |
FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.16 as builder | |
ARG TARGETPLATFORM | |
ARG BUILDPLATFORM | |
ARG TARGETOS | |
ARG TARGETARCH | |
WORKDIR /app/ | |
ADD . . | |
RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -ldflags="-w -s" -o yourapplication main.go |
package main | |
import ( | |
"context" | |
"fmt" | |
"os" | |
"path/filepath" | |
"time" | |
corev1 "k8s.io/api/core/v1" |
There are some key values that the time.Parse
is looking for.
By changing:
test, err := time.Parse("10/15/1983", "10/15/1983")
to
A stored procedure that saves (insert/update) a URL, then returns the id for the record.
Works in Go v1.11.6+
and MySQL 5.7+
.
DELIMITER ;;
CREATE DEFINER=`root`@`%` PROCEDURE SaveUrl(
IN p_url varchar(8200),
IN p_title text
package main | |
import ( | |
"errors" | |
"net/http" | |
"strconv" | |
"strings" | |
"time" | |
"github.com/dgrijalva/jwt-go" |
This cheat sheet originated from the forum, credits to Laurent Poulain. We copied it and changed or added a few things.
def example = 2 // evaluated when called
val example = 2 // evaluated immediately
This is a list of tweaks to make IntelliJ IDEA work better with OpenJDK 8. Refer to System Properties for Java 2D Technology for the details of the options used below.
Note that the performance boost achieved via the OpenGL-based hardware acceleration pipeline is made possible by using the open-source Radeon driver (for AMD graphics cards) included in the latest stable version (10.3.3 as of now) of the Mesa 3D Graphics Library available in the official Fedora 21 stable repository. Therefore, the gained performance boost might vary based on the types of graphics cards and the versions of the drivers used in your system.
In $IDEA_HOME/bin/idea64.vmoptions
(or $IDEA_HOME/bin/idea.vmoptions
on a x86 architecture), change
package main | |
import ( | |
"net/http" | |
"database/sql" | |
"fmt" | |
"log" | |
"os" | |
) |