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 retry | |
| import ( | |
| "context" | |
| "errors" | |
| "fmt" | |
| "math" | |
| "time" | |
| ) |
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
| import * as core from '@actions/core'; | |
| import { Storage } from '@google-cloud/storage'; | |
| import * as E from 'fp-ts/lib/Either'; | |
| import { pipe } from 'fp-ts/lib/function'; | |
| import * as IOEither from 'fp-ts/lib/IOEither'; | |
| import * as T from 'fp-ts/lib/Task'; | |
| import * as TE from 'fp-ts/lib/TaskEither'; | |
| import * as t from 'io-ts'; | |
| import { failure } from 'io-ts/PathReporter'; |
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
| // Helpers | |
| // optional | |
| type Some<T> = { | |
| _tag: "some"; | |
| value: T; | |
| }; | |
| type None = { | |
| _tag: "none"; |
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
| #[derive(Debug, PartialEq)] | |
| pub enum Material { | |
| Brick, | |
| Concrete, | |
| Wood, | |
| } | |
| #[derive(Debug, PartialEq)] | |
| pub struct Blueprint { | |
| num_floors: usize, |
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 gildedrose | |
| type Item struct { | |
| Name string | |
| SellIn int | |
| Quality int | |
| } | |
| type Inventory []*Item |
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" | |
| "fmt" | |
| mailslurp "github.com/mailslurp/mailslurp-client-go" | |
| ) | |
| 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
| openapi: "3.0.0" | |
| info: | |
| version: 1.0.1 | |
| title: Swagger Petstore | |
| license: | |
| name: MIT | |
| servers: | |
| - url: http://petstore.swagger.io/v1 | |
| paths: | |
| /pets: |
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
| var _ = Describe("ginkgotcha", func() { | |
| It("is irregular", func() { | |
| buffer := BufferWithBytes([]byte("map[string]")) | |
| Expect(buffer).To(Say("map[string]")) | |
| }) | |
| }) |
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
| var _ = Describe("ginkgotcha", func() { | |
| It("leaks a goroutine", func() { | |
| go func() { | |
| defer GinkgoRecover() | |
| time.Sleep(time.Second / 2) | |
| Fail("lol play time is over") | |
| }() | |
| }) | |
| It("is gonna have a bad time", func() { |
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
| var _ = Describe("ginkgotcha", func() { | |
| var number int | |
| BeforeEach(func() { | |
| number = 10 | |
| }) | |
| It("is equal to 10", func() { | |
| Expect(number).To(Equal(10)) | |
| }) |