This file contains 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
# syntax=docker/dockerfile:1.4 | |
FROM golang:1.18.1 as builder | |
WORKDIR /src | |
COPY <<EOF main.go | |
package main | |
import ( | |
"log" |
This file contains 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
import * as rx from 'rxjs'; | |
import * as fs from 'fs'; | |
import * as path from 'path'; | |
function cp(from: string, to: string) { | |
return stat(from) | |
.flatMap((s) => { | |
return s.isDirectory() ? copyDir(from, to) : copyFile(from, to) | |
}) | |
} |
This file contains 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
import { AbstractControl } from 'angular2/common'; | |
export class RegexValidators { | |
static pattern(pattern: RegExp) : (c: AbstractControl) => {[key: string]: any } { | |
return (control: AbstractControl): { [key: string]: any } => { | |
let v: string = control.value; | |
return pattern.test(v) ? null : { "pattern": { "requiredPattern": `^${pattern}$`, "actualValue": v } }; | |
}; | |
} | |
} |