From 9591faf3d4a5151ba79e3f71c8f0c604052bf08b Mon Sep 17 00:00:00 2001 From: gitgiggety <79809426+gitgiggety@users.noreply.github.com> Date: Mon, 12 Jul 2021 12:56:38 +0200 Subject: [PATCH 01/51] Mobile fixes (#1539) * Make new tag, gallery and studio pages mobile friendly * Enable new button on mobile * Update movies edit HTML to be more in line with scene Update the code of the MovieEditPanel to be more in sync with the SceneEditPanel. Changes made are: * Use FormUtil.renderLabel instead of manually building * Always apply xs=9 breakpoint This fixes some layout issues on mobile while still looking the same on tablet and desktop resolution. * Enable delete button for tags, studios and movies on mobile * Add changelog Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com> --- .../src/components/Changelog/Changelog.tsx | 10 ++- .../src/components/Changelog/versions/v090.md | 2 + .../Galleries/GalleryDetails/Gallery.tsx | 2 +- ui/v2.5/src/components/MainNavbar.tsx | 2 +- .../Movies/MovieDetails/MovieEditPanel.tsx | 63 +++++++++---------- .../components/Shared/DetailsEditNavbar.tsx | 2 +- .../Studios/StudioDetails/Studio.tsx | 2 +- .../src/components/Tags/TagDetails/Tag.tsx | 2 +- 8 files changed, 44 insertions(+), 41 deletions(-) create mode 100644 ui/v2.5/src/components/Changelog/versions/v090.md diff --git a/ui/v2.5/src/components/Changelog/Changelog.tsx b/ui/v2.5/src/components/Changelog/Changelog.tsx index 5b7608034..87b8ff1db 100644 --- a/ui/v2.5/src/components/Changelog/Changelog.tsx +++ b/ui/v2.5/src/components/Changelog/Changelog.tsx @@ -11,6 +11,7 @@ import V050 from "./versions/v050.md"; import V060 from "./versions/v060.md"; import V070 from "./versions/v070.md"; import V080 from "./versions/v080.md"; +import V090 from "./versions/v090.md"; import { MarkdownPage } from "../Shared/MarkdownPage"; // to avoid use of explicit any @@ -49,9 +50,9 @@ const Changelog: React.FC = () => { // after new release: // add entry to releases, using the current* fields // then update the current fields. - const currentVersion = stashVersion || "v0.8.0"; + const currentVersion = stashVersion || "v0.9.0"; const currentDate = buildDate; - const currentPage = V080; + const currentPage = V090; const releases: IStashRelease[] = [ { @@ -60,6 +61,11 @@ const Changelog: React.FC = () => { page: currentPage, defaultOpen: true, }, + { + version: "v0.8.0", + date: "2021-07-02", + page: V080, + }, { version: "v0.7.0", date: "2021-05-15", diff --git a/ui/v2.5/src/components/Changelog/versions/v090.md b/ui/v2.5/src/components/Changelog/versions/v090.md new file mode 100644 index 000000000..0feb9ec2a --- /dev/null +++ b/ui/v2.5/src/components/Changelog/versions/v090.md @@ -0,0 +1,2 @@ +### 🐛 Bug fixes +* Show New and Delete buttons in mobile view. ([#1539](https://github.com/stashapp/stash/pull/1539)) \ No newline at end of file diff --git a/ui/v2.5/src/components/Galleries/GalleryDetails/Gallery.tsx b/ui/v2.5/src/components/Galleries/GalleryDetails/Gallery.tsx index 1cb433028..b438d54a7 100644 --- a/ui/v2.5/src/components/Galleries/GalleryDetails/Gallery.tsx +++ b/ui/v2.5/src/components/Galleries/GalleryDetails/Gallery.tsx @@ -277,7 +277,7 @@ export const Gallery: React.FC = () => { if (isNew) return (
-
+

{

); } diff --git a/ui/v2.5/src/components/Tagger/StashSearchResult.tsx b/ui/v2.5/src/components/Tagger/StashSearchResult.tsx index ebfa55ed2..d370f2bd8 100755 --- a/ui/v2.5/src/components/Tagger/StashSearchResult.tsx +++ b/ui/v2.5/src/components/Tagger/StashSearchResult.tsx @@ -1,18 +1,24 @@ -import React, { useState, useReducer } from "react"; +import React, { useState, useReducer, useEffect, useCallback } from "react"; import cx from "classnames"; -import { Button } from "react-bootstrap"; +import { Badge, Button, Col, Form, Row } from "react-bootstrap"; import { FormattedMessage, useIntl } from "react-intl"; import * as GQL from "src/core/generated-graphql"; import { + Icon, LoadingIndicator, SuccessIcon, + TagSelect, TruncatedText, } from "src/components/Shared"; +import { FormUtils } from "src/utils"; +import { uniq } from "lodash"; import PerformerResult, { PerformerOperation } from "./PerformerResult"; import StudioResult, { StudioOperation } from "./StudioResult"; import { IStashBoxScene } from "./utils"; import { useTagScene } from "./taggerService"; +import { TagOperation } from "./constants"; +import { OptionalField } from "./IncludeButton"; const getDurationStatus = ( scene: IStashBoxScene, @@ -95,10 +101,13 @@ interface IStashSearchResultProps { showMales: boolean; setScene: (scene: GQL.SlimSceneDataFragment) => void; setCoverImage: boolean; - tagOperation: string; + tagOperation: TagOperation; setTags: boolean; endpoint: string; queueFingerprintSubmission: (sceneId: string, endpoint: string) => void; + createNewTag: (toCreate: GQL.ScrapedSceneTag) => void; + excludedFields: Record; + setExcludedFields: (v: Record) => void; } interface IPerformerReducerAction { @@ -123,9 +132,30 @@ const StashSearchResult: React.FC = ({ setTags, endpoint, queueFingerprintSubmission, + createNewTag, + excludedFields, + setExcludedFields, }) => { + const getInitialTags = useCallback(() => { + const stashSceneTags = stashScene.tags.map((t) => t.id); + if (!setTags) { + return stashSceneTags; + } + + const newTags = scene.tags.filter((t) => t.id).map((t) => t.id!); + if (tagOperation === "overwrite") { + return newTags; + } + if (tagOperation === "merge") { + return uniq(stashSceneTags.concat(newTags)); + } + + throw new Error("unexpected tagOperation"); + }, [stashScene, tagOperation, scene, setTags]); + const [studio, setStudio] = useState(); const [performers, dispatch] = useReducer(performerReducer, {}); + const [tagIDs, setTagIDs] = useState(getInitialTags()); const [saveState, setSaveState] = useState(""); const [error, setError] = useState<{ message?: string; details?: string }>( {} @@ -133,6 +163,10 @@ const StashSearchResult: React.FC = ({ const intl = useIntl(); + useEffect(() => { + setTagIDs(getInitialTags()); + }, [setTags, tagOperation, getInitialTags]); + const tagScene = useTagScene( { tagOperation, @@ -143,12 +177,18 @@ const StashSearchResult: React.FC = ({ setError ); + function getExcludedFields() { + return Object.keys(excludedFields).filter((f) => excludedFields[f]); + } + async function handleSave() { const updatedScene = await tagScene( stashScene, scene, studio, performers, + tagIDs, + getExcludedFields(), endpoint ); @@ -162,6 +202,12 @@ const StashSearchResult: React.FC = ({ performerID: string ) => dispatch({ id: performerID, data: performerData }); + const setExcludedField = (name: string, value: boolean) => + setExcludedFields({ + ...excludedFields, + [name]: value, + }); + const classname = cx("row mx-0 mt-2 search-result", { "selected-result": isActive, }); @@ -190,38 +236,104 @@ const StashSearchResult: React.FC = ({ ? `${endpointBase}scenes/${scene.stash_id}` : ""; + // constants to get around dot-notation eslint rule + const fields = { + cover_image: "cover_image", + title: "title", + date: "date", + url: "url", + details: "details", + }; + return ( // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions
  • !isActive && setActive()} >
    - - - +
    + setExcludedField(fields.cover_image, v)} + > + + + + +
    -

    {sceneTitle}

    -
    - {scene?.studio?.name} • {scene?.date} -
    -
    - {intl.formatMessage( - { id: "countables.performers" }, - { count: scene?.performers?.length } - )} - : {scene?.performers?.map((p) => p.name).join(", ")} -
    +

    + setExcludedField(fields.title, v)} + > + {sceneTitle} + +

    + + {!isActive && ( + <> +
    + {scene?.studio?.name} • {scene?.date} +
    +
    + {intl.formatMessage( + { id: "countables.performers" }, + { count: scene?.performers?.length } + )} + : {scene?.performers?.map((p) => p.name).join(", ")} +
    + + )} + + {isActive && scene.date && ( +
    + setExcludedField(fields.date, v)} + > + {scene.date} + +
    + )} {getDurationStatus(scene, stashScene.file?.duration)} {getFingerprintStatus(scene, stashScene)}
    + {isActive && ( +
    + {scene.url && ( +
    + setExcludedField(fields.url, v)} + > + + {scene.url} + + +
    + )} + {scene.details && ( +
    + setExcludedField(fields.details, v)} + > + + +
    + )} +
    + )}
    {isActive && (
    @@ -238,6 +350,43 @@ const StashSearchResult: React.FC = ({ endpoint={endpoint} /> ))} +
    +
    + + {FormUtils.renderLabel({ + title: `${intl.formatMessage({ id: "tags" })}:`, + })} + + { + setTagIDs(items.map((i) => i.id)); + }} + ids={tagIDs} + /> + + +
    + {setTags && + scene.tags + .filter((t) => !t.id) + .map((t) => ( + { + createNewTag(t); + }} + > + {t.name} + + + ))} +
    {error.message && ( diff --git a/ui/v2.5/src/components/Tagger/StudioResult.tsx b/ui/v2.5/src/components/Tagger/StudioResult.tsx index 9c8fbaf79..69690e853 100755 --- a/ui/v2.5/src/components/Tagger/StudioResult.tsx +++ b/ui/v2.5/src/components/Tagger/StudioResult.tsx @@ -3,10 +3,11 @@ import { Button, ButtonGroup } from "react-bootstrap"; import { FormattedMessage, useIntl } from "react-intl"; import cx from "classnames"; -import { SuccessIcon, Modal, StudioSelect } from "src/components/Shared"; +import { Modal, StudioSelect } from "src/components/Shared"; import * as GQL from "src/core/generated-graphql"; import { ValidTypes } from "src/components/Shared/Select"; import { IStashBoxStudio } from "./utils"; +import { OptionalField } from "./IncludeButton"; export type StudioOperation = | { type: "create"; data: IStashBoxStudio } @@ -103,12 +104,22 @@ const StudioResult: React.FC = ({ studio, setStudio }) => { :{studio?.name}
    - - Matched: + + v ? handleStudioSkip() : setSelectedSource("existing") + } + > +
    + + : + + + {stashIDData.findStudios.studios[0].name} + +
    +
    - - {stashIDData.findStudios.studios[0].name} -
    ); } diff --git a/ui/v2.5/src/components/Tagger/TaggerList.tsx b/ui/v2.5/src/components/Tagger/TaggerList.tsx index 0a885df5c..7860c6809 100644 --- a/ui/v2.5/src/components/Tagger/TaggerList.tsx +++ b/ui/v2.5/src/components/Tagger/TaggerList.tsx @@ -4,9 +4,10 @@ import { FormattedMessage, useIntl } from "react-intl"; import * as GQL from "src/core/generated-graphql"; import { LoadingIndicator } from "src/components/Shared"; -import { stashBoxSceneBatchQuery } from "src/core/StashService"; +import { stashBoxSceneBatchQuery, useTagCreate } from "src/core/StashService"; import { SceneQueue } from "src/models/sceneQueue"; +import { useToast } from "src/hooks"; import { uniqBy } from "lodash"; import { ITaggerConfig } from "./constants"; import { selectScenes, IStashBoxScene } from "./utils"; @@ -76,6 +77,9 @@ export const TaggerList: React.FC = ({ fingerprintQueue, }) => { const intl = useIntl(); + const Toast = useToast(); + const [createTag] = useTagCreate(); + const [fingerprintError, setFingerprintError] = useState(""); const [loading, setLoading] = useState(false); const inputForm = useRef(null); @@ -206,6 +210,53 @@ export const TaggerList: React.FC = ({ setFingerprintError(""); }; + async function createNewTag(toCreate: GQL.ScrapedSceneTag) { + const tagInput: GQL.TagCreateInput = { name: toCreate.name ?? "" }; + try { + const result = await createTag({ + variables: { + input: tagInput, + }, + }); + + const tagID = result.data?.tagCreate?.id; + + const newSearchResults = { ...searchResults }; + + // add the id to the existing search results + Object.keys(newSearchResults).forEach((k) => { + const searchResult = searchResults[k]; + newSearchResults[k] = searchResult.map((r) => { + return { + ...r, + tags: r.tags.map((t) => { + if (t.name === toCreate.name) { + return { + ...t, + id: tagID, + }; + } + + return t; + }), + }; + }); + }); + + setSearchResults(newSearchResults); + + Toast.success({ + content: ( + + Created tag: {toCreate.name} + + ), + }); + } catch (e) { + Toast.error(e); + } + } + const canFingerprintSearch = () => scenes.some( (s) => @@ -267,6 +318,7 @@ export const TaggerList: React.FC = ({ doSceneQuery={(queryString) => doSceneQuery(scene.id, queryString)} tagScene={handleTaggedScene} searchResult={searchResult} + createNewTag={createNewTag} /> ); }); @@ -274,6 +326,7 @@ export const TaggerList: React.FC = ({ return (
    + {/* TODO - sources select goes here */} {fingerprintError}
    {(getFingerprintCount() > 0 || hideUnmatched) && ( diff --git a/ui/v2.5/src/components/Tagger/TaggerScene.tsx b/ui/v2.5/src/components/Tagger/TaggerScene.tsx index f06eb8ae0..d1f745780 100644 --- a/ui/v2.5/src/components/Tagger/TaggerScene.tsx +++ b/ui/v2.5/src/components/Tagger/TaggerScene.tsx @@ -1,11 +1,12 @@ import React, { useRef, useState } from "react"; -import { Button, Form, InputGroup } from "react-bootstrap"; +import { Button, Collapse, Form, InputGroup } from "react-bootstrap"; import { Link } from "react-router-dom"; import { FormattedMessage } from "react-intl"; import { ScenePreview } from "src/components/Scenes/SceneCard"; import * as GQL from "src/core/generated-graphql"; -import { TruncatedText } from "src/components/Shared"; +import { Icon, TagLink, TruncatedText } from "src/components/Shared"; +import { sortPerformers } from "src/core/performers"; import StashSearchResult from "./StashSearchResult"; import { ITaggerConfig } from "./constants"; import { @@ -15,6 +16,68 @@ import { prepareQueryString, } from "./utils"; +interface ITaggerSceneDetails { + scene: GQL.SlimSceneDataFragment; +} + +const TaggerSceneDetails: React.FC = ({ scene }) => { + const [open, setOpen] = useState(false); + const sorted = sortPerformers(scene.performers); + + return ( +
    + +
    +
    +

    {scene.title}

    +
    + {scene.studio?.name} + {scene.studio?.name && scene.date && ` • `} + {scene.date} +
    + +
    +
    +
    + {sorted.map((performer) => ( +
    + + {performer.name + + +
    + ))} +
    +
    + {scene.tags.map((tag) => ( + + ))} +
    +
    +
    +
    + +
    + ); +}; + export interface ISearchResult { results?: IStashBoxScene[]; error?: string; @@ -32,6 +95,7 @@ export interface ITaggerScene { tagScene: (scene: Partial) => void; endpoint: string; queueFingerprintSubmission: (sceneId: string, endpoint: string) => void; + createNewTag: (toCreate: GQL.ScrapedSceneTag) => void; } export const TaggerScene: React.FC = ({ @@ -46,8 +110,10 @@ export const TaggerScene: React.FC = ({ tagScene, endpoint, queueFingerprintSubmission, + createNewTag, }) => { const [selectedResult, setSelectedResult] = useState(0); + const [excluded, setExcluded] = useState>({}); const queryString = useRef(""); @@ -193,6 +259,9 @@ export const TaggerScene: React.FC = ({ setScene={tagScene} endpoint={endpoint} queueFingerprintSubmission={queueFingerprintSubmission} + createNewTag={createNewTag} + excludedFields={excluded} + setExcludedFields={(v) => setExcluded(v)} /> ) )} @@ -226,6 +295,7 @@ export const TaggerScene: React.FC = ({ {renderMainContent()}
    {renderSubContent()}
    +
    {renderSearchResult()}
  • diff --git a/ui/v2.5/src/components/Tagger/constants.ts b/ui/v2.5/src/components/Tagger/constants.ts index afe1f12d1..5b78060c8 100644 --- a/ui/v2.5/src/components/Tagger/constants.ts +++ b/ui/v2.5/src/components/Tagger/constants.ts @@ -24,13 +24,14 @@ export const initialConfig: ITaggerConfig = { }; export type ParseMode = "auto" | "filename" | "dir" | "path" | "metadata"; +export type TagOperation = "merge" | "overwrite"; export interface ITaggerConfig { blacklist: string[]; showMales: boolean; mode: ParseMode; setCoverImage: boolean; setTags: boolean; - tagOperation: string; + tagOperation: TagOperation; selectedEndpoint?: string; fingerprintQueue: Record; excludedPerformerFields?: string[]; diff --git a/ui/v2.5/src/components/Tagger/styles.scss b/ui/v2.5/src/components/Tagger/styles.scss index f36d00af3..ed38e7d74 100644 --- a/ui/v2.5/src/components/Tagger/styles.scss +++ b/ui/v2.5/src/components/Tagger/styles.scss @@ -26,6 +26,13 @@ background-color: #495b68; border-radius: 3px; padding: 1rem; + + .scene-details { + align-items: center; + display: flex; + flex-direction: column; + width: 100%; + } } .search-result { @@ -58,12 +65,11 @@ max-width: 14rem; min-width: 168px; object-fit: contain; - padding: 0 1rem; + padding-right: 1rem; } .scene-metadata { margin-right: 1rem; - width: calc(100% - 17rem); } .select-existing { @@ -204,3 +210,48 @@ width: 12px; } } + +.include-exclude-button { + display: inline-block; + margin-right: 0.38em; + padding: 0.2em; +} + +li:not(.active) { + .include-exclude-button { + // visibility: hidden; + display: none; + } + + .scene-image { + padding-left: 1rem; + } +} + +.optional-field { + align-items: center; + display: flex; + flex-direction: row; +} + +li.active .optional-field.excluded, +li.active .optional-field.excluded .scene-link { + color: #bfccd6; + text-decoration: line-through; + + img { + opacity: 0.5; + } +} + +li.active .scene-image-container { + margin-left: 1rem; +} + +.scene-details { + margin-top: 0.5rem; + + > .row { + width: 100%; + } +} diff --git a/ui/v2.5/src/components/Tagger/taggerService.ts b/ui/v2.5/src/components/Tagger/taggerService.ts index 59f22dce7..3f41f8bde 100644 --- a/ui/v2.5/src/components/Tagger/taggerService.ts +++ b/ui/v2.5/src/components/Tagger/taggerService.ts @@ -1,10 +1,8 @@ import * as GQL from "src/core/generated-graphql"; import { blobToBase64 } from "base64-blob"; -import { uniq } from "lodash"; import { useCreatePerformer, useCreateStudio, - useCreateTag, useUpdatePerformerStashID, useUpdateStudioStashID, } from "./queries"; @@ -25,7 +23,6 @@ export function useTagScene( ) { const createStudio = useCreateStudio(); const createPerformer = useCreatePerformer(); - const createTag = useCreateTag(); const updatePerformerStashID = useUpdatePerformerStashID(); const updateStudioStashID = useUpdateStudioStashID(); const [updateScene] = GQL.useSceneUpdateMutation({ @@ -41,67 +38,76 @@ export function useTagScene( }, }); - const { data: allTags } = GQL.useAllTagsForFilterQuery(); - const handleSave = async ( stashScene: GQL.SlimSceneDataFragment, scene: IStashBoxScene, studio: StudioOperation | undefined, performers: IPerformerOperations, + tagIDs: string[], + excludedFields: string[], endpoint: string ) => { + function resolveField(field: string, stashField: T, remoteField: T) { + if (excludedFields.includes(field)) { + return stashField; + } + + return remoteField; + } + setError({}); let performerIDs = []; let studioID = null; - if (!studio) return; + if (studio) { + if (studio.type === "create") { + setSaveState("Creating studio"); + const newStudio = { + name: studio.data.name, + stash_ids: [ + { + endpoint, + stash_id: scene.studio.stash_id, + }, + ], + url: studio.data.url, + }; + const studioCreateResult = await createStudio( + newStudio, + scene.studio.stash_id + ); - if (studio.type === "create") { - setSaveState("Creating studio"); - const newStudio = { - name: studio.data.name, - stash_ids: [ - { - endpoint, - stash_id: scene.studio.stash_id, - }, - ], - url: studio.data.url, - }; - const studioCreateResult = await createStudio( - newStudio, - scene.studio.stash_id - ); - - if (!studioCreateResult?.data?.studioCreate) { - setError({ - message: `Failed to save studio "${newStudio.name}"`, - details: studioCreateResult?.errors?.[0].message, - }); - return setSaveState(""); + if (!studioCreateResult?.data?.studioCreate) { + setError({ + message: `Failed to save studio "${newStudio.name}"`, + details: studioCreateResult?.errors?.[0].message, + }); + return setSaveState(""); + } + studioID = studioCreateResult.data.studioCreate.id; + } else if (studio.type === "update") { + setSaveState("Saving studio stashID"); + const res = await updateStudioStashID(studio.data, [ + ...studio.data.stash_ids, + { stash_id: scene.studio.stash_id, endpoint }, + ]); + if (!res?.data?.studioUpdate) { + setError({ + message: `Failed to save stashID to studio "${studio.data.name}"`, + details: res?.errors?.[0].message, + }); + return setSaveState(""); + } + studioID = res.data.studioUpdate.id; + } else if (studio.type === "existing") { + studioID = studio.data.id; + } else if (studio.type === "skip") { + studioID = stashScene.studio?.id; } - studioID = studioCreateResult.data.studioCreate.id; - } else if (studio.type === "update") { - setSaveState("Saving studio stashID"); - const res = await updateStudioStashID(studio.data, [ - ...studio.data.stash_ids, - { stash_id: scene.studio.stash_id, endpoint }, - ]); - if (!res?.data?.studioUpdate) { - setError({ - message: `Failed to save stashID to studio "${studio.data.name}"`, - details: res?.errors?.[0].message, - }); - return setSaveState(""); - } - studioID = res.data.studioUpdate.id; - } else if (studio.type === "existing") { - studioID = studio.data.id; - } else if (studio.type === "skip") { - studioID = stashScene.studio?.id; } setSaveState("Saving performers"); + let failed = false; performerIDs = await Promise.all( Object.keys(performers).map(async (stashID) => { const performer = performers[stashID]; @@ -157,6 +163,7 @@ export function useTagScene( message: `Failed to save performer "${performerInput.name}"`, details: res?.errors?.[0].message, }); + failed = true; return null; } performerID = res.data?.performerCreate.id; @@ -174,86 +181,57 @@ export function useTagScene( }) ); - if (!performerIDs.some((id) => !id)) { - setSaveState("Updating scene"); - const imgurl = scene.images[0]; - let imgData = null; - if (imgurl && options.setCoverImage) { - const img = await fetch(imgurl, { - mode: "cors", - cache: "no-store", - }); - if (img.status === 200) { - const blob = await img.blob(); - // Sanity check on image size since bad images will fail - if (blob.size > 10000) imgData = await blobToBase64(blob); - } - } - - let updatedTags = stashScene?.tags?.map((t) => t.id) ?? []; - if (options.setTags) { - const newTagIDs = options.tagOperation === "merge" ? updatedTags : []; - const tags = scene.tags ?? []; - if (tags.length > 0) { - const tagDict: Record = (allTags?.allTags ?? []) - .filter((t) => t.name) - .reduce( - (dict, t) => ({ ...dict, [t.name.toLowerCase()]: t.id }), - {} - ); - const newTags: string[] = []; - tags.forEach((tag) => { - if (tagDict[tag.name.toLowerCase()]) - newTagIDs.push(tagDict[tag.name.toLowerCase()]); - else newTags.push(tag.name); - }); - - const createdTags = await Promise.all( - newTags.map((tag) => createTag(tag)) - ); - createdTags.forEach((createdTag) => { - if (createdTag?.data?.tagCreate?.id) - newTagIDs.push(createdTag.data.tagCreate.id); - }); - } - updatedTags = uniq(newTagIDs); - } - - const performer_ids = performerIDs.filter( - (id) => id !== "Skip" - ) as string[]; - - const sceneUpdateResult = await updateScene({ - variables: { - input: { - id: stashScene.id ?? "", - title: scene.title, - details: scene.details, - date: scene.date, - performer_ids: - performer_ids.length === 0 - ? stashScene.performers.map((p) => p.id) - : performer_ids, - studio_id: studioID, - cover_image: imgData, - url: scene.url, - tag_ids: updatedTags, - stash_ids: [ - ...(stashScene?.stash_ids ?? []), - { - endpoint, - stash_id: scene.stash_id, - }, - ], - }, - }, - }); - - setSaveState(""); - return sceneUpdateResult?.data?.sceneUpdate; + if (failed) { + return setSaveState(""); } + setSaveState("Updating scene"); + const imgurl = scene.images[0]; + let imgData; + if (imgurl && options.setCoverImage) { + const img = await fetch(imgurl, { + mode: "cors", + cache: "no-store", + }); + if (img.status === 200) { + const blob = await img.blob(); + // Sanity check on image size since bad images will fail + if (blob.size > 10000) imgData = await blobToBase64(blob); + } + } + + const performer_ids = performerIDs.filter( + (id) => id !== "Skip" + ) as string[]; + + const sceneUpdateResult = await updateScene({ + variables: { + input: { + id: stashScene.id ?? "", + title: resolveField("title", stashScene.title, scene.title), + details: resolveField("details", stashScene.details, scene.details), + date: resolveField("date", stashScene.date, scene.date), + performer_ids: + performer_ids.length === 0 + ? stashScene.performers.map((p) => p.id) + : performer_ids, + studio_id: studioID, + cover_image: resolveField("cover_image", undefined, imgData), + url: resolveField("url", stashScene.url, scene.url), + tag_ids: tagIDs, + stash_ids: [ + ...(stashScene?.stash_ids ?? []), + { + endpoint, + stash_id: scene.stash_id, + }, + ], + }, + }, + }); + setSaveState(""); + return sceneUpdateResult?.data?.sceneUpdate; }; return handleSave; From 518be8ee702e0151f1b326f38f885f158bc0835b Mon Sep 17 00:00:00 2001 From: bnkai <48220860+bnkai@users.noreply.github.com> Date: Wed, 4 Aug 2021 02:52:16 +0300 Subject: [PATCH 14/51] Upgrade gjson module (#1610) --- go.mod | 4 +- go.sum | 31 +- vendor/github.com/tidwall/gjson/.travis.yml | 1 - vendor/github.com/tidwall/gjson/README.md | 23 +- vendor/github.com/tidwall/gjson/SYNTAX.md | 48 ++- vendor/github.com/tidwall/gjson/gjson.go | 374 ++++++++----------- vendor/github.com/tidwall/gjson/go.mod | 4 +- vendor/github.com/tidwall/gjson/go.sum | 8 +- vendor/github.com/tidwall/match/.travis.yml | 1 - vendor/github.com/tidwall/match/README.md | 21 +- vendor/github.com/tidwall/match/go.mod | 3 + vendor/github.com/tidwall/match/match.go | 21 +- vendor/github.com/tidwall/pretty/.travis.yml | 1 - vendor/github.com/tidwall/pretty/README.md | 18 +- vendor/github.com/tidwall/pretty/go.mod | 3 + vendor/github.com/tidwall/pretty/pretty.go | 302 +++++++++++++-- vendor/modules.txt | 6 +- 17 files changed, 546 insertions(+), 323 deletions(-) delete mode 100644 vendor/github.com/tidwall/gjson/.travis.yml delete mode 100644 vendor/github.com/tidwall/match/.travis.yml create mode 100644 vendor/github.com/tidwall/match/go.mod delete mode 100644 vendor/github.com/tidwall/pretty/.travis.yml create mode 100644 vendor/github.com/tidwall/pretty/go.mod diff --git a/go.mod b/go.mod index 3148b721c..2eba078d6 100644 --- a/go.mod +++ b/go.mod @@ -21,7 +21,6 @@ require ( github.com/jinzhu/copier v0.0.0-20190924061706-b57f9002281a github.com/jmoiron/sqlx v1.2.0 github.com/json-iterator/go v1.1.9 - github.com/knq/sysutil v0.0.0-20191005231841-15668db23d08 // indirect github.com/mattn/go-sqlite3 v1.14.6 github.com/natefinch/pie v0.0.0-20170715172608-9a0d72014007 github.com/remeh/sizedwaitgroup v1.0.0 @@ -32,7 +31,8 @@ require ( github.com/spf13/pflag v1.0.3 github.com/spf13/viper v1.7.0 github.com/stretchr/testify v1.5.1 - github.com/tidwall/gjson v1.6.0 + github.com/tidwall/gjson v1.8.1 + github.com/tidwall/pretty v1.2.0 // indirect github.com/vektah/gqlparser/v2 v2.0.1 github.com/vektra/mockery/v2 v2.2.1 golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 diff --git a/go.sum b/go.sum index 6c673e170..f70dae912 100644 --- a/go.sum +++ b/go.sum @@ -75,14 +75,9 @@ github.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625/go.mod h1:HYsPBT github.com/bradfitz/iter v0.0.0-20140124041915-454541ec3da2/go.mod h1:PyRFw1Lt2wKX4ZVSQ2mk+PeDa1rxyObEDlApuIsUKuo= github.com/bradfitz/iter v0.0.0-20190303215204-33e6a9893b0c/go.mod h1:PyRFw1Lt2wKX4ZVSQ2mk+PeDa1rxyObEDlApuIsUKuo= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= -github.com/chromedp/cdproto v0.0.0-20200116234248-4da64dd111ac/go.mod h1:PfAWWKJqjlGFYJEidUM6aVIWPr0EpobeyVWEEmplX7g= -github.com/chromedp/cdproto v0.0.0-20200608134039-8a80cdaf865c h1:qM1xzKK8kc93zKPkxK4iqtjksqDDrU6g9wGnr30jyLo= -github.com/chromedp/cdproto v0.0.0-20200608134039-8a80cdaf865c/go.mod h1:E6LPWRdIJc11h/di5p0rwvRmUYbhGpBEH7ZbPfzDIOE= github.com/chromedp/cdproto v0.0.0-20210526005521-9e51b9051fd0/go.mod h1:At5TxYYdxkbQL0TSefRjhLE3Q0lgvqKKMSFUglJ7i1U= github.com/chromedp/cdproto v0.0.0-20210622022015-fe1827b46b84 h1:Xxl4imt7LA3SbkrlIH5mm+mbzsv0tpHomLASTPINlvQ= github.com/chromedp/cdproto v0.0.0-20210622022015-fe1827b46b84/go.mod h1:At5TxYYdxkbQL0TSefRjhLE3Q0lgvqKKMSFUglJ7i1U= -github.com/chromedp/chromedp v0.5.3 h1:F9LafxmYpsQhWQBdCs+6Sret1zzeeFyHS5LkRF//Ffg= -github.com/chromedp/chromedp v0.5.3/go.mod h1:YLdPtndaHQ4rCpSpBG+IPpy9JvX0VD+7aaLxYgYj28w= github.com/chromedp/chromedp v0.7.3 h1:FvgJICfjvXtDX+miuMUY0NHuY8zQvjS/TcEQEG6Ldzs= github.com/chromedp/chromedp v0.7.3/go.mod h1:9gC521Yzgrk078Ulv6KIgG7hJ2x9aWrxMBBobTFk30A= github.com/chromedp/sysutil v1.0.0 h1:+ZxhTpfpZlmchB58ih/LBHX52ky7w2VhQVKQMucy3Ic= @@ -373,16 +368,10 @@ github.com/gobuffalo/uuid v2.0.5+incompatible/go.mod h1:ErhIzkRhm0FtRuiE/PeORqcw github.com/gobuffalo/validate v2.0.3+incompatible/go.mod h1:N+EtDe0J8252BgfzQUChBgfd6L93m9weay53EWFVsMM= github.com/gobuffalo/x v0.0.0-20181003152136-452098b06085/go.mod h1:WevpGD+5YOreDJznWevcn8NTmQEW5STSBgIkpkjzqXc= github.com/gobuffalo/x v0.0.0-20181007152206-913e47c59ca7/go.mod h1:9rDPXaB3kXdKWzMc4odGQQdG2e2DIEmANy5aSJ9yesY= -github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee h1:s+21KNqlpePfkah2I+gwHF8xmJWRjooY+5248k6m4A0= -github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= github.com/gobwas/httphead v0.1.0 h1:exrUm0f4YX0L7EBwZHuCF4GDp8aJfVeBrlLQrs6NqWU= github.com/gobwas/httphead v0.1.0/go.mod h1:O/RXo79gxV8G+RqlR/otEwx4Q36zl9rqC5u12GKvMCM= -github.com/gobwas/pool v0.2.0 h1:QEmUOlnSjWtnpRGHF3SauEiOsy82Cup83Vf2LcMlnc8= -github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= github.com/gobwas/pool v0.2.1 h1:xfeeEhW7pwmX8nuLVlqbzVc7udMDrwetjEv+TZIz1og= github.com/gobwas/pool v0.2.1/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= -github.com/gobwas/ws v1.0.2 h1:CoAavW/wd/kulfZmSIBt6p24n4j7tHgNVCjsfHVNUbo= -github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= github.com/gobwas/ws v1.1.0-rc.5 h1:QOAag7FoBaBYYHRqzqkhhd8fq5RTubvI4v3Ft/gDVVQ= github.com/gobwas/ws v1.1.0-rc.5/go.mod h1:nzvNcVha5eUziGrbxFCo6qFIojQHjJV5cLYIbezhfL0= github.com/gocql/gocql v0.0.0-20190301043612-f6df8288f9b4/go.mod h1:4Fw1eo5iaEhDUs8XyuhSVCVy52Jq3L+/3GJgYkwc+/0= @@ -431,6 +420,7 @@ github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+ github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e h1:JKmoR8x90Iww1ks85zJ1lfDGgIiMDuIptTOhJq+zKyg= github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v0.0.0-20160226214623-1ea25387ff6f/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= @@ -516,8 +506,6 @@ github.com/karrick/godirwalk v1.7.8/go.mod h1:2c9FRhkDxdIbgkOnCEvnSWs71Bhugbl46s github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/knq/sysutil v0.0.0-20191005231841-15668db23d08 h1:V0an7KRw92wmJysvFvtqtKMAPmvS5O0jtB0nYo6t+gs= -github.com/knq/sysutil v0.0.0-20191005231841-15668db23d08/go.mod h1:dFWs1zEqDjFtnBXsd1vPOZaLsESovai349994nHx3e0= github.com/konsorten/go-windows-terminal-sequences v0.0.0-20180402223658-b729f2633dfe/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= @@ -538,9 +526,6 @@ github.com/magiconair/properties v1.8.0 h1:LLgXmsheXeRoUOBOjtwPQCWIYqM/LU1ayDtDe github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= -github.com/mailru/easyjson v0.7.1 h1:mdxE1MF9o53iCb2Ghj1VfWvh7ZOwHpnVG/xwXrV90U8= -github.com/mailru/easyjson v0.7.1/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/markbates/deplist v1.0.4/go.mod h1:gRRbPbbuA8TmMiRvaOzUlRfzfjeCCBqX2A6arxN01MM= @@ -770,13 +755,15 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5 github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA= -github.com/tidwall/gjson v1.6.0 h1:9VEQWz6LLMUsUl6PueE49ir4Ka6CzLymOAZDxpFsTDc= -github.com/tidwall/gjson v1.6.0/go.mod h1:P256ACg0Mn+j1RXIDXoss50DeIABTYK1PULOJHhxOls= -github.com/tidwall/match v1.0.1 h1:PnKP62LPNxHKTwvHHZZzdOAOCtsJTjo6dZLCwpKm5xc= -github.com/tidwall/match v1.0.1/go.mod h1:LujAq0jyVjBy028G1WhWfIzbpQfMO8bBZ6Tyb0+pL9E= +github.com/tidwall/gjson v1.8.1 h1:8j5EE9Hrh3l9Od1OIEDAb7IpezNA20UdRngNAj5N0WU= +github.com/tidwall/gjson v1.8.1/go.mod h1:5/xDoumyyDNerp2U36lyolv46b3uF/9Bu6OfyQ9GImk= +github.com/tidwall/match v1.0.3 h1:FQUVvBImDutD8wJLN6c5eMzWtjgONK9MwIBCOrUJKeE= +github.com/tidwall/match v1.0.3/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/pretty v0.0.0-20180105212114-65a9db5fad51/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= -github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4= -github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= +github.com/tidwall/pretty v1.1.0 h1:K3hMW5epkdAVwibsQEfR/7Zj0Qgt4DxtNumTq/VloO8= +github.com/tidwall/pretty v1.1.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= +github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs= +github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= diff --git a/vendor/github.com/tidwall/gjson/.travis.yml b/vendor/github.com/tidwall/gjson/.travis.yml deleted file mode 100644 index 4f2ee4d97..000000000 --- a/vendor/github.com/tidwall/gjson/.travis.yml +++ /dev/null @@ -1 +0,0 @@ -language: go diff --git a/vendor/github.com/tidwall/gjson/README.md b/vendor/github.com/tidwall/gjson/README.md index 4108deb37..059570f9c 100644 --- a/vendor/github.com/tidwall/gjson/README.md +++ b/vendor/github.com/tidwall/gjson/README.md @@ -3,13 +3,10 @@ src="logo.png" width="240" height="78" border="0" alt="GJSON">
    -Build Status GoDoc GJSON Playground

    - -

    get json values quickly

    GJSON is a Go package that provides a [fast](#performance) and [simple](#get-a-value) way to get values from a json document. @@ -153,10 +150,6 @@ result.Less(token Result, caseSensitive bool) bool The `result.Value()` function returns an `interface{}` which requires type assertion and is one of the following Go types: -The `result.Array()` function returns back an array of values. -If the result represents a non-existent value, then an empty array will be returned. -If the result is not a JSON array, the return value will be an array containing one result. - ```go boolean >> bool number >> float64 @@ -166,6 +159,10 @@ array >> []interface{} object >> map[string]interface{} ``` +The `result.Array()` function returns back an array of values. +If the result represents a non-existent value, then an empty array will be returned. +If the result is not a JSON array, the return value will be an array containing one result. + ### 64-bit integers The `result.Int()` and `result.Uint()` calls are capable of reading all 64 bits, allowing for large JSON integers. @@ -476,7 +473,7 @@ JSON document used: } ``` -Each operation was rotated though one of the following search paths: +Each operation was rotated through one of the following search paths: ``` widget.window.name @@ -484,12 +481,4 @@ widget.image.hOffset widget.text.onMouseUp ``` -*These benchmarks were run on a MacBook Pro 15" 2.8 GHz Intel Core i7 using Go 1.8 and can be be found [here](https://github.com/tidwall/gjson-benchmarks).* - - -## Contact -Josh Baker [@tidwall](http://twitter.com/tidwall) - -## License - -GJSON source code is available under the MIT [License](/LICENSE). +*These benchmarks were run on a MacBook Pro 15" 2.8 GHz Intel Core i7 using Go 1.8 and can be found [here](https://github.com/tidwall/gjson-benchmarks).* diff --git a/vendor/github.com/tidwall/gjson/SYNTAX.md b/vendor/github.com/tidwall/gjson/SYNTAX.md index 5ea0407f5..bb6e92d54 100644 --- a/vendor/github.com/tidwall/gjson/SYNTAX.md +++ b/vendor/github.com/tidwall/gjson/SYNTAX.md @@ -77,14 +77,21 @@ Special purpose characters, such as `.`, `*`, and `?` can be escaped with `\`. fav\.movie "Deer Hunter" ``` -You'll also need to make sure that the `\` character is correctly escaped when hardcoding a path in source code. +You'll also need to make sure that the `\` character is correctly escaped when hardcoding a path in you source code. ```go -res := gjson.Get(json, "fav\\.movie") // must escape the slash -res := gjson.Get(json, `fav\.movie`) // no need to escape the slash - +// Go +val := gjson.Get(json, "fav\\.movie") // must escape the slash +val := gjson.Get(json, `fav\.movie`) // no need to escape the slash ``` +```rust +// Rust +let val = gjson::get(json, "fav\\.movie") // must escape the slash +let val = gjson::get(json, r#"fav\.movie"#) // no need to escape the slash +``` + + ### Arrays The `#` character allows for digging into JSON Arrays. @@ -128,6 +135,37 @@ changed in v1.3.0 as to avoid confusion with the new [multipath](#multipaths) syntax. For backwards compatibility, `#[...]` will continue to work until the next major release.* +The `~` (tilde) operator will convert a value to a boolean before comparison. + +For example, using the following JSON: + +```json +{ + "vals": [ + { "a": 1, "b": true }, + { "a": 2, "b": true }, + { "a": 3, "b": false }, + { "a": 4, "b": "0" }, + { "a": 5, "b": 0 }, + { "a": 6, "b": "1" }, + { "a": 7, "b": 1 }, + { "a": 8, "b": "true" }, + { "a": 9, "b": false }, + { "a": 10, "b": null }, + { "a": 11 } + ] +} +``` + +You can now query for all true(ish) or false(ish) values: + +``` +vals.#(b==~true)#.a >> [1,2,6,7,8] +vals.#(b==~false)#.a >> [3,4,5,9,10,11] +``` + +The last value which was non-existent is treated as `false` + ### Dot vs Pipe The `.` is standard separator, but it's also possible to use a `|`. @@ -248,6 +286,8 @@ gjson.AddModifier("case", func(json, arg string) string { "children.@case:lower.@reverse" ["jack","alex","sara"] ``` +*Note: Custom modifiers are not yet available in the Rust version* + ### Multipaths Starting with v1.3.0, GJSON added the ability to join multiple paths together diff --git a/vendor/github.com/tidwall/gjson/gjson.go b/vendor/github.com/tidwall/gjson/gjson.go index 0b6dcb098..8e6c0990c 100644 --- a/vendor/github.com/tidwall/gjson/gjson.go +++ b/vendor/github.com/tidwall/gjson/gjson.go @@ -3,7 +3,6 @@ package gjson import ( "encoding/json" - "reflect" "strconv" "strings" "time" @@ -106,7 +105,8 @@ func (t Result) Bool() bool { case True: return true case String: - return t.Str != "" && t.Str != "0" && t.Str != "false" + b, _ := strconv.ParseBool(strings.ToLower(t.Str)) + return b case Number: return t.Num != 0 } @@ -124,16 +124,17 @@ func (t Result) Int() int64 { return n case Number: // try to directly convert the float64 to int64 - n, ok := floatToInt(t.Num) - if !ok { - // now try to parse the raw string - n, ok = parseInt(t.Raw) - if !ok { - // fallback to a standard conversion - return int64(t.Num) - } + i, ok := safeInt(t.Num) + if ok { + return i } - return n + // now try to parse the raw string + i, ok = parseInt(t.Raw) + if ok { + return i + } + // fallback to a standard conversion + return int64(t.Num) } } @@ -149,16 +150,17 @@ func (t Result) Uint() uint64 { return n case Number: // try to directly convert the float64 to uint64 - n, ok := floatToUint(t.Num) - if !ok { - // now try to parse the raw string - n, ok = parseUint(t.Raw) - if !ok { - // fallback to a standard conversion - return uint64(t.Num) - } + i, ok := safeInt(t.Num) + if ok && i >= 0 { + return uint64(i) } - return n + // now try to parse the raw string + u, ok := parseUint(t.Raw) + if ok { + return u + } + // fallback to a standard conversion + return uint64(t.Num) } } @@ -495,6 +497,9 @@ func squash(json string) string { } } if depth == 0 { + if i >= len(json) { + return json + } return json[:i+1] } case '{', '[', '(': @@ -579,7 +584,7 @@ func tostr(json string) (raw string, str string) { continue } } - break + return json[:i+1], unescape(json[1:i]) } } var ret string @@ -709,10 +714,10 @@ type arrayPathResult struct { alogkey string query struct { on bool + all bool path string op string value string - all bool } } @@ -726,8 +731,13 @@ func parseArrayPath(path string) (r arrayPathResult) { } if path[i] == '.' { r.part = path[:i] - r.path = path[i+1:] - r.more = true + if !r.arrch && i < len(path)-1 && isDotPiperChar(path[i+1]) { + r.pipe = path[i+1:] + r.piped = true + } else { + r.path = path[i+1:] + r.more = true + } return } if path[i] == '#' { @@ -740,120 +750,27 @@ func parseArrayPath(path string) (r arrayPathResult) { } else if path[1] == '[' || path[1] == '(' { // query r.query.on = true - if true { - qpath, op, value, _, fi, ok := parseQuery(path[i:]) - if !ok { - // bad query, end now - break - } - r.query.path = qpath - r.query.op = op - r.query.value = value - i = fi - 1 - if i+1 < len(path) && path[i+1] == '#' { - r.query.all = true - } - } else { - var end byte - if path[1] == '[' { - end = ']' - } else { - end = ')' - } - i += 2 - // whitespace - for ; i < len(path); i++ { - if path[i] > ' ' { - break - } - } - s := i - for ; i < len(path); i++ { - if path[i] <= ' ' || - path[i] == '!' || - path[i] == '=' || - path[i] == '<' || - path[i] == '>' || - path[i] == '%' || - path[i] == end { - break - } - } - r.query.path = path[s:i] - // whitespace - for ; i < len(path); i++ { - if path[i] > ' ' { - break - } - } - if i < len(path) { - s = i - if path[i] == '!' { - if i < len(path)-1 && (path[i+1] == '=' || - path[i+1] == '%') { - i++ - } - } else if path[i] == '<' || path[i] == '>' { - if i < len(path)-1 && path[i+1] == '=' { - i++ - } - } else if path[i] == '=' { - if i < len(path)-1 && path[i+1] == '=' { - s++ - i++ - } - } - i++ - r.query.op = path[s:i] - // whitespace - for ; i < len(path); i++ { - if path[i] > ' ' { - break - } - } - s = i - for ; i < len(path); i++ { - if path[i] == '"' { - i++ - s2 := i - for ; i < len(path); i++ { - if path[i] > '\\' { - continue - } - if path[i] == '"' { - // look for an escaped slash - if path[i-1] == '\\' { - n := 0 - for j := i - 2; j > s2-1; j-- { - if path[j] != '\\' { - break - } - n++ - } - if n%2 == 0 { - continue - } - } - break - } - } - } else if path[i] == end { - if i+1 < len(path) && path[i+1] == '#' { - r.query.all = true - } - break - } - } - if i > len(path) { - i = len(path) - } - v := path[s:i] - for len(v) > 0 && v[len(v)-1] <= ' ' { - v = v[:len(v)-1] - } - r.query.value = v + qpath, op, value, _, fi, vesc, ok := + parseQuery(path[i:]) + if !ok { + // bad query, end now + break + } + if len(value) > 2 && value[0] == '"' && + value[len(value)-1] == '"' { + value = value[1 : len(value)-1] + if vesc { + value = unescape(value) } } + r.query.path = qpath + r.query.op = op + r.query.value = value + + i = fi - 1 + if i+1 < len(path) && path[i+1] == '#' { + r.query.all = true + } } } continue @@ -879,11 +796,11 @@ func parseArrayPath(path string) (r arrayPathResult) { // # middle // .cap # right func parseQuery(query string) ( - path, op, value, remain string, i int, ok bool, + path, op, value, remain string, i int, vesc, ok bool, ) { if len(query) < 2 || query[0] != '#' || (query[1] != '(' && query[1] != '[') { - return "", "", "", "", i, false + return "", "", "", "", i, false, false } i = 2 j := 0 // start of value part @@ -911,6 +828,7 @@ func parseQuery(query string) ( i++ for ; i < len(query); i++ { if query[i] == '\\' { + vesc = true i++ } else if query[i] == '"' { break @@ -919,7 +837,7 @@ func parseQuery(query string) ( } } if depth > 0 { - return "", "", "", "", i, false + return "", "", "", "", i, false, false } if j > 0 { path = trim(query[2:j]) @@ -956,7 +874,7 @@ func parseQuery(query string) ( path = trim(query[2:i]) remain = query[i+1:] } - return path, op, value, remain, i + 1, true + return path, op, value, remain, i + 1, vesc, true } func trim(s string) string { @@ -973,6 +891,11 @@ right: return s } +// peek at the next byte and see if it's a '@', '[', or '{'. +func isDotPiperChar(c byte) bool { + return !DisableModifiers && (c == '@' || c == '[' || c == '{') +} + type objectPathResult struct { part string path string @@ -991,12 +914,8 @@ func parseObjectPath(path string) (r objectPathResult) { return } if path[i] == '.' { - // peek at the next byte and see if it's a '@', '[', or '{'. r.part = path[:i] - if !DisableModifiers && - i < len(path)-1 && - (path[i+1] == '@' || - path[i+1] == '[' || path[i+1] == '{') { + if i < len(path)-1 && isDotPiperChar(path[i+1]) { r.pipe = path[i+1:] r.piped = true } else { @@ -1026,14 +945,11 @@ func parseObjectPath(path string) (r objectPathResult) { continue } else if path[i] == '.' { r.part = string(epart) - // peek at the next byte and see if it's a '@' modifier - if !DisableModifiers && - i < len(path)-1 && path[i+1] == '@' { + if i < len(path)-1 && isDotPiperChar(path[i+1]) { r.pipe = path[i+1:] r.piped = true } else { r.path = path[i+1:] - r.more = true } r.more = true return @@ -1258,8 +1174,14 @@ func parseObject(c *parseContext, i int, path string) (int, bool) { } func queryMatches(rp *arrayPathResult, value Result) bool { rpv := rp.query.value - if len(rpv) > 2 && rpv[0] == '"' && rpv[len(rpv)-1] == '"' { - rpv = rpv[1 : len(rpv)-1] + if len(rpv) > 0 && rpv[0] == '~' { + // convert to bool + rpv = rpv[1:] + if value.Bool() { + value = Result{Type: True} + } else { + value = Result{Type: False} + } } if !value.Exists() { return false @@ -1398,7 +1320,6 @@ func parseArray(c *parseContext, i int, path string) (int, bool) { } return false } - for i < len(c.json)+1 { if !rp.arrch { pmatch = partidx == h @@ -1600,10 +1521,17 @@ func parseArray(c *parseContext, i int, path string) (int, bool) { c.calcd = true return i + 1, true } - if len(multires) > 0 && !c.value.Exists() { - c.value = Result{ - Raw: string(append(multires, ']')), - Type: JSON, + if !c.value.Exists() { + if len(multires) > 0 { + c.value = Result{ + Raw: string(append(multires, ']')), + Type: JSON, + } + } else if rp.query.all { + c.value = Result{ + Raw: "[]", + Type: JSON, + } } } return i + 1, false @@ -1835,7 +1763,7 @@ type parseContext struct { // A path is in dot syntax, such as "name.last" or "age". // When the value is found it's returned immediately. // -// A path is a series of keys searated by a dot. +// A path is a series of keys separated by a dot. // A key may contain special wildcard characters '*' and '?'. // To access an array value use the index as the key. // To get the number of elements in an array or to access a child path, use @@ -1944,7 +1872,6 @@ func Get(json, path string) Result { } } } - var i int var c = &parseContext{json: json} if len(path) >= 2 && path[0] == '.' && path[1] == '.' { @@ -2169,11 +2096,6 @@ func parseAny(json string, i int, hit bool) (int, Result, bool) { return i, res, false } -var ( // used for testing - testWatchForFallback bool - testLastWasFallback bool -) - // GetMany searches json for the multiple paths. // The return value is a Result array where the number of items // will be equal to the number of input paths. @@ -2374,6 +2296,12 @@ func validnumber(data []byte, i int) (outi int, ok bool) { // sign if data[i] == '-' { i++ + if i == len(data) { + return i, false + } + if data[i] < '0' || data[i] > '9' { + return i, false + } } // int if i == len(data) { @@ -2524,25 +2452,14 @@ func parseInt(s string) (n int64, ok bool) { return n, true } -const minUint53 = 0 -const maxUint53 = 4503599627370495 -const minInt53 = -2251799813685248 -const maxInt53 = 2251799813685247 - -func floatToUint(f float64) (n uint64, ok bool) { - n = uint64(f) - if float64(n) == f && n >= minUint53 && n <= maxUint53 { - return n, true +// safeInt validates a given JSON number +// ensures it lies within the minimum and maximum representable JSON numbers +func safeInt(f float64) (n int64, ok bool) { + // https://tc39.es/ecma262/#sec-number.min_safe_integer || https://tc39.es/ecma262/#sec-number.max_safe_integer + if f < -9007199254740991 || f > 9007199254740991 { + return 0, false } - return 0, false -} - -func floatToInt(f float64) (n int64, ok bool) { - n = int64(f) - if float64(n) == f && n >= minInt53 && n <= maxInt53 { - return n, true - } - return 0, false + return int64(f), true } // execModifier parses the path to find a matching modifier function. @@ -2600,7 +2517,7 @@ func execModifier(json, path string) (pathOut, res string, ok bool) { // unwrap removes the '[]' or '{}' characters around json func unwrap(json string) string { json = trim(json) - if len(json) >= 2 && json[0] == '[' || json[0] == '{' { + if len(json) >= 2 && (json[0] == '[' || json[0] == '{') { json = json[1 : len(json)-1] } return json @@ -2632,6 +2549,26 @@ func ModifierExists(name string, fn func(json, arg string) string) bool { return ok } +// cleanWS remove any non-whitespace from string +func cleanWS(s string) string { + for i := 0; i < len(s); i++ { + switch s[i] { + case ' ', '\t', '\n', '\r': + continue + default: + var s2 []byte + for i := 0; i < len(s); i++ { + switch s[i] { + case ' ', '\t', '\n', '\r': + s2 = append(s2, s[i]) + } + } + return string(s2) + } + } + return s +} + // @pretty modifier makes the json look nice. func modPretty(json, arg string) string { if len(arg) > 0 { @@ -2641,9 +2578,9 @@ func modPretty(json, arg string) string { case "sortKeys": opts.SortKeys = value.Bool() case "indent": - opts.Indent = value.String() + opts.Indent = cleanWS(value.String()) case "prefix": - opts.Prefix = value.String() + opts.Prefix = cleanWS(value.String()) case "width": opts.Width = int(value.Int()) } @@ -2729,19 +2666,24 @@ func modFlatten(json, arg string) string { out = append(out, '[') var idx int res.ForEach(func(_, value Result) bool { - if idx > 0 { - out = append(out, ',') - } + var raw string if value.IsArray() { if deep { - out = append(out, unwrap(modFlatten(value.Raw, arg))...) + raw = unwrap(modFlatten(value.Raw, arg)) } else { - out = append(out, unwrap(value.Raw)...) + raw = unwrap(value.Raw) } } else { - out = append(out, value.Raw...) + raw = value.Raw + } + raw = strings.TrimSpace(raw) + if len(raw) > 0 { + if idx > 0 { + out = append(out, ',') + } + out = append(out, raw...) + idx++ } - idx++ return true }) out = append(out, ']') @@ -2825,6 +2767,19 @@ func modValid(json, arg string) string { return json } +// stringHeader instead of reflect.StringHeader +type stringHeader struct { + data unsafe.Pointer + len int +} + +// sliceHeader instead of reflect.SliceHeader +type sliceHeader struct { + data unsafe.Pointer + len int + cap int +} + // getBytes casts the input json bytes to a string and safely returns the // results as uniquely allocated data. This operation is intended to minimize // copies and allocations for the large json string->[]byte. @@ -2834,14 +2789,14 @@ func getBytes(json []byte, path string) Result { // unsafe cast to string result = Get(*(*string)(unsafe.Pointer(&json)), path) // safely get the string headers - rawhi := *(*reflect.StringHeader)(unsafe.Pointer(&result.Raw)) - strhi := *(*reflect.StringHeader)(unsafe.Pointer(&result.Str)) + rawhi := *(*stringHeader)(unsafe.Pointer(&result.Raw)) + strhi := *(*stringHeader)(unsafe.Pointer(&result.Str)) // create byte slice headers - rawh := reflect.SliceHeader{Data: rawhi.Data, Len: rawhi.Len} - strh := reflect.SliceHeader{Data: strhi.Data, Len: strhi.Len} - if strh.Data == 0 { + rawh := sliceHeader{data: rawhi.data, len: rawhi.len, cap: rawhi.len} + strh := sliceHeader{data: strhi.data, len: strhi.len, cap: rawhi.len} + if strh.data == nil { // str is nil - if rawh.Data == 0 { + if rawh.data == nil { // raw is nil result.Raw = "" } else { @@ -2849,19 +2804,20 @@ func getBytes(json []byte, path string) Result { result.Raw = string(*(*[]byte)(unsafe.Pointer(&rawh))) } result.Str = "" - } else if rawh.Data == 0 { + } else if rawh.data == nil { // raw is nil result.Raw = "" // str has data, safely copy the slice header to a string result.Str = string(*(*[]byte)(unsafe.Pointer(&strh))) - } else if strh.Data >= rawh.Data && - int(strh.Data)+strh.Len <= int(rawh.Data)+rawh.Len { + } else if uintptr(strh.data) >= uintptr(rawh.data) && + uintptr(strh.data)+uintptr(strh.len) <= + uintptr(rawh.data)+uintptr(rawh.len) { // Str is a substring of Raw. - start := int(strh.Data - rawh.Data) + start := uintptr(strh.data) - uintptr(rawh.data) // safely copy the raw slice header result.Raw = string(*(*[]byte)(unsafe.Pointer(&rawh))) // substring the raw - result.Str = result.Raw[start : start+strh.Len] + result.Str = result.Raw[start : start+uintptr(strh.len)] } else { // safely copy both the raw and str slice headers to strings result.Raw = string(*(*[]byte)(unsafe.Pointer(&rawh))) @@ -2876,9 +2832,9 @@ func getBytes(json []byte, path string) Result { // used instead. func fillIndex(json string, c *parseContext) { if len(c.value.Raw) > 0 && !c.calcd { - jhdr := *(*reflect.StringHeader)(unsafe.Pointer(&json)) - rhdr := *(*reflect.StringHeader)(unsafe.Pointer(&(c.value.Raw))) - c.value.Index = int(rhdr.Data - jhdr.Data) + jhdr := *(*stringHeader)(unsafe.Pointer(&json)) + rhdr := *(*stringHeader)(unsafe.Pointer(&(c.value.Raw))) + c.value.Index = int(uintptr(rhdr.data) - uintptr(jhdr.data)) if c.value.Index < 0 || c.value.Index >= len(json) { c.value.Index = 0 } @@ -2886,10 +2842,10 @@ func fillIndex(json string, c *parseContext) { } func stringBytes(s string) []byte { - return *(*[]byte)(unsafe.Pointer(&reflect.SliceHeader{ - Data: (*reflect.StringHeader)(unsafe.Pointer(&s)).Data, - Len: len(s), - Cap: len(s), + return *(*[]byte)(unsafe.Pointer(&sliceHeader{ + data: (*stringHeader)(unsafe.Pointer(&s)).data, + len: len(s), + cap: len(s), })) } diff --git a/vendor/github.com/tidwall/gjson/go.mod b/vendor/github.com/tidwall/gjson/go.mod index d851688cc..9853a3096 100644 --- a/vendor/github.com/tidwall/gjson/go.mod +++ b/vendor/github.com/tidwall/gjson/go.mod @@ -3,6 +3,6 @@ module github.com/tidwall/gjson go 1.12 require ( - github.com/tidwall/match v1.0.1 - github.com/tidwall/pretty v1.0.0 + github.com/tidwall/match v1.0.3 + github.com/tidwall/pretty v1.1.0 ) diff --git a/vendor/github.com/tidwall/gjson/go.sum b/vendor/github.com/tidwall/gjson/go.sum index a4a2d872c..739d13276 100644 --- a/vendor/github.com/tidwall/gjson/go.sum +++ b/vendor/github.com/tidwall/gjson/go.sum @@ -1,4 +1,4 @@ -github.com/tidwall/match v1.0.1 h1:PnKP62LPNxHKTwvHHZZzdOAOCtsJTjo6dZLCwpKm5xc= -github.com/tidwall/match v1.0.1/go.mod h1:LujAq0jyVjBy028G1WhWfIzbpQfMO8bBZ6Tyb0+pL9E= -github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4= -github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= +github.com/tidwall/match v1.0.3 h1:FQUVvBImDutD8wJLN6c5eMzWtjgONK9MwIBCOrUJKeE= +github.com/tidwall/match v1.0.3/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= +github.com/tidwall/pretty v1.1.0 h1:K3hMW5epkdAVwibsQEfR/7Zj0Qgt4DxtNumTq/VloO8= +github.com/tidwall/pretty v1.1.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= diff --git a/vendor/github.com/tidwall/match/.travis.yml b/vendor/github.com/tidwall/match/.travis.yml deleted file mode 100644 index 4f2ee4d97..000000000 --- a/vendor/github.com/tidwall/match/.travis.yml +++ /dev/null @@ -1 +0,0 @@ -language: go diff --git a/vendor/github.com/tidwall/match/README.md b/vendor/github.com/tidwall/match/README.md index 2aa5bc38b..5fdd4cf63 100644 --- a/vendor/github.com/tidwall/match/README.md +++ b/vendor/github.com/tidwall/match/README.md @@ -1,20 +1,17 @@ -Match -===== -Build Status -GoDoc +# Match + +[![GoDoc](https://godoc.org/github.com/tidwall/match?status.svg)](https://godoc.org/github.com/tidwall/match) Match is a very simple pattern matcher where '*' matches on any number characters and '?' matches on any one character. -Installing ----------- +## Installing ``` go get -u github.com/tidwall/match ``` -Example -------- +## Example ```go match.Match("hello", "*llo") @@ -23,10 +20,10 @@ match.Match("hello", "h*o") ``` -Contact -------- +## Contact + Josh Baker [@tidwall](http://twitter.com/tidwall) -License -------- +## License + Redcon source code is available under the MIT [License](/LICENSE). diff --git a/vendor/github.com/tidwall/match/go.mod b/vendor/github.com/tidwall/match/go.mod new file mode 100644 index 000000000..df19b5f77 --- /dev/null +++ b/vendor/github.com/tidwall/match/go.mod @@ -0,0 +1,3 @@ +module github.com/tidwall/match + +go 1.15 diff --git a/vendor/github.com/tidwall/match/match.go b/vendor/github.com/tidwall/match/match.go index fcfe998b5..57aabf424 100644 --- a/vendor/github.com/tidwall/match/match.go +++ b/vendor/github.com/tidwall/match/match.go @@ -1,4 +1,4 @@ -// Match provides a simple pattern matcher with unicode support. +// Package match provides a simple pattern matcher with unicode support. package match import "unicode/utf8" @@ -6,7 +6,7 @@ import "unicode/utf8" // Match returns true if str matches pattern. This is a very // simple wildcard match where '*' matches on any number characters // and '?' matches on any one character. - +// // pattern: // { term } // term: @@ -16,12 +16,16 @@ import "unicode/utf8" // '\\' c matches character c // func Match(str, pattern string) bool { + return deepMatch(str, pattern) +} + +func deepMatch(str, pattern string) bool { if pattern == "*" { return true } - return deepMatch(str, pattern) -} -func deepMatch(str, pattern string) bool { + for len(pattern) > 1 && pattern[0] == '*' && pattern[1] == '*' { + pattern = pattern[1:] + } for len(pattern) > 0 { if pattern[0] > 0x7f { return deepMatchRune(str, pattern) @@ -52,6 +56,13 @@ func deepMatch(str, pattern string) bool { } func deepMatchRune(str, pattern string) bool { + if pattern == "*" { + return true + } + for len(pattern) > 1 && pattern[0] == '*' && pattern[1] == '*' { + pattern = pattern[1:] + } + var sr, pr rune var srsz, prsz int diff --git a/vendor/github.com/tidwall/pretty/.travis.yml b/vendor/github.com/tidwall/pretty/.travis.yml deleted file mode 100644 index 4f2ee4d97..000000000 --- a/vendor/github.com/tidwall/pretty/.travis.yml +++ /dev/null @@ -1 +0,0 @@ -language: go diff --git a/vendor/github.com/tidwall/pretty/README.md b/vendor/github.com/tidwall/pretty/README.md index d2b8864d5..d3be5e54e 100644 --- a/vendor/github.com/tidwall/pretty/README.md +++ b/vendor/github.com/tidwall/pretty/README.md @@ -1,8 +1,6 @@ # Pretty -[![Build Status](https://img.shields.io/travis/tidwall/pretty.svg?style=flat-square)](https://travis-ci.org/tidwall/prettty) -[![Coverage Status](https://img.shields.io/badge/coverage-100%25-brightgreen.svg?style=flat-square)](http://gocover.io/github.com/tidwall/pretty) -[![GoDoc](https://img.shields.io/badge/api-reference-blue.svg?style=flat-square)](https://godoc.org/github.com/tidwall/pretty) +[![GoDoc](https://img.shields.io/badge/api-reference-blue.svg?style=flat-square)](https://pkg.go.dev/github.com/tidwall/pretty) Pretty is a Go package that provides [fast](#performance) methods for formatting JSON for human readability, or to compact JSON for smaller payloads. @@ -81,7 +79,6 @@ Will format the json to: {"name":{"first":"Tom","last":"Anderson"},"age":37,"children":["Sara","Alex","Jack"],"fav.movie":"Deer Hunter","friends":[{"first":"Janet","last":"Murphy","age":44}]}``` ``` - ## Customized output There's a `PrettyOptions(json, opts)` function which allows for customizing the output with the following options: @@ -106,14 +103,15 @@ type Options struct { Benchmarks of Pretty alongside the builtin `encoding/json` Indent/Compact methods. ``` -BenchmarkPretty-8 1000000 1283 ns/op 720 B/op 2 allocs/op -BenchmarkUgly-8 3000000 426 ns/op 240 B/op 1 allocs/op -BenchmarkUglyInPlace-8 5000000 340 ns/op 0 B/op 0 allocs/op -BenchmarkJSONIndent-8 300000 4628 ns/op 1069 B/op 4 allocs/op -BenchmarkJSONCompact-8 1000000 2469 ns/op 758 B/op 4 allocs/op +BenchmarkPretty-16 1000000 1034 ns/op 720 B/op 2 allocs/op +BenchmarkPrettySortKeys-16 586797 1983 ns/op 2848 B/op 14 allocs/op +BenchmarkUgly-16 4652365 254 ns/op 240 B/op 1 allocs/op +BenchmarkUglyInPlace-16 6481233 183 ns/op 0 B/op 0 allocs/op +BenchmarkJSONIndent-16 450654 2687 ns/op 1221 B/op 0 allocs/op +BenchmarkJSONCompact-16 685111 1699 ns/op 442 B/op 0 allocs/op ``` -*These benchmarks were run on a MacBook Pro 15" 2.8 GHz Intel Core i7 using Go 1.7.* +*These benchmarks were run on a MacBook Pro 2.4 GHz 8-Core Intel Core i9.* ## Contact Josh Baker [@tidwall](http://twitter.com/tidwall) diff --git a/vendor/github.com/tidwall/pretty/go.mod b/vendor/github.com/tidwall/pretty/go.mod new file mode 100644 index 000000000..6106735a3 --- /dev/null +++ b/vendor/github.com/tidwall/pretty/go.mod @@ -0,0 +1,3 @@ +module github.com/tidwall/pretty + +go 1.16 diff --git a/vendor/github.com/tidwall/pretty/pretty.go b/vendor/github.com/tidwall/pretty/pretty.go index 0a922d039..f3f756aad 100644 --- a/vendor/github.com/tidwall/pretty/pretty.go +++ b/vendor/github.com/tidwall/pretty/pretty.go @@ -1,7 +1,10 @@ package pretty import ( + "bytes" + "encoding/json" "sort" + "strconv" ) // Options is Pretty options @@ -84,6 +87,14 @@ func ugly(dst, src []byte) []byte { return dst } +func isNaNOrInf(src []byte) bool { + return src[0] == 'i' || //Inf + src[0] == 'I' || // inf + src[0] == '+' || // +Inf + src[0] == 'N' || // Nan + (src[0] == 'n' && len(src) > 1 && src[1] != 'u') // nan +} + func appendPrettyAny(buf, json []byte, i int, pretty bool, width int, prefix, indent string, sortkeys bool, tabs, nl, max int) ([]byte, int, int, bool) { for ; i < len(json); i++ { if json[i] <= ' ' { @@ -92,7 +103,8 @@ func appendPrettyAny(buf, json []byte, i int, pretty bool, width int, prefix, in if json[i] == '"' { return appendPrettyString(buf, json, i, nl) } - if (json[i] >= '0' && json[i] <= '9') || json[i] == '-' { + + if (json[i] >= '0' && json[i] <= '9') || json[i] == '-' || isNaNOrInf(json[i:]) { return appendPrettyNumber(buf, json, i, nl) } if json[i] == '{' { @@ -118,25 +130,121 @@ type pair struct { vstart, vend int } -type byKey struct { +type byKeyVal struct { sorted bool json []byte + buf []byte pairs []pair } -func (arr *byKey) Len() int { +func (arr *byKeyVal) Len() int { return len(arr.pairs) } -func (arr *byKey) Less(i, j int) bool { - key1 := arr.json[arr.pairs[i].kstart+1 : arr.pairs[i].kend-1] - key2 := arr.json[arr.pairs[j].kstart+1 : arr.pairs[j].kend-1] - return string(key1) < string(key2) +func (arr *byKeyVal) Less(i, j int) bool { + if arr.isLess(i, j, byKey) { + return true + } + if arr.isLess(j, i, byKey) { + return false + } + return arr.isLess(i, j, byVal) } -func (arr *byKey) Swap(i, j int) { +func (arr *byKeyVal) Swap(i, j int) { arr.pairs[i], arr.pairs[j] = arr.pairs[j], arr.pairs[i] arr.sorted = true } +type byKind int + +const ( + byKey byKind = 0 + byVal byKind = 1 +) + +type jtype int + +const ( + jnull jtype = iota + jfalse + jnumber + jstring + jtrue + jjson +) + +func getjtype(v []byte) jtype { + if len(v) == 0 { + return jnull + } + switch v[0] { + case '"': + return jstring + case 'f': + return jfalse + case 't': + return jtrue + case 'n': + return jnull + case '[', '{': + return jjson + default: + return jnumber + } +} + +func (arr *byKeyVal) isLess(i, j int, kind byKind) bool { + k1 := arr.json[arr.pairs[i].kstart:arr.pairs[i].kend] + k2 := arr.json[arr.pairs[j].kstart:arr.pairs[j].kend] + var v1, v2 []byte + if kind == byKey { + v1 = k1 + v2 = k2 + } else { + v1 = bytes.TrimSpace(arr.buf[arr.pairs[i].vstart:arr.pairs[i].vend]) + v2 = bytes.TrimSpace(arr.buf[arr.pairs[j].vstart:arr.pairs[j].vend]) + if len(v1) >= len(k1)+1 { + v1 = bytes.TrimSpace(v1[len(k1)+1:]) + } + if len(v2) >= len(k2)+1 { + v2 = bytes.TrimSpace(v2[len(k2)+1:]) + } + } + t1 := getjtype(v1) + t2 := getjtype(v2) + if t1 < t2 { + return true + } + if t1 > t2 { + return false + } + if t1 == jstring { + s1 := parsestr(v1) + s2 := parsestr(v2) + return string(s1) < string(s2) + } + if t1 == jnumber { + n1, _ := strconv.ParseFloat(string(v1), 64) + n2, _ := strconv.ParseFloat(string(v2), 64) + return n1 < n2 + } + return string(v1) < string(v2) + +} + +func parsestr(s []byte) []byte { + for i := 1; i < len(s); i++ { + if s[i] == '\\' { + var str string + json.Unmarshal(s, &str) + return []byte(str) + } + if s[i] == '"' { + return s[1:i] + } + } + return nil +} + func appendPrettyObject(buf, json []byte, i int, open, close byte, pretty bool, width int, prefix, indent string, sortkeys bool, tabs, nl, max int) ([]byte, int, int, bool) { var ok bool if width > 0 { @@ -174,7 +282,11 @@ func appendPrettyObject(buf, json []byte, i int, open, close byte, pretty bool, } if n > 0 { nl = len(buf) - buf = append(buf, '\n') + if buf[nl-1] == ' ' { + buf[nl-1] = '\n' + } else { + buf = append(buf, '\n') + } } if buf[len(buf)-1] != open { buf = appendTabs(buf, prefix, indent, tabs) @@ -193,7 +305,11 @@ func appendPrettyObject(buf, json []byte, i int, open, close byte, pretty bool, var p pair if pretty { nl = len(buf) - buf = append(buf, '\n') + if buf[nl-1] == ' ' { + buf[nl-1] = '\n' + } else { + buf = append(buf, '\n') + } if open == '{' && sortkeys { p.kstart = i p.vstart = len(buf) @@ -235,8 +351,8 @@ func sortPairs(json, buf []byte, pairs []pair) []byte { } vstart := pairs[0].vstart vend := pairs[len(pairs)-1].vend - arr := byKey{false, json, pairs} - sort.Sort(&arr) + arr := byKeyVal{false, json, buf, pairs} + sort.Stable(&arr) if !arr.sorted { return buf } @@ -305,6 +421,7 @@ func appendTabs(buf []byte, prefix, indent string, tabs int) []byte { type Style struct { Key, String, Number [2]string True, False, Null [2]string + Escape [2]string Append func(dst []byte, c byte) []byte } @@ -318,21 +435,26 @@ func hexp(p byte) byte { } // TerminalStyle is for terminals -var TerminalStyle = &Style{ - Key: [2]string{"\x1B[94m", "\x1B[0m"}, - String: [2]string{"\x1B[92m", "\x1B[0m"}, - Number: [2]string{"\x1B[93m", "\x1B[0m"}, - True: [2]string{"\x1B[96m", "\x1B[0m"}, - False: [2]string{"\x1B[96m", "\x1B[0m"}, - Null: [2]string{"\x1B[91m", "\x1B[0m"}, - Append: func(dst []byte, c byte) []byte { - if c < ' ' && (c != '\r' && c != '\n' && c != '\t' && c != '\v') { - dst = append(dst, "\\u00"...) - dst = append(dst, hexp((c>>4)&0xF)) - return append(dst, hexp((c)&0xF)) - } - return append(dst, c) - }, +var TerminalStyle *Style + +func init() { + TerminalStyle = &Style{ + Key: [2]string{"\x1B[94m", "\x1B[0m"}, + String: [2]string{"\x1B[92m", "\x1B[0m"}, + Number: [2]string{"\x1B[93m", "\x1B[0m"}, + True: [2]string{"\x1B[96m", "\x1B[0m"}, + False: [2]string{"\x1B[96m", "\x1B[0m"}, + Null: [2]string{"\x1B[91m", "\x1B[0m"}, + Escape: [2]string{"\x1B[35m", "\x1B[0m"}, + Append: func(dst []byte, c byte) []byte { + if c < ' ' && (c != '\r' && c != '\n' && c != '\t' && c != '\v') { + dst = append(dst, "\\u00"...) + dst = append(dst, hexp((c>>4)&0xF)) + return append(dst, hexp((c)&0xF)) + } + return append(dst, c) + }, + } } // Color will colorize the json. The style parma is used for customizing @@ -363,8 +485,39 @@ func Color(src []byte, style *Style) []byte { dst = append(dst, style.String[0]...) } dst = apnd(dst, '"') + esc := false + uesc := 0 for i = i + 1; i < len(src); i++ { - dst = apnd(dst, src[i]) + if src[i] == '\\' { + if key { + dst = append(dst, style.Key[1]...) + } else { + dst = append(dst, style.String[1]...) + } + dst = append(dst, style.Escape[0]...) + dst = apnd(dst, src[i]) + esc = true + if i+1 < len(src) && src[i+1] == 'u' { + uesc = 5 + } else { + uesc = 1 + } + } else if esc { + dst = apnd(dst, src[i]) + if uesc == 1 { + esc = false + dst = append(dst, style.Escape[1]...) + if key { + dst = append(dst, style.Key[0]...) + } else { + dst = append(dst, style.String[0]...) + } + } else { + uesc-- + } + } else { + dst = apnd(dst, src[i]) + } if src[i] == '"' { j := i - 1 for ; ; j-- { @@ -377,7 +530,9 @@ func Color(src []byte, style *Style) []byte { } } } - if key { + if esc { + dst = append(dst, style.Escape[1]...) + } else if key { dst = append(dst, style.Key[1]...) } else { dst = append(dst, style.String[1]...) @@ -393,7 +548,7 @@ func Color(src []byte, style *Style) []byte { dst = apnd(dst, src[i]) } else { var kind byte - if (src[i] >= '0' && src[i] <= '9') || src[i] == '-' { + if (src[i] >= '0' && src[i] <= '9') || src[i] == '-' || isNaNOrInf(src[i:]) { kind = '0' dst = append(dst, style.Number[0]...) } else if src[i] == 't' { @@ -430,3 +585,90 @@ func Color(src []byte, style *Style) []byte { } return dst } + +// Spec strips out comments and trailing commas and convert the input to a +// valid JSON per the official spec: https://tools.ietf.org/html/rfc8259 +// +// The resulting JSON will always be the same length as the input and it will +// include all of the same line breaks at matching offsets. This is to ensure +// the result can be later processed by a external parser and that that +// parser will report messages or errors with the correct offsets. +func Spec(src []byte) []byte { + return spec(src, nil) +} + +// SpecInPlace is the same as Spec, but this method reuses the input json +// buffer to avoid allocations. Do not use the original bytes slice upon return. +func SpecInPlace(src []byte) []byte { + return spec(src, src) +} + +func spec(src, dst []byte) []byte { + dst = dst[:0] + for i := 0; i < len(src); i++ { + if src[i] == '/' { + if i < len(src)-1 { + if src[i+1] == '/' { + dst = append(dst, ' ', ' ') + i += 2 + for ; i < len(src); i++ { + if src[i] == '\n' { + dst = append(dst, '\n') + break + } else if src[i] == '\t' || src[i] == '\r' { + dst = append(dst, src[i]) + } else { + dst = append(dst, ' ') + } + } + continue + } + if src[i+1] == '*' { + dst = append(dst, ' ', ' ') + i += 2 + for ; i < len(src)-1; i++ { + if src[i] == '*' && src[i+1] == '/' { + dst = append(dst, ' ', ' ') + i++ + break + } else if src[i] == '\n' || src[i] == '\t' || + src[i] == '\r' { + dst = append(dst, src[i]) + } else { + dst = append(dst, ' ') + } + } + continue + } + } + } + dst = append(dst, src[i]) + if src[i] == '"' { + for i = i + 1; i < len(src); i++ { + dst = append(dst, src[i]) + if src[i] == '"' { + j := i - 1 + for ; ; j-- { + if src[j] != '\\' { + break + } + } + if (j-i)%2 != 0 { + break + } + } + } + } else if src[i] == '}' || src[i] == ']' { + for j := len(dst) - 2; j >= 0; j-- { + if dst[j] <= ' ' { + continue + } + if dst[j] == ',' { + dst[j] = ' ' + } + break + } + } + } + return dst +} diff --git a/vendor/modules.txt b/vendor/modules.txt index 2dac88301..cde17c49c 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -300,11 +300,11 @@ github.com/stretchr/testify/assert github.com/stretchr/testify/mock # github.com/subosito/gotenv v1.2.0 github.com/subosito/gotenv -# github.com/tidwall/gjson v1.6.0 +# github.com/tidwall/gjson v1.8.1 github.com/tidwall/gjson -# github.com/tidwall/match v1.0.1 +# github.com/tidwall/match v1.0.3 github.com/tidwall/match -# github.com/tidwall/pretty v1.0.0 +# github.com/tidwall/pretty v1.2.0 github.com/tidwall/pretty # github.com/urfave/cli/v2 v2.1.1 github.com/urfave/cli/v2 From ac41416cd773188fa6021696a6d40edd95306771 Mon Sep 17 00:00:00 2001 From: gitgiggety <79809426+gitgiggety@users.noreply.github.com> Date: Wed, 4 Aug 2021 04:32:58 +0200 Subject: [PATCH 15/51] Restructure scraping settings (#1548) * Change scrapers overview into collapsible per type * Move scraping configuration to (renamed) scrapers tab Rename the Scrapers tab to Scraping and move the scraping configuration to this tab. --- graphql/documents/data/config.graphql | 9 ++ graphql/documents/mutations/config.graphql | 6 + graphql/schema/schema.graphql | 1 + graphql/schema/types/config.graphql | 31 +++- pkg/api/resolver_mutation_configure.go | 29 +++- pkg/api/resolver_query_configuration.go | 14 ++ ui/v2.5/src/App.tsx | 11 +- .../src/components/Changelog/versions/v090.md | 1 + ui/v2.5/src/components/Settings/Settings.tsx | 10 +- .../Settings/SettingsConfigurationPanel.tsx | 66 -------- ...ersPanel.tsx => SettingsScrapingPanel.tsx} | 144 +++++++++++++++--- ui/v2.5/src/core/StashService.ts | 7 + ui/v2.5/src/locales/de-DE.json | 5 +- ui/v2.5/src/locales/en-GB.json | 5 +- ui/v2.5/src/locales/pt-BR.json | 5 +- ui/v2.5/src/locales/zh-TW.json | 5 +- 16 files changed, 242 insertions(+), 107 deletions(-) rename ui/v2.5/src/components/Settings/{SettingsScrapersPanel.tsx => SettingsScrapingPanel.tsx} (63%) diff --git a/graphql/documents/data/config.graphql b/graphql/documents/data/config.graphql index 878f53298..329e9fb3b 100644 --- a/graphql/documents/data/config.graphql +++ b/graphql/documents/data/config.graphql @@ -64,6 +64,12 @@ fragment ConfigDLNAData on ConfigDLNAResult { interfaces } +fragment ConfigScrapingData on ConfigScrapingResult { + scraperUserAgent + scraperCertCheck + scraperCDPPath +} + fragment ConfigData on ConfigResult { general { ...ConfigGeneralData @@ -74,4 +80,7 @@ fragment ConfigData on ConfigResult { dlna { ...ConfigDLNAData } + scraping { + ...ConfigScrapingData + } } diff --git a/graphql/documents/mutations/config.graphql b/graphql/documents/mutations/config.graphql index 5d3e0e734..149d9bf28 100644 --- a/graphql/documents/mutations/config.graphql +++ b/graphql/documents/mutations/config.graphql @@ -24,6 +24,12 @@ mutation ConfigureDLNA($input: ConfigDLNAInput!) { } } +mutation ConfigureScraping($input: ConfigScrapingInput!) { + configureScraping(input: $input) { + ...ConfigScrapingData + } +} + mutation GenerateAPIKey($input: GenerateAPIKeyInput!) { generateAPIKey(input: $input) } diff --git a/graphql/schema/schema.graphql b/graphql/schema/schema.graphql index 5ac192854..c0ba269ef 100644 --- a/graphql/schema/schema.graphql +++ b/graphql/schema/schema.graphql @@ -212,6 +212,7 @@ type Mutation { configureGeneral(input: ConfigGeneralInput!): ConfigGeneralResult! configureInterface(input: ConfigInterfaceInput!): ConfigInterfaceResult! configureDLNA(input: ConfigDLNAInput!): ConfigDLNAResult! + configureScraping(input: ConfigScrapingInput!): ConfigScrapingResult! """Generate and set (or clear) API key""" generateAPIKey(input: GenerateAPIKeyInput!): String! diff --git a/graphql/schema/types/config.graphql b/graphql/schema/types/config.graphql index d9c3ae52c..d4251b82c 100644 --- a/graphql/schema/types/config.graphql +++ b/graphql/schema/types/config.graphql @@ -90,11 +90,11 @@ input ConfigGeneralInput { """Array of file regexp to exclude from Image Scans""" imageExcludes: [String!] """Scraper user agent string""" - scraperUserAgent: String + scraperUserAgent: String @deprecated(reason: "use mutation ConfigureScraping(input: ConfigScrapingInput) instead") """Scraper CDP path. Path to chrome executable or remote address""" - scraperCDPPath: String + scraperCDPPath: String @deprecated(reason: "use mutation ConfigureScraping(input: ConfigScrapingInput) instead") """Whether the scraper should check for invalid certificates""" - scraperCertCheck: Boolean! + scraperCertCheck: Boolean @deprecated(reason: "use mutation ConfigureScraping(input: ConfigScrapingInput) instead") """Stash-box instances used for tagging""" stashBoxes: [StashBoxInput!]! } @@ -163,11 +163,11 @@ type ConfigGeneralResult { """Array of file regexp to exclude from Image Scans""" imageExcludes: [String!]! """Scraper user agent string""" - scraperUserAgent: String + scraperUserAgent: String @deprecated(reason: "use ConfigResult.scraping instead") """Scraper CDP path. Path to chrome executable or remote address""" - scraperCDPPath: String + scraperCDPPath: String @deprecated(reason: "use ConfigResult.scraping instead") """Whether the scraper should check for invalid certificates""" - scraperCertCheck: Boolean! + scraperCertCheck: Boolean! @deprecated(reason: "use ConfigResult.scraping instead") """Stash-box instances used for tagging""" stashBoxes: [StashBox!]! } @@ -244,11 +244,30 @@ type ConfigDLNAResult { interfaces: [String!]! } +input ConfigScrapingInput { + """Scraper user agent string""" + scraperUserAgent: String + """Scraper CDP path. Path to chrome executable or remote address""" + scraperCDPPath: String + """Whether the scraper should check for invalid certificates""" + scraperCertCheck: Boolean! +} + +type ConfigScrapingResult { + """Scraper user agent string""" + scraperUserAgent: String + """Scraper CDP path. Path to chrome executable or remote address""" + scraperCDPPath: String + """Whether the scraper should check for invalid certificates""" + scraperCertCheck: Boolean! +} + """All configuration settings""" type ConfigResult { general: ConfigGeneralResult! interface: ConfigInterfaceResult! dlna: ConfigDLNAResult! + scraping: ConfigScrapingResult! } """Directory structure of a path""" diff --git a/pkg/api/resolver_mutation_configure.go b/pkg/api/resolver_mutation_configure.go index 7154ff219..6c10647ca 100644 --- a/pkg/api/resolver_mutation_configure.go +++ b/pkg/api/resolver_mutation_configure.go @@ -178,7 +178,9 @@ func (r *mutationResolver) ConfigureGeneral(ctx context.Context, input models.Co refreshScraperCache = true } - c.Set(config.ScraperCertCheck, input.ScraperCertCheck) + if input.ScraperCertCheck != nil { + c.Set(config.ScraperCertCheck, input.ScraperCertCheck) + } if input.StashBoxes != nil { if err := c.ValidateStashBoxes(input.StashBoxes); err != nil { @@ -291,6 +293,31 @@ func (r *mutationResolver) ConfigureDlna(ctx context.Context, input models.Confi return makeConfigDLNAResult(), nil } +func (r *mutationResolver) ConfigureScraping(ctx context.Context, input models.ConfigScrapingInput) (*models.ConfigScrapingResult, error) { + c := config.GetInstance() + + refreshScraperCache := false + if input.ScraperUserAgent != nil { + c.Set(config.ScraperUserAgent, input.ScraperUserAgent) + refreshScraperCache = true + } + + if input.ScraperCDPPath != nil { + c.Set(config.ScraperCDPPath, input.ScraperCDPPath) + refreshScraperCache = true + } + + c.Set(config.ScraperCertCheck, input.ScraperCertCheck) + if refreshScraperCache { + manager.GetInstance().RefreshScraperCache() + } + if err := c.Write(); err != nil { + return makeConfigScrapingResult(), err + } + + return makeConfigScrapingResult(), nil +} + func (r *mutationResolver) GenerateAPIKey(ctx context.Context, input models.GenerateAPIKeyInput) (string, error) { c := config.GetInstance() diff --git a/pkg/api/resolver_query_configuration.go b/pkg/api/resolver_query_configuration.go index a3e226073..cf284142a 100644 --- a/pkg/api/resolver_query_configuration.go +++ b/pkg/api/resolver_query_configuration.go @@ -39,6 +39,7 @@ func makeConfigResult() *models.ConfigResult { General: makeConfigGeneralResult(), Interface: makeConfigInterfaceResult(), Dlna: makeConfigDLNAResult(), + Scraping: makeConfigScrapingResult(), } } @@ -132,3 +133,16 @@ func makeConfigDLNAResult() *models.ConfigDLNAResult { Interfaces: config.GetDLNAInterfaces(), } } + +func makeConfigScrapingResult() *models.ConfigScrapingResult { + config := config.GetInstance() + + scraperUserAgent := config.GetScraperUserAgent() + scraperCDPPath := config.GetScraperCDPPath() + + return &models.ConfigScrapingResult{ + ScraperUserAgent: &scraperUserAgent, + ScraperCertCheck: config.GetScraperCertCheck(), + ScraperCDPPath: &scraperCDPPath, + } +} diff --git a/ui/v2.5/src/App.tsx b/ui/v2.5/src/App.tsx index fa506466b..c1560d1f5 100755 --- a/ui/v2.5/src/App.tsx +++ b/ui/v2.5/src/App.tsx @@ -1,7 +1,7 @@ import React, { useEffect } from "react"; import { Route, Switch, useRouteMatch } from "react-router-dom"; import { IntlProvider } from "react-intl"; -import { merge } from "lodash"; +import { mergeWith } from "lodash"; import { ToastProvider } from "src/hooks/Toast"; import LightboxProvider from "src/hooks/Lightbox/context"; import { library } from "@fortawesome/fontawesome-svg-core"; @@ -59,11 +59,16 @@ export const App: React.FC = () => { const messageLanguage = languageMessageString(language); // use en-GB as default messages if any messages aren't found in the chosen language - const mergedMessages = merge( + const mergedMessages = mergeWith( // eslint-disable-next-line @typescript-eslint/no-explicit-any (locales as any)[defaultMessageLanguage], // eslint-disable-next-line @typescript-eslint/no-explicit-any - (locales as any)[messageLanguage] + (locales as any)[messageLanguage], + (objVal, srcVal) => { + if (srcVal === "") { + return objVal; + } + } ); const messages = flattenMessages(mergedMessages); diff --git a/ui/v2.5/src/components/Changelog/versions/v090.md b/ui/v2.5/src/components/Changelog/versions/v090.md index d656a7ce9..1c5d14414 100644 --- a/ui/v2.5/src/components/Changelog/versions/v090.md +++ b/ui/v2.5/src/components/Changelog/versions/v090.md @@ -3,6 +3,7 @@ * Added not equals/greater than/less than modifiers for resolution criteria. ([#1568](https://github.com/stashapp/stash/pull/1568)) ### 🎨 Improvements +* Moved scraping settings into the Scraping settings page. ([#1548](https://github.com/stashapp/stash/pull/1548)) * Show current scene details in tagger view. ([#1605](https://github.com/stashapp/stash/pull/1605)) * Removed stripes and added background colour to default performer images (old images can be downloaded from the PR link). ([#1609](https://github.com/stashapp/stash/pull/1609)) * Added pt-BR language option. ([#1587](https://github.com/stashapp/stash/pull/1587)) diff --git a/ui/v2.5/src/components/Settings/Settings.tsx b/ui/v2.5/src/components/Settings/Settings.tsx index 027cad854..49c8f6c38 100644 --- a/ui/v2.5/src/components/Settings/Settings.tsx +++ b/ui/v2.5/src/components/Settings/Settings.tsx @@ -9,7 +9,7 @@ import { SettingsInterfacePanel } from "./SettingsInterfacePanel/SettingsInterfa import { SettingsLogsPanel } from "./SettingsLogsPanel"; import { SettingsTasksPanel } from "./SettingsTasksPanel/SettingsTasksPanel"; import { SettingsPluginsPanel } from "./SettingsPluginsPanel"; -import { SettingsScrapersPanel } from "./SettingsScrapersPanel"; +import { SettingsScrapingPanel } from "./SettingsScrapingPanel"; import { SettingsToolsPanel } from "./SettingsToolsPanel"; import { SettingsDLNAPanel } from "./SettingsDLNAPanel"; @@ -54,8 +54,8 @@ export const Settings: React.FC = () => { - - + + @@ -93,8 +93,8 @@ export const Settings: React.FC = () => { - - + + diff --git a/ui/v2.5/src/components/Settings/SettingsConfigurationPanel.tsx b/ui/v2.5/src/components/Settings/SettingsConfigurationPanel.tsx index 4f942632d..c20383c05 100644 --- a/ui/v2.5/src/components/Settings/SettingsConfigurationPanel.tsx +++ b/ui/v2.5/src/components/Settings/SettingsConfigurationPanel.tsx @@ -126,13 +126,6 @@ export const SettingsConfigurationPanel: React.FC = () => { const [excludes, setExcludes] = useState([]); const [imageExcludes, setImageExcludes] = useState([]); - const [scraperUserAgent, setScraperUserAgent] = useState( - undefined - ); - const [scraperCDPPath, setScraperCDPPath] = useState( - undefined - ); - const [scraperCertCheck, setScraperCertCheck] = useState(true); const [stashBoxes, setStashBoxes] = useState([]); const { data, error, loading } = useConfiguration(); @@ -173,9 +166,6 @@ export const SettingsConfigurationPanel: React.FC = () => { galleryExtensions: commaDelimitedToList(galleryExtensions), excludes, imageExcludes, - scraperUserAgent, - scraperCDPPath, - scraperCertCheck, stashBoxes: stashBoxes.map( (b) => ({ @@ -223,9 +213,6 @@ export const SettingsConfigurationPanel: React.FC = () => { ); setExcludes(conf.general.excludes); setImageExcludes(conf.general.imageExcludes); - setScraperUserAgent(conf.general.scraperUserAgent ?? undefined); - setScraperCDPPath(conf.general.scraperCDPPath ?? undefined); - setScraperCertCheck(conf.general.scraperCertCheck); setStashBoxes( conf.general.stashBoxes.map((box, i) => ({ name: box?.name ?? undefined, @@ -830,59 +817,6 @@ export const SettingsConfigurationPanel: React.FC = () => { - -

    {intl.formatMessage({ id: "config.general.scraping" })}

    - -
    - {intl.formatMessage({ id: "config.general.scraper_user_agent" })} -
    - ) => - setScraperUserAgent(e.currentTarget.value) - } - /> - - {intl.formatMessage({ - id: "config.general.scraper_user_agent_desc", - })} - -
    - - -
    - {intl.formatMessage({ id: "config.general.chrome_cdp_path" })} -
    - ) => - setScraperCDPPath(e.currentTarget.value) - } - /> - - {intl.formatMessage({ id: "config.general.chrome_cdp_path_desc" })} - -
    - - - setScraperCertCheck(!scraperCertCheck)} - /> - - {intl.formatMessage({ - id: "config.general.check_for_insecure_certificates_desc", - })} - - -
    -
    diff --git a/ui/v2.5/src/components/Settings/SettingsScrapersPanel.tsx b/ui/v2.5/src/components/Settings/SettingsScrapingPanel.tsx similarity index 63% rename from ui/v2.5/src/components/Settings/SettingsScrapersPanel.tsx rename to ui/v2.5/src/components/Settings/SettingsScrapingPanel.tsx index 86003cee3..51e81cd7c 100644 --- a/ui/v2.5/src/components/Settings/SettingsScrapersPanel.tsx +++ b/ui/v2.5/src/components/Settings/SettingsScrapingPanel.tsx @@ -1,16 +1,18 @@ -import React, { useState } from "react"; +import React, { useEffect, useState } from "react"; import { FormattedMessage, useIntl } from "react-intl"; -import { Button } from "react-bootstrap"; +import { Button, Form } from "react-bootstrap"; import { mutateReloadScrapers, useListMovieScrapers, useListPerformerScrapers, useListSceneScrapers, useListGalleryScrapers, + useConfiguration, + useConfigureScraping, } from "src/core/StashService"; import { useToast } from "src/hooks"; import { TextUtils } from "src/utils"; -import { Icon, LoadingIndicator } from "src/components/Shared"; +import { CollapseButton, Icon, LoadingIndicator } from "src/components/Shared"; import { ScrapeType } from "src/core/generated-graphql"; interface IURLList { @@ -67,7 +69,7 @@ const URLList: React.FC = ({ urls }) => { return
      {getListItems()}
    ; }; -export const SettingsScrapersPanel: React.FC = () => { +export const SettingsScrapingPanel: React.FC = () => { const Toast = useToast(); const intl = useIntl(); const { @@ -87,17 +89,62 @@ export const SettingsScrapersPanel: React.FC = () => { loading: loadingMovies, } = useListMovieScrapers(); + const [scraperUserAgent, setScraperUserAgent] = useState( + undefined + ); + const [scraperCDPPath, setScraperCDPPath] = useState( + undefined + ); + const [scraperCertCheck, setScraperCertCheck] = useState(true); + + const { data, error } = useConfiguration(); + + const [updateScrapingConfig] = useConfigureScraping({ + scraperUserAgent, + scraperCDPPath, + scraperCertCheck, + }); + + useEffect(() => { + if (!data?.configuration || error) return; + + const conf = data.configuration; + if (conf.scraping) { + setScraperUserAgent(conf.scraping.scraperUserAgent ?? undefined); + setScraperCDPPath(conf.scraping.scraperCDPPath ?? undefined); + setScraperCertCheck(conf.scraping.scraperCertCheck); + } + }, [data, error]); + async function onReloadScrapers() { await mutateReloadScrapers().catch((e) => Toast.error(e)); } + async function onSave() { + try { + await updateScrapingConfig(); + Toast.success({ + content: intl.formatMessage( + { id: "toast.updated_entity" }, + { + entity: intl + .formatMessage({ id: "configuration" }) + .toLocaleLowerCase(), + } + ), + }); + } catch (e) { + Toast.error(e); + } + } + function renderPerformerScrapeTypes(types: ScrapeType[]) { const typeStrings = types .filter((t) => t !== ScrapeType.Fragment) .map((t) => { switch (t) { case ScrapeType.Name: - return intl.formatMessage({ id: "config.scrapers.search_by_name" }); + return intl.formatMessage({ id: "config.scraping.search_by_name" }); default: return t; } @@ -117,7 +164,7 @@ export const SettingsScrapersPanel: React.FC = () => { switch (t) { case ScrapeType.Fragment: return intl.formatMessage( - { id: "config.scrapers.entity_metadata" }, + { id: "config.scraping.entity_metadata" }, { entityType: intl.formatMessage({ id: "scene" }) } ); default: @@ -139,7 +186,7 @@ export const SettingsScrapersPanel: React.FC = () => { switch (t) { case ScrapeType.Fragment: return intl.formatMessage( - { id: "config.scrapers.entity_metadata" }, + { id: "config.scraping.entity_metadata" }, { entityType: intl.formatMessage({ id: "gallery" }) } ); default: @@ -161,7 +208,7 @@ export const SettingsScrapersPanel: React.FC = () => { switch (t) { case ScrapeType.Fragment: return intl.formatMessage( - { id: "config.scrapers.entity_metadata" }, + { id: "config.scraping.entity_metadata" }, { entityType: intl.formatMessage({ id: "movie" }) } ); default: @@ -195,7 +242,7 @@ export const SettingsScrapersPanel: React.FC = () => { return renderTable( intl.formatMessage( - { id: "config.scrapers.entity_scrapers" }, + { id: "config.scraping.entity_scrapers" }, { entityType: intl.formatMessage({ id: "scene" }) } ), elements @@ -217,7 +264,7 @@ export const SettingsScrapersPanel: React.FC = () => { return renderTable( intl.formatMessage( - { id: "config.scrapers.entity_scrapers" }, + { id: "config.scraping.entity_scrapers" }, { entityType: intl.formatMessage({ id: "gallery" }) } ), elements @@ -241,7 +288,7 @@ export const SettingsScrapersPanel: React.FC = () => { return renderTable( intl.formatMessage( - { id: "config.scrapers.entity_scrapers" }, + { id: "config.scraping.entity_scrapers" }, { entityType: intl.formatMessage({ id: "performer" }) } ), elements @@ -261,7 +308,7 @@ export const SettingsScrapersPanel: React.FC = () => { return renderTable( intl.formatMessage( - { id: "config.scrapers.entity_scrapers" }, + { id: "config.scraping.entity_scrapers" }, { entityType: intl.formatMessage({ id: "movie" }) } ), elements @@ -271,25 +318,24 @@ export const SettingsScrapersPanel: React.FC = () => { function renderTable(title: string, elements: JSX.Element[]) { if (elements.length > 0) { return ( -
    -
    {title}
    + {elements}
    {intl.formatMessage({ id: "name" })} {intl.formatMessage({ - id: "config.scrapers.supported_types", + id: "config.scraping.supported_types", })} - {intl.formatMessage({ id: "config.scrapers.supported_urls" })} + {intl.formatMessage({ id: "config.scraping.supported_urls" })}
    -
    + ); } } @@ -299,7 +345,63 @@ export const SettingsScrapersPanel: React.FC = () => { return ( <> -

    {intl.formatMessage({ id: "config.categories.scrapers" })}

    + +

    {intl.formatMessage({ id: "config.general.scraping" })}

    + +
    + {intl.formatMessage({ id: "config.general.scraper_user_agent" })} +
    + ) => + setScraperUserAgent(e.currentTarget.value) + } + /> + + {intl.formatMessage({ + id: "config.general.scraper_user_agent_desc", + })} + +
    + + +
    + {intl.formatMessage({ id: "config.general.chrome_cdp_path" })} +
    + ) => + setScraperCDPPath(e.currentTarget.value) + } + /> + + {intl.formatMessage({ id: "config.general.chrome_cdp_path_desc" })} + +
    + + + setScraperCertCheck(!scraperCertCheck)} + /> + + {intl.formatMessage({ + id: "config.general.check_for_insecure_certificates_desc", + })} + + +
    + +
    + +

    {intl.formatMessage({ id: "config.scraping.scrapers" })}

    +
    + +
    + + ); }; diff --git a/ui/v2.5/src/core/StashService.ts b/ui/v2.5/src/core/StashService.ts index b0adfdbc8..44fc90b10 100644 --- a/ui/v2.5/src/core/StashService.ts +++ b/ui/v2.5/src/core/StashService.ts @@ -761,6 +761,13 @@ export const useRemoveTempDLNAIP = () => GQL.useRemoveTempDlnaipMutation(); export const useLoggingSubscribe = () => GQL.useLoggingSubscribeSubscription(); +export const useConfigureScraping = (input: GQL.ConfigScrapingInput) => + GQL.useConfigureScrapingMutation({ + variables: { input }, + refetchQueries: getQueryNames([GQL.ConfigurationDocument]), + update: deleteCache([GQL.ConfigurationDocument]), + }); + export const querySystemStatus = () => client.query({ query: GQL.SystemStatusDocument, diff --git a/ui/v2.5/src/locales/de-DE.json b/ui/v2.5/src/locales/de-DE.json index e60a157c2..e22e410cf 100644 --- a/ui/v2.5/src/locales/de-DE.json +++ b/ui/v2.5/src/locales/de-DE.json @@ -151,7 +151,7 @@ "interface": "Oberfläche", "logs": "Protokoll", "plugins": "Plugins", - "scrapers": "Scraper", + "scraping": "Scraping", "tasks": "Aufgaben", "tools": "Werkzeuge" }, @@ -240,9 +240,10 @@ "hooks": "Hooks", "triggers_on": "Auslösen bei" }, - "scrapers": { + "scraping": { "entity_metadata": "{entityType} Metadaten", "entity_scrapers": "{entityType} Scraper", + "scrapers": "Scraper", "search_by_name": "Suche nach Name", "supported_types": "Unterstützte Typen", "supported_urls": "URLs" diff --git a/ui/v2.5/src/locales/en-GB.json b/ui/v2.5/src/locales/en-GB.json index 5ea435dbc..b29a24db7 100644 --- a/ui/v2.5/src/locales/en-GB.json +++ b/ui/v2.5/src/locales/en-GB.json @@ -151,7 +151,7 @@ "interface": "Interface", "logs": "Logs", "plugins": "Plugins", - "scrapers": "Scrapers", + "scraping": "Scraping", "tasks": "Tasks", "tools": "Tools" }, @@ -240,9 +240,10 @@ "hooks": "Hooks", "triggers_on": "Triggers on" }, - "scrapers": { + "scraping": { "entity_metadata": "{entityType} Metadata", "entity_scrapers": "{entityType} scrapers", + "scrapers": "Scrapers", "search_by_name": "Search by name", "supported_types": "Supported types", "supported_urls": "URLs" diff --git a/ui/v2.5/src/locales/pt-BR.json b/ui/v2.5/src/locales/pt-BR.json index d7d4e620d..c56139dcd 100644 --- a/ui/v2.5/src/locales/pt-BR.json +++ b/ui/v2.5/src/locales/pt-BR.json @@ -151,7 +151,7 @@ "interface": "Interface", "logs": "Logs", "plugins": "Plugins", - "scrapers": "Scrapers", + "scraping": "Scraping", "tasks": "Tarefas", "tools": "Ferramentas" }, @@ -240,9 +240,10 @@ "hooks": "Hooks", "triggers_on": "Triggers on" }, - "scrapers": { + "scraping": { "entity_metadata": "{entityType} metadados", "entity_scrapers": "{entityType} scrapers", + "scrapers": "Scrapers", "search_by_name": "Buscar por nome", "supported_types": "Tipos suportados", "supported_urls": "URLs" diff --git a/ui/v2.5/src/locales/zh-TW.json b/ui/v2.5/src/locales/zh-TW.json index ebf1beeb3..83afac442 100644 --- a/ui/v2.5/src/locales/zh-TW.json +++ b/ui/v2.5/src/locales/zh-TW.json @@ -144,7 +144,7 @@ "interface": "介面", "logs": "日誌", "plugins": "插件", - "scrapers": "爬蟲", + "scraping": "爬蟲設定", "tasks": "排程", "tools": "工具" }, @@ -229,9 +229,10 @@ "logs": { "log_level": "日誌級別" }, - "scrapers": { + "scraping": { "entity_metadata": "{entityType}資訊", "entity_scrapers": "{entityType}爬蟲", + "scrapers": "爬蟲", "search_by_name": "透過名稱搜尋", "supported_types": "支援類型", "supported_urls": "支援網址" From 9d641c64e36e91a78769b42131643f252a81dd37 Mon Sep 17 00:00:00 2001 From: gitgiggety <79809426+gitgiggety@users.noreply.github.com> Date: Wed, 4 Aug 2021 05:39:24 +0200 Subject: [PATCH 16/51] Actually implement TagFilter.marker_count (#1603) * Actually implement TagFilter.marker_count The marker_count filter/criterion as defined in TagFilterType isn't actually implemented. This adds an implementation for it. Do note this implementation _might_ have performance issues because of using OR (in the join). Another implentation would be to remove both joins and use: ```SQL COUNT( SELECT id FROM scene_markers WHERE primary_tag_id = tags.id UNION SELECT scene_marker_id FROM scene_markers_tags WHERE tag_id = tags.id ) ``` Note this doesn't require a DISTINCT as UNION already removes any duplicate records. * Restore marker count filter and sorting Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com> --- pkg/sqlite/tag.go | 42 +++++++++---------- pkg/sqlite/tag_test.go | 30 +++++++------ .../src/components/Changelog/versions/v090.md | 1 + ui/v2.5/src/models/list-filter/tags.ts | 15 +++---- 4 files changed, 42 insertions(+), 46 deletions(-) diff --git a/pkg/sqlite/tag.go b/pkg/sqlite/tag.go index 444577a0a..bc6aac9c8 100644 --- a/pkg/sqlite/tag.go +++ b/pkg/sqlite/tag.go @@ -271,14 +271,6 @@ func (qb *tagQueryBuilder) makeFilter(tagFilter *models.TagFilterType) *filterBu query.not(qb.makeFilter(tagFilter.Not)) } - // if markerCount := tagFilter.MarkerCount; markerCount != nil { - // clause, count := getIntCriterionWhereClause("count(distinct scene_markers.id)", *markerCount) - // query.addHaving(clause) - // if count == 1 { - // query.addArg(markerCount.Value) - // } - // } - query.handleCriterion(stringCriterionHandler(tagFilter.Name, tagTable+".name")) query.handleCriterion(tagAliasCriterionHandler(qb, tagFilter.Aliases)) @@ -287,6 +279,7 @@ func (qb *tagQueryBuilder) makeFilter(tagFilter *models.TagFilterType) *filterBu query.handleCriterion(tagImageCountCriterionHandler(qb, tagFilter.ImageCount)) query.handleCriterion(tagGalleryCountCriterionHandler(qb, tagFilter.GalleryCount)) query.handleCriterion(tagPerformerCountCriterionHandler(qb, tagFilter.PerformerCount)) + query.handleCriterion(tagMarkerCountCriterionHandler(qb, tagFilter.MarkerCount)) return query } @@ -303,19 +296,6 @@ func (qb *tagQueryBuilder) Query(tagFilter *models.TagFilterType, findFilter *mo query.body = selectDistinctIDs(tagTable) - /* - query.body += ` - left join tags_image on tags_image.tag_id = tags.id - left join scenes_tags on scenes_tags.tag_id = tags.id - left join scene_markers_tags on scene_markers_tags.tag_id = tags.id - left join scene_markers on scene_markers.primary_tag_id = tags.id OR scene_markers.id = scene_markers_tags.scene_marker_id - left join scenes on scenes_tags.scene_id = scenes.id` - */ - - // the presence of joining on scene_markers.primary_tag_id and scene_markers_tags.tag_id - // appears to confuse sqlite and causes serious performance issues. - // Disabling querying/sorting on marker count for now. - if q := findFilter.Q; q != nil && *q != "" { query.join(tagAliasesTable, "", "tag_aliases.tag_id = tags.id") searchColumns := []string{"tags.name", "tag_aliases.alias"} @@ -439,6 +419,23 @@ func tagPerformerCountCriterionHandler(qb *tagQueryBuilder, performerCount *mode } } +func tagMarkerCountCriterionHandler(qb *tagQueryBuilder, markerCount *models.IntCriterionInput) criterionHandlerFunc { + return func(f *filterBuilder) { + if markerCount != nil { + f.addJoin("scene_markers_tags", "", "scene_markers_tags.tag_id = tags.id") + f.addJoin("scene_markers", "", "scene_markers_tags.scene_marker_id = scene_markers.id OR scene_markers.primary_tag_id = tags.id") + clause, count := getIntCriterionWhereClause("count(distinct scene_markers.id)", *markerCount) + + args := []interface{}{} + if count == 1 { + args = append(args, markerCount.Value) + } + + f.addHaving(clause, args...) + } + } +} + func (qb *tagQueryBuilder) getDefaultTagSort() string { return getSort("name", "ASC", "tags") } @@ -459,6 +456,9 @@ func (qb *tagQueryBuilder) getTagSort(query *queryBuilder, findFilter *models.Fi case "scenes_count": query.join("scenes_tags", "", "scenes_tags.tag_id = tags.id") return " ORDER BY COUNT(distinct scenes_tags.scene_id) " + direction + case "scene_markers_count": + query.join("scene_markers_tags", "", "scene_markers_tags.tag_id = tags.id") + return " ORDER BY COUNT(distinct scene_markers_tags.scene_marker_id) " + direction case "images_count": query.join("images_tags", "", "images_tags.tag_id = tags.id") return " ORDER BY COUNT(distinct images_tags.image_id) " + direction diff --git a/pkg/sqlite/tag_test.go b/pkg/sqlite/tag_test.go index c346d5032..add3753a7 100644 --- a/pkg/sqlite/tag_test.go +++ b/pkg/sqlite/tag_test.go @@ -320,26 +320,24 @@ func verifyTagSceneCount(t *testing.T, sceneCountCriterion models.IntCriterionIn }) } -// disabled due to performance issues +func TestTagQueryMarkerCount(t *testing.T) { + countCriterion := models.IntCriterionInput{ + Value: 1, + Modifier: models.CriterionModifierEquals, + } -// func TestTagQueryMarkerCount(t *testing.T) { -// countCriterion := models.IntCriterionInput{ -// Value: 1, -// Modifier: models.CriterionModifierEquals, -// } + verifyTagMarkerCount(t, countCriterion) -// verifyTagMarkerCount(t, countCriterion) + countCriterion.Modifier = models.CriterionModifierNotEquals + verifyTagMarkerCount(t, countCriterion) -// countCriterion.Modifier = models.CriterionModifierNotEquals -// verifyTagMarkerCount(t, countCriterion) + countCriterion.Modifier = models.CriterionModifierLessThan + verifyTagMarkerCount(t, countCriterion) -// countCriterion.Modifier = models.CriterionModifierLessThan -// verifyTagMarkerCount(t, countCriterion) - -// countCriterion.Value = 0 -// countCriterion.Modifier = models.CriterionModifierGreaterThan -// verifyTagMarkerCount(t, countCriterion) -// } + countCriterion.Value = 0 + countCriterion.Modifier = models.CriterionModifierGreaterThan + verifyTagMarkerCount(t, countCriterion) +} func verifyTagMarkerCount(t *testing.T, markerCountCriterion models.IntCriterionInput) { withTxn(func(r models.Repository) error { diff --git a/ui/v2.5/src/components/Changelog/versions/v090.md b/ui/v2.5/src/components/Changelog/versions/v090.md index 1c5d14414..4a10a7da9 100644 --- a/ui/v2.5/src/components/Changelog/versions/v090.md +++ b/ui/v2.5/src/components/Changelog/versions/v090.md @@ -1,4 +1,5 @@ ### ✨ New Features +* Added filtering and sorting on scene marker count for tags. ([#1603](https://github.com/stashapp/stash/pull/1603)) * Support excluding fields and editing tags when saving from scene tagger view. ([#1605](https://github.com/stashapp/stash/pull/1605)) * Added not equals/greater than/less than modifiers for resolution criteria. ([#1568](https://github.com/stashapp/stash/pull/1568)) diff --git a/ui/v2.5/src/models/list-filter/tags.ts b/ui/v2.5/src/models/list-filter/tags.ts index 59972ab39..4c098db43 100644 --- a/ui/v2.5/src/models/list-filter/tags.ts +++ b/ui/v2.5/src/models/list-filter/tags.ts @@ -8,13 +8,7 @@ import { ListFilterOptions } from "./filter-options"; import { DisplayMode } from "./types"; const defaultSortBy = "name"; -// scene markers count has been disabled for now due to performance -// issues -const sortByOptions = [ - "name", - "random", - /* "scene_markers_count" */ -] +const sortByOptions = ["name", "random"] .map(ListFilterOptions.createSortBy) .concat([ { @@ -33,6 +27,10 @@ const sortByOptions = [ messageID: "scene_count", value: "scenes_count", }, + { + messageID: "marker_count", + value: "scene_markers_count", + }, ]); const displayModeOptions = [DisplayMode.Grid, DisplayMode.List]; @@ -44,8 +42,7 @@ const criterionOptions = [ createMandatoryNumberCriterionOption("image_count"), createMandatoryNumberCriterionOption("gallery_count"), createMandatoryNumberCriterionOption("performer_count"), - // marker count has been disabled for now due to performance issues - // ListFilterModel.createCriterionOption("marker_count"), + createMandatoryNumberCriterionOption("marker_count"), ]; export const TagListFilterOptions = new ListFilterOptions( From 3e78d642a2a53a77536ef859a6b6fdab4410c7ea Mon Sep 17 00:00:00 2001 From: WithoutPants <53250216+WithoutPants@users.noreply.github.com> Date: Fri, 6 Aug 2021 11:41:51 +1000 Subject: [PATCH 17/51] Remove unnecessary fields from StudioData (#1618) --- graphql/documents/data/studio.graphql | 9 --------- 1 file changed, 9 deletions(-) diff --git a/graphql/documents/data/studio.graphql b/graphql/documents/data/studio.graphql index a9515c32d..68ec86f82 100644 --- a/graphql/documents/data/studio.graphql +++ b/graphql/documents/data/studio.graphql @@ -5,23 +5,14 @@ fragment StudioData on Studio { url parent_studio { id - checksum name url image_path - scene_count - image_count - gallery_count } child_studios { id - checksum name - url image_path - scene_count - image_count - gallery_count } image_path scene_count From 404eaa32d22248057fa3eea9515c915e649fa4d7 Mon Sep 17 00:00:00 2001 From: capnrowdy <84298449+capnrowdy@users.noreply.github.com> Date: Tue, 10 Aug 2021 13:51:31 +1000 Subject: [PATCH 18/51] Changes to Default Performer Images (for Accessibility) (#1489) * Changes to support custom URL paths * Refactor image resolver code * Initialise box files at startup * Update packr Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com> --- go.mod | 14 +- go.sum | 516 +- graphql/documents/data/config.graphql | 1 + graphql/schema/types/config.graphql | 4 + pkg/api/images.go | 76 +- pkg/api/resolver_mutation_configure.go | 5 + pkg/api/resolver_query_configuration.go | 73 +- pkg/api/routes_performer.go | 3 +- pkg/manager/config/config.go | 7 + .../src/components/Changelog/versions/v090.md | 1 + .../Settings/SettingsConfigurationPanel.tsx | 30 + .../SettingsInterfacePanel.tsx | 1 + ui/v2.5/src/locales/en-GB.json | 8 + vendor/github.com/BurntSushi/toml/.gitignore | 5 - vendor/github.com/BurntSushi/toml/.travis.yml | 15 - vendor/github.com/BurntSushi/toml/COMPATIBLE | 3 - vendor/github.com/BurntSushi/toml/COPYING | 21 - vendor/github.com/BurntSushi/toml/Makefile | 19 - vendor/github.com/BurntSushi/toml/README.md | 218 - vendor/github.com/BurntSushi/toml/decode.go | 509 - .../github.com/BurntSushi/toml/decode_meta.go | 121 - vendor/github.com/BurntSushi/toml/doc.go | 27 - vendor/github.com/BurntSushi/toml/encode.go | 568 - .../BurntSushi/toml/encoding_types.go | 19 - .../BurntSushi/toml/encoding_types_1.1.go | 18 - vendor/github.com/BurntSushi/toml/lex.go | 953 - vendor/github.com/BurntSushi/toml/parse.go | 592 - vendor/github.com/BurntSushi/toml/session.vim | 1 - .../github.com/BurntSushi/toml/type_check.go | 91 - .../github.com/BurntSushi/toml/type_fields.go | 242 - .../gobuffalo/buffalo-plugins/LICENSE | 21 - .../buffalo-plugins/plugins/cache.go | 96 - .../buffalo-plugins/plugins/command.go | 21 - .../buffalo-plugins/plugins/decorate.go | 98 - .../buffalo-plugins/plugins/events.go | 7 - .../gobuffalo/buffalo-plugins/plugins/log.go | 7 - .../buffalo-plugins/plugins/log_debug.go | 14 - .../plugins/plugdeps/command.go | 16 - .../plugins/plugdeps/plugdeps.go | 88 - .../plugins/plugdeps/plugin.go | 26 - .../plugins/plugdeps/plugins.go | 98 - .../buffalo-plugins/plugins/plugdeps/pop.go | 6 - .../buffalo-plugins/plugins/plugins.go | 232 - .../buffalo-plugins/plugins/version.go | 3 - vendor/github.com/gobuffalo/envy/.env | 5 - .../gobuffalo/envy/.gometalinter.json | 3 - vendor/github.com/gobuffalo/envy/.travis.yml | 36 - vendor/github.com/gobuffalo/envy/LICENSE.txt | 8 - vendor/github.com/gobuffalo/envy/Makefile | 46 - vendor/github.com/gobuffalo/envy/README.md | 93 - vendor/github.com/gobuffalo/envy/SHOULDERS.md | 16 - vendor/github.com/gobuffalo/envy/envy.go | 268 - vendor/github.com/gobuffalo/envy/go.mod | 8 - vendor/github.com/gobuffalo/envy/go.sum | 17 - vendor/github.com/gobuffalo/envy/version.go | 3 - .../gobuffalo/events/.gometalinter.json | 3 - .../github.com/gobuffalo/events/.travis.yml | 36 - vendor/github.com/gobuffalo/events/LICENSE | 21 - vendor/github.com/gobuffalo/events/Makefile | 55 - vendor/github.com/gobuffalo/events/README.md | 99 - vendor/github.com/gobuffalo/events/event.go | 56 - vendor/github.com/gobuffalo/events/events.go | 44 - vendor/github.com/gobuffalo/events/filter.go | 24 - vendor/github.com/gobuffalo/events/go.mod | 12 - vendor/github.com/gobuffalo/events/go.sum | 398 - .../github.com/gobuffalo/events/listener.go | 36 - .../gobuffalo/events/listener_map.go | 73 - vendor/github.com/gobuffalo/events/manager.go | 86 - vendor/github.com/gobuffalo/events/plugins.go | 68 - .../github.com/gobuffalo/events/shoulders.md | 50 - vendor/github.com/gobuffalo/events/version.go | 3 - vendor/github.com/gobuffalo/flect/.gitignore | 29 - .../gobuffalo/flect/.gometalinter.json | 3 - vendor/github.com/gobuffalo/flect/.travis.yml | 36 - vendor/github.com/gobuffalo/flect/LICENSE.txt | 8 - vendor/github.com/gobuffalo/flect/Makefile | 46 - vendor/github.com/gobuffalo/flect/README.md | 36 - vendor/github.com/gobuffalo/flect/acronyms.go | 152 - vendor/github.com/gobuffalo/flect/camelize.go | 48 - .../github.com/gobuffalo/flect/capitalize.go | 27 - .../github.com/gobuffalo/flect/custom_data.go | 83 - .../github.com/gobuffalo/flect/dasherize.go | 34 - vendor/github.com/gobuffalo/flect/flect.go | 43 - vendor/github.com/gobuffalo/flect/go.mod | 6 - vendor/github.com/gobuffalo/flect/go.sum | 8 - vendor/github.com/gobuffalo/flect/ident.go | 106 - .../github.com/gobuffalo/flect/lower_upper.go | 13 - .../github.com/gobuffalo/flect/name/char.go | 24 - .../github.com/gobuffalo/flect/name/file.go | 28 - .../github.com/gobuffalo/flect/name/folder.go | 36 - .../github.com/gobuffalo/flect/name/ident.go | 13 - .../github.com/gobuffalo/flect/name/join.go | 20 - vendor/github.com/gobuffalo/flect/name/key.go | 14 - .../github.com/gobuffalo/flect/name/name.go | 62 - .../gobuffalo/flect/name/os_path.go | 21 - .../gobuffalo/flect/name/package.go | 35 - .../gobuffalo/flect/name/param_id.go | 24 - .../gobuffalo/flect/name/resource.go | 24 - .../gobuffalo/flect/name/tablize.go | 17 - vendor/github.com/gobuffalo/flect/name/url.go | 5 - .../gobuffalo/flect/name/var_case.go | 49 - .../github.com/gobuffalo/flect/ordinalize.go | 43 - .../github.com/gobuffalo/flect/pascalize.go | 25 - .../gobuffalo/flect/plural_rules.go | 240 - .../github.com/gobuffalo/flect/pluralize.go | 49 - vendor/github.com/gobuffalo/flect/rule.go | 10 - .../gobuffalo/flect/singular_rules.go | 122 - .../github.com/gobuffalo/flect/singularize.go | 44 - vendor/github.com/gobuffalo/flect/titleize.go | 30 - .../github.com/gobuffalo/flect/underscore.go | 34 - vendor/github.com/gobuffalo/flect/version.go | 4 - .../gobuffalo/genny/.codeclimate.yml | 14 - vendor/github.com/gobuffalo/genny/.gitignore | 29 - .../gobuffalo/genny/.gometalinter.json | 3 - .../gobuffalo/genny/.goreleaser.yml | 28 - vendor/github.com/gobuffalo/genny/.travis.yml | 36 - vendor/github.com/gobuffalo/genny/LICENSE.txt | 8 - vendor/github.com/gobuffalo/genny/Makefile | 53 - vendor/github.com/gobuffalo/genny/README.md | 497 - .../github.com/gobuffalo/genny/SHOULDERS.md | 108 - vendor/github.com/gobuffalo/genny/confirm.go | 15 - vendor/github.com/gobuffalo/genny/dir.go | 18 - vendor/github.com/gobuffalo/genny/disk.go | 112 - .../github.com/gobuffalo/genny/dry_runner.go | 15 - vendor/github.com/gobuffalo/genny/events.go | 8 - vendor/github.com/gobuffalo/genny/file.go | 32 - vendor/github.com/gobuffalo/genny/force.go | 84 - .../github.com/gobuffalo/genny/generator.go | 104 - vendor/github.com/gobuffalo/genny/genny.go | 4 - vendor/github.com/gobuffalo/genny/go.mod | 20 - vendor/github.com/gobuffalo/genny/go.sum | 535 - vendor/github.com/gobuffalo/genny/group.go | 30 - vendor/github.com/gobuffalo/genny/helpers.go | 54 - vendor/github.com/gobuffalo/genny/logger.go | 8 - vendor/github.com/gobuffalo/genny/replacer.go | 20 - vendor/github.com/gobuffalo/genny/results.go | 30 - vendor/github.com/gobuffalo/genny/runner.go | 335 - vendor/github.com/gobuffalo/genny/step.go | 146 - .../github.com/gobuffalo/genny/transformer.go | 45 - vendor/github.com/gobuffalo/genny/version.go | 3 - .../github.com/gobuffalo/genny/wet_runner.go | 99 - vendor/github.com/gobuffalo/gogen/.gitignore | 29 - .../gobuffalo/gogen/.gometalinter.json | 3 - .../github.com/gobuffalo/gogen/add_import.go | 52 - .../gobuffalo/gogen/add_inside_block.go | 81 - vendor/github.com/gobuffalo/gogen/append.go | 22 - vendor/github.com/gobuffalo/gogen/files.go | 36 - vendor/github.com/gobuffalo/gogen/fmt.go | 40 - vendor/github.com/gobuffalo/gogen/get.go | 24 - vendor/github.com/gobuffalo/gogen/go.mod | 10 - vendor/github.com/gobuffalo/gogen/go.sum | 534 - .../gobuffalo/gogen/goimports/README.md | 5 - .../gobuffalo/gogen/goimports/goimports.go | 122 - .../gobuffalo/gogen/gomods/gomods.go | 32 - .../github.com/gobuffalo/gogen/gomods/init.go | 66 - .../github.com/gobuffalo/gogen/gomods/tidy.go | 25 - vendor/github.com/gobuffalo/gogen/package.go | 20 - .../gobuffalo/gogen/replace_block_body.go | 27 - .../gobuffalo/gogen/rewrite_import.go | 34 - .../github.com/gobuffalo/gogen/templates.go | 52 - vendor/github.com/gobuffalo/gogen/version.go | 4 - .../gobuffalo/logger/.gometalinter.json | 3 - vendor/github.com/gobuffalo/logger/LICENSE | 2 +- vendor/github.com/gobuffalo/logger/Makefile | 42 +- .../github.com/gobuffalo/logger/SHOULDERS.md | 18 + .../github.com/gobuffalo/logger/formatter.go | 1 + vendor/github.com/gobuffalo/logger/go.mod | 7 +- vendor/github.com/gobuffalo/logger/go.sum | 19 +- vendor/github.com/gobuffalo/logger/logger.go | 7 +- .../gobuffalo/logger/terminal_check.go | 4 +- vendor/github.com/gobuffalo/logger/version.go | 2 +- vendor/github.com/gobuffalo/mapi/.gitignore | 29 - .../gobuffalo/mapi/.gometalinter.json | 3 - vendor/github.com/gobuffalo/mapi/Makefile | 40 - vendor/github.com/gobuffalo/mapi/go.mod | 8 - vendor/github.com/gobuffalo/mapi/go.sum | 8 - vendor/github.com/gobuffalo/mapi/mapi.go | 109 - vendor/github.com/gobuffalo/mapi/shoulders.md | 10 - vendor/github.com/gobuffalo/mapi/version.go | 3 - vendor/github.com/gobuffalo/meta/.gitignore | 29 - .../gobuffalo/meta/.gometalinter.json | 3 - vendor/github.com/gobuffalo/meta/.travis.yml | 36 - vendor/github.com/gobuffalo/meta/LICENSE | 21 - vendor/github.com/gobuffalo/meta/Makefile | 46 - vendor/github.com/gobuffalo/meta/SHOULDERS.md | 20 - vendor/github.com/gobuffalo/meta/app.go | 156 - vendor/github.com/gobuffalo/meta/go.mod | 13 - vendor/github.com/gobuffalo/meta/go.sum | 375 - vendor/github.com/gobuffalo/meta/meta.go | 115 - vendor/github.com/gobuffalo/meta/tags.go | 39 - vendor/github.com/gobuffalo/meta/version.go | 3 - vendor/github.com/gobuffalo/packd/.gitignore | 1 - .../gobuffalo/packd/.gometalinter.json | 3 - vendor/github.com/gobuffalo/packd/LICENSE | 2 +- vendor/github.com/gobuffalo/packd/Makefile | 44 +- .../github.com/gobuffalo/packd/SHOULDERS.md | 10 + vendor/github.com/gobuffalo/packd/file.go | 10 +- vendor/github.com/gobuffalo/packd/go.mod | 8 +- vendor/github.com/gobuffalo/packd/go.sum | 17 +- .../github.com/markbates/errx}/.gitignore | 0 .../takeon/github.com/markbates/errx}/LICENSE | 0 .../github.com/markbates/errx}/Makefile | 35 +- .../github.com/markbates/errx/SHOULDERS.md | 6 + .../markbates/errx}/azure-pipelines.yml | 36 +- .../markbates/errx}/azure-tests.yml | 0 .../takeon/github.com/markbates/errx/errx.go | 23 + .../github.com/markbates/errx/version.go | 4 + .../{syncx/byte_map.go => packd/map.go} | 5 +- .../github.com/gobuffalo/packd/memory_box.go | 11 +- .../github.com/gobuffalo/packd/skip_walker.go | 4 +- vendor/github.com/gobuffalo/packd/version.go | 2 +- .../gobuffalo/packr/v2/.goreleaser.yml | 9 +- .../gobuffalo/packr/v2/.goreleaser.yml.plush | 9 +- vendor/github.com/gobuffalo/packr/v2/Makefile | 1 - .../github.com/gobuffalo/packr/v2/README.md | 87 +- .../gobuffalo/packr/v2/SHOULDERS.md | 16 +- vendor/github.com/gobuffalo/packr/v2/box.go | 55 +- .../gobuffalo/packr/v2/deprecated.go | 4 +- .../gobuffalo/packr/v2/file/resolver/disk.go | 40 +- .../v2/file/resolver/encoding/hex/hex.go | 5 +- .../packr/v2/file/resolver/hex_gzip.go | 9 +- .../packr/v2/file/resolver/in_memory.go | 3 +- vendor/github.com/gobuffalo/packr/v2/go.mod | 28 +- vendor/github.com/gobuffalo/packr/v2/go.sum | 600 +- .../github.com/gobuffalo/packr/v2/helpers.go | 3 +- .../gobuffalo/packr/v2/jam/parser/args.go | 7 +- .../gobuffalo/packr/v2/jam/parser/finder.go | 19 +- .../v2/jam/parser/gogen.go} | 19 +- .../gobuffalo/packr/v2/jam/parser/parser.go | 3 +- .../gobuffalo/packr/v2/jam/parser/prospect.go | 2 +- .../gobuffalo/packr/v2/jam/parser/roots.go | 5 +- .../gobuffalo/packr/v2/jam/parser/visitor.go | 42 +- vendor/github.com/gobuffalo/packr/v2/packr.go | 5 +- .../github.com/gobuffalo/packr/v2/pointer.go | 5 +- .../github.com/gobuffalo/packr/v2/version.go | 2 +- vendor/github.com/gobuffalo/packr/v2/walk.go | 7 +- vendor/github.com/gobuffalo/syncx/.gitignore | 29 - .../gobuffalo/syncx/.gometalinter.json | 3 - vendor/github.com/gobuffalo/syncx/.travis.yml | 36 - vendor/github.com/gobuffalo/syncx/LICENSE | 21 - vendor/github.com/gobuffalo/syncx/README.md | 18 - vendor/github.com/gobuffalo/syncx/go.mod | 7 - vendor/github.com/gobuffalo/syncx/go.sum | 6 - vendor/github.com/gobuffalo/syncx/int_map.go | 73 - .../gobuffalo/syncx/interface_map.go | 73 - .../github.com/gobuffalo/syncx/string_map.go | 73 - vendor/github.com/gobuffalo/syncx/version.go | 4 - vendor/github.com/joho/godotenv/.gitignore | 1 - vendor/github.com/joho/godotenv/.travis.yml | 8 - vendor/github.com/joho/godotenv/LICENCE | 23 - vendor/github.com/joho/godotenv/README.md | 163 - vendor/github.com/joho/godotenv/godotenv.go | 346 - .../github.com/karrick/godirwalk/.gitignore | 5 + vendor/github.com/karrick/godirwalk/README.md | 212 +- .../karrick/godirwalk/azure-pipelines.yml | 53 + vendor/github.com/karrick/godirwalk/bench.sh | 7 + .../karrick/godirwalk/debug_development.go | 14 + .../karrick/godirwalk/debug_release.go | 6 + vendor/github.com/karrick/godirwalk/dirent.go | 90 +- vendor/github.com/karrick/godirwalk/doc.go | 8 + vendor/github.com/karrick/godirwalk/go.mod | 2 +- vendor/github.com/karrick/godirwalk/go.sum | 2 - .../{withFileno.go => inoWithFileno.go} | 0 .../godirwalk/{withIno.go => inoWithIno.go} | 4 +- .../github.com/karrick/godirwalk/modeType.go | 22 + .../karrick/godirwalk/modeTypeWithType.go | 37 + .../karrick/godirwalk/modeTypeWithoutType.go | 18 + .../{withNamlen.go => nameWithNamlen.go} | 2 +- ...{withoutNamlen.go => nameWithoutNamlen.go} | 24 +- .../github.com/karrick/godirwalk/readdir.go | 16 +- .../karrick/godirwalk/readdir_unix.go | 182 +- .../karrick/godirwalk/readdir_windows.go | 68 +- .../karrick/godirwalk/reclenFromNamlen.go | 9 + .../karrick/godirwalk/reclenFromReclen.go | 9 + .../karrick/godirwalk/scandir_unix.go | 166 + .../karrick/godirwalk/scandir_windows.go | 133 + .../github.com/karrick/godirwalk/scanner.go | 44 + vendor/github.com/karrick/godirwalk/walk.go | 272 +- .../go-windows-terminal-sequences/LICENSE | 9 - .../go-windows-terminal-sequences/README.md | 41 - .../go-windows-terminal-sequences/go.mod | 1 - .../sequences.go | 36 - .../sequences_dummy.go | 11 - .../events => markbates/errx}/.gitignore | 0 .../mapi => markbates/errx}/LICENSE | 2 +- .../syncx => markbates/errx}/Makefile | 35 +- vendor/github.com/markbates/errx/SHOULDERS.md | 6 + .../errx}/azure-pipelines.yml | 36 +- .../logger => markbates/errx}/azure-tests.yml | 0 vendor/github.com/markbates/errx/errx.go | 49 + vendor/github.com/markbates/errx/go.mod | 3 + vendor/github.com/markbates/errx/go.sum | 0 vendor/github.com/markbates/errx/version.go | 4 + vendor/github.com/markbates/oncer/LICENSE | 2 +- vendor/github.com/markbates/oncer/Makefile | 61 +- .../github.com/markbates/oncer/SHOULDERS.md | 10 + .../oncer}/azure-pipelines.yml | 42 +- .../packd => markbates/oncer}/azure-tests.yml | 0 vendor/github.com/markbates/oncer/go.mod | 5 +- vendor/github.com/markbates/oncer/go.sum | 7 +- vendor/github.com/markbates/oncer/version.go | 4 + .../github.com/rogpeppe/go-internal/LICENSE | 27 - .../rogpeppe/go-internal/modfile/gopkgin.go | 47 - .../rogpeppe/go-internal/modfile/print.go | 164 - .../rogpeppe/go-internal/modfile/read.go | 869 - .../rogpeppe/go-internal/modfile/rule.go | 724 - .../rogpeppe/go-internal/module/module.go | 540 - .../rogpeppe/go-internal/semver/semver.go | 388 - vendor/github.com/sirupsen/logrus/.gitignore | 2 + .../github.com/sirupsen/logrus/.golangci.yml | 40 + vendor/github.com/sirupsen/logrus/.travis.yml | 22 +- .../github.com/sirupsen/logrus/CHANGELOG.md | 63 +- vendor/github.com/sirupsen/logrus/README.md | 46 +- .../github.com/sirupsen/logrus/appveyor.yml | 28 +- .../github.com/sirupsen/logrus/buffer_pool.go | 52 + vendor/github.com/sirupsen/logrus/entry.go | 126 +- vendor/github.com/sirupsen/logrus/exported.go | 47 +- vendor/github.com/sirupsen/logrus/go.mod | 6 +- vendor/github.com/sirupsen/logrus/go.sum | 12 +- .../sirupsen/logrus/json_formatter.go | 9 +- vendor/github.com/sirupsen/logrus/logger.go | 63 +- vendor/github.com/sirupsen/logrus/logrus.go | 2 +- .../sirupsen/logrus/terminal_check_bsd.go | 2 +- .../sirupsen/logrus/terminal_check_js.go | 7 + .../sirupsen/logrus/terminal_check_unix.go | 4 +- .../sirupsen/logrus/terminal_check_windows.go | 29 +- .../sirupsen/logrus/text_formatter.go | 62 +- vendor/github.com/sirupsen/logrus/writer.go | 6 + .../x/crypto/ssh/terminal/terminal.go | 989 +- .../x/crypto/ssh/terminal/util_linux.go | 10 - .../x/crypto/ssh/terminal/util_solaris.go | 124 - vendor/golang.org/x/net/html/const.go | 2 +- vendor/golang.org/x/net/html/foreign.go | 119 +- vendor/golang.org/x/net/html/parse.go | 15 +- vendor/golang.org/x/net/html/render.go | 2 +- .../x/net/internal/socket/cmsghdr.go | 3 +- .../x/net/internal/socket/cmsghdr_bsd.go | 1 + .../internal/socket/cmsghdr_linux_32bit.go | 1 + .../internal/socket/cmsghdr_linux_64bit.go | 1 + .../internal/socket/cmsghdr_solaris_64bit.go | 4 +- .../x/net/internal/socket/cmsghdr_stub.go | 17 +- .../x/net/internal/socket/cmsghdr_unix.go | 22 + .../net/internal/socket/cmsghdr_zos_s390x.go | 25 + .../x/net/internal/socket/error_unix.go | 3 +- .../x/net/internal/socket/iovec_32bit.go | 1 + .../x/net/internal/socket/iovec_64bit.go | 3 +- .../internal/socket/iovec_solaris_64bit.go | 4 +- .../x/net/internal/socket/iovec_stub.go | 3 +- .../x/net/internal/socket/mmsghdr_stub.go | 1 + .../x/net/internal/socket/mmsghdr_unix.go | 1 + .../x/net/internal/socket/msghdr_bsd.go | 1 + .../x/net/internal/socket/msghdr_bsdvar.go | 1 + .../net/internal/socket/msghdr_linux_32bit.go | 1 + .../net/internal/socket/msghdr_linux_64bit.go | 1 + .../internal/socket/msghdr_solaris_64bit.go | 4 +- .../x/net/internal/socket/msghdr_stub.go | 3 +- .../x/net/internal/socket/msghdr_zos_s390x.go | 36 + .../x/net/internal/socket/norace.go | 1 + .../golang.org/x/net/internal/socket/race.go | 1 + .../x/net/internal/socket/rawconn_mmsg.go | 1 + .../x/net/internal/socket/rawconn_msg.go | 7 +- .../x/net/internal/socket/rawconn_nommsg.go | 1 + .../x/net/internal/socket/rawconn_nomsg.go | 3 +- .../x/net/internal/socket/socket.go | 10 +- .../golang.org/x/net/internal/socket/sys.go | 14 +- .../x/net/internal/socket/sys_bsd.go | 1 + .../x/net/internal/socket/sys_bsdvar.go | 23 - .../x/net/internal/socket/sys_const_unix.go | 1 + .../x/net/internal/socket/sys_const_zos.go | 18 + .../x/net/internal/socket/sys_darwin.go | 7 - .../x/net/internal/socket/sys_dragonfly.go | 32 - .../x/net/internal/socket/sys_linkname.go | 1 + .../x/net/internal/socket/sys_linux.go | 6 +- .../x/net/internal/socket/sys_linux_386.go | 2 - .../net/internal/socket/sys_linux_riscv64.go | 1 + .../x/net/internal/socket/sys_linux_s390x.go | 2 - .../x/net/internal/socket/sys_posix.go | 3 +- .../x/net/internal/socket/sys_solaris.go | 11 - .../x/net/internal/socket/sys_stub.go | 19 +- .../x/net/internal/socket/sys_unix.go | 1 + ...{sys_go1_11_darwin.go => sys_zos_s390x.go} | 19 +- .../x/net/internal/socket/sys_zos_s390x.s | 11 + .../x/net/internal/socket/zsys_aix_ppc64.go | 6 +- .../x/net/internal/socket/zsys_darwin_386.go | 5 +- .../net/internal/socket/zsys_darwin_amd64.go | 5 +- .../x/net/internal/socket/zsys_darwin_arm.go | 5 +- .../net/internal/socket/zsys_darwin_arm64.go | 5 +- .../internal/socket/zsys_dragonfly_amd64.go | 5 +- .../x/net/internal/socket/zsys_freebsd_386.go | 5 +- .../net/internal/socket/zsys_freebsd_amd64.go | 5 +- .../x/net/internal/socket/zsys_freebsd_arm.go | 5 +- .../net/internal/socket/zsys_freebsd_arm64.go | 5 +- .../x/net/internal/socket/zsys_linux_386.go | 5 +- .../x/net/internal/socket/zsys_linux_amd64.go | 5 +- .../x/net/internal/socket/zsys_linux_arm.go | 2 - .../x/net/internal/socket/zsys_linux_arm64.go | 2 - .../x/net/internal/socket/zsys_linux_mips.go | 2 - .../net/internal/socket/zsys_linux_mips64.go | 2 - .../internal/socket/zsys_linux_mips64le.go | 2 - .../net/internal/socket/zsys_linux_mipsle.go | 2 - .../x/net/internal/socket/zsys_linux_ppc64.go | 2 - .../net/internal/socket/zsys_linux_ppc64le.go | 2 - .../net/internal/socket/zsys_linux_riscv64.go | 3 +- .../x/net/internal/socket/zsys_linux_s390x.go | 2 - .../x/net/internal/socket/zsys_netbsd_386.go | 2 - .../net/internal/socket/zsys_netbsd_amd64.go | 2 - .../x/net/internal/socket/zsys_netbsd_arm.go | 2 - .../net/internal/socket/zsys_netbsd_arm64.go | 5 +- .../x/net/internal/socket/zsys_openbsd_386.go | 5 +- .../net/internal/socket/zsys_openbsd_amd64.go | 5 +- .../x/net/internal/socket/zsys_openbsd_arm.go | 5 +- .../net/internal/socket/zsys_openbsd_arm64.go | 5 +- .../internal/socket/zsys_openbsd_mips64.go | 50 + .../net/internal/socket/zsys_solaris_amd64.go | 5 +- .../x/net/internal/socket/zsys_zos_s390x.go | 32 + vendor/golang.org/x/net/ipv4/control_bsd.go | 1 + .../golang.org/x/net/ipv4/control_pktinfo.go | 1 + vendor/golang.org/x/net/ipv4/control_stub.go | 3 +- vendor/golang.org/x/net/ipv4/control_unix.go | 1 + vendor/golang.org/x/net/ipv4/control_zos.go | 86 + vendor/golang.org/x/net/ipv4/header.go | 4 +- vendor/golang.org/x/net/ipv4/icmp_stub.go | 1 + vendor/golang.org/x/net/ipv4/payload_cmsg.go | 3 +- .../golang.org/x/net/ipv4/payload_nocmsg.go | 3 +- vendor/golang.org/x/net/ipv4/sockopt_posix.go | 3 +- vendor/golang.org/x/net/ipv4/sockopt_stub.go | 3 +- vendor/golang.org/x/net/ipv4/sys_aix.go | 1 + vendor/golang.org/x/net/ipv4/sys_asmreq.go | 1 + .../golang.org/x/net/ipv4/sys_asmreq_stub.go | 1 + vendor/golang.org/x/net/ipv4/sys_asmreqn.go | 1 + .../golang.org/x/net/ipv4/sys_asmreqn_stub.go | 1 + vendor/golang.org/x/net/ipv4/sys_bpf.go | 1 + vendor/golang.org/x/net/ipv4/sys_bpf_stub.go | 1 + vendor/golang.org/x/net/ipv4/sys_bsd.go | 1 + vendor/golang.org/x/net/ipv4/sys_ssmreq.go | 1 + .../golang.org/x/net/ipv4/sys_ssmreq_stub.go | 1 + vendor/golang.org/x/net/ipv4/sys_stub.go | 3 +- vendor/golang.org/x/net/ipv4/sys_zos.go | 55 + .../golang.org/x/net/ipv4/zsys_aix_ppc64.go | 1 + .../x/net/ipv4/zsys_linux_riscv64.go | 1 + .../golang.org/x/net/ipv4/zsys_zos_s390x.go | 80 + vendor/golang.org/x/net/publicsuffix/table.go | 20162 ++++++++-------- vendor/golang.org/x/sys/plan9/asm.s | 8 + vendor/golang.org/x/sys/plan9/asm_plan9_386.s | 30 + .../golang.org/x/sys/plan9/asm_plan9_amd64.s | 30 + vendor/golang.org/x/sys/plan9/asm_plan9_arm.s | 25 + vendor/golang.org/x/sys/plan9/const_plan9.go | 70 + vendor/golang.org/x/sys/plan9/dir_plan9.go | 212 + vendor/golang.org/x/sys/plan9/env_plan9.go | 31 + vendor/golang.org/x/sys/plan9/errors_plan9.go | 50 + vendor/golang.org/x/sys/plan9/mkall.sh | 150 + vendor/golang.org/x/sys/plan9/mkerrors.sh | 246 + .../golang.org/x/sys/plan9/mksysnum_plan9.sh | 23 + .../golang.org/x/sys/plan9/pwd_go15_plan9.go | 21 + vendor/golang.org/x/sys/plan9/pwd_plan9.go | 23 + vendor/golang.org/x/sys/plan9/race.go | 30 + vendor/golang.org/x/sys/plan9/race0.go | 25 + vendor/golang.org/x/sys/plan9/str.go | 22 + vendor/golang.org/x/sys/plan9/syscall.go | 116 + .../golang.org/x/sys/plan9/syscall_plan9.go | 349 + .../x/sys/plan9/zsyscall_plan9_386.go | 284 + .../x/sys/plan9/zsyscall_plan9_amd64.go | 284 + .../x/sys/plan9/zsyscall_plan9_arm.go | 284 + .../golang.org/x/sys/plan9/zsysnum_plan9.go | 49 + vendor/golang.org/x/sys/unix/ztypes_linux.go | 2 + .../golang.org/x/sys/windows/types_windows.go | 2 +- vendor/golang.org/x/term/AUTHORS | 3 + vendor/golang.org/x/term/CONTRIBUTING.md | 26 + vendor/golang.org/x/term/CONTRIBUTORS | 3 + .../goimports => golang.org/x/term}/LICENSE | 0 vendor/golang.org/x/term/PATENTS | 22 + vendor/golang.org/x/term/README.md | 19 + vendor/golang.org/x/term/go.mod | 5 + vendor/golang.org/x/term/go.sum | 2 + .../terminal/util_plan9.go => term/term.go} | 40 +- vendor/golang.org/x/term/term_plan9.go | 42 + .../terminal/util.go => term/term_unix.go} | 48 +- .../util_bsd.go => term/term_unix_bsd.go} | 3 +- .../util_aix.go => term/term_unix_other.go} | 7 +- vendor/golang.org/x/term/term_unsupported.go | 39 + .../util_windows.go => term/term_windows.go} | 48 +- vendor/golang.org/x/term/terminal.go | 987 + .../x/text/encoding/unicode/unicode.go | 94 +- .../golang.org/x/text/transform/transform.go | 6 +- .../x/text/unicode/norm/tables11.0.0.go | 2 +- .../x/text/unicode/norm/tables12.0.0.go | 7710 ++++++ vendor/modules.txt | 58 +- 487 files changed, 24741 insertions(+), 29244 deletions(-) delete mode 100644 vendor/github.com/BurntSushi/toml/.gitignore delete mode 100644 vendor/github.com/BurntSushi/toml/.travis.yml delete mode 100644 vendor/github.com/BurntSushi/toml/COMPATIBLE delete mode 100644 vendor/github.com/BurntSushi/toml/COPYING delete mode 100644 vendor/github.com/BurntSushi/toml/Makefile delete mode 100644 vendor/github.com/BurntSushi/toml/README.md delete mode 100644 vendor/github.com/BurntSushi/toml/decode.go delete mode 100644 vendor/github.com/BurntSushi/toml/decode_meta.go delete mode 100644 vendor/github.com/BurntSushi/toml/doc.go delete mode 100644 vendor/github.com/BurntSushi/toml/encode.go delete mode 100644 vendor/github.com/BurntSushi/toml/encoding_types.go delete mode 100644 vendor/github.com/BurntSushi/toml/encoding_types_1.1.go delete mode 100644 vendor/github.com/BurntSushi/toml/lex.go delete mode 100644 vendor/github.com/BurntSushi/toml/parse.go delete mode 100644 vendor/github.com/BurntSushi/toml/session.vim delete mode 100644 vendor/github.com/BurntSushi/toml/type_check.go delete mode 100644 vendor/github.com/BurntSushi/toml/type_fields.go delete mode 100644 vendor/github.com/gobuffalo/buffalo-plugins/LICENSE delete mode 100644 vendor/github.com/gobuffalo/buffalo-plugins/plugins/cache.go delete mode 100644 vendor/github.com/gobuffalo/buffalo-plugins/plugins/command.go delete mode 100644 vendor/github.com/gobuffalo/buffalo-plugins/plugins/decorate.go delete mode 100644 vendor/github.com/gobuffalo/buffalo-plugins/plugins/events.go delete mode 100644 vendor/github.com/gobuffalo/buffalo-plugins/plugins/log.go delete mode 100644 vendor/github.com/gobuffalo/buffalo-plugins/plugins/log_debug.go delete mode 100644 vendor/github.com/gobuffalo/buffalo-plugins/plugins/plugdeps/command.go delete mode 100644 vendor/github.com/gobuffalo/buffalo-plugins/plugins/plugdeps/plugdeps.go delete mode 100644 vendor/github.com/gobuffalo/buffalo-plugins/plugins/plugdeps/plugin.go delete mode 100644 vendor/github.com/gobuffalo/buffalo-plugins/plugins/plugdeps/plugins.go delete mode 100644 vendor/github.com/gobuffalo/buffalo-plugins/plugins/plugdeps/pop.go delete mode 100644 vendor/github.com/gobuffalo/buffalo-plugins/plugins/plugins.go delete mode 100644 vendor/github.com/gobuffalo/buffalo-plugins/plugins/version.go delete mode 100644 vendor/github.com/gobuffalo/envy/.env delete mode 100644 vendor/github.com/gobuffalo/envy/.gometalinter.json delete mode 100644 vendor/github.com/gobuffalo/envy/.travis.yml delete mode 100644 vendor/github.com/gobuffalo/envy/LICENSE.txt delete mode 100644 vendor/github.com/gobuffalo/envy/Makefile delete mode 100644 vendor/github.com/gobuffalo/envy/README.md delete mode 100644 vendor/github.com/gobuffalo/envy/SHOULDERS.md delete mode 100644 vendor/github.com/gobuffalo/envy/envy.go delete mode 100644 vendor/github.com/gobuffalo/envy/go.mod delete mode 100644 vendor/github.com/gobuffalo/envy/go.sum delete mode 100644 vendor/github.com/gobuffalo/envy/version.go delete mode 100644 vendor/github.com/gobuffalo/events/.gometalinter.json delete mode 100644 vendor/github.com/gobuffalo/events/.travis.yml delete mode 100644 vendor/github.com/gobuffalo/events/LICENSE delete mode 100644 vendor/github.com/gobuffalo/events/Makefile delete mode 100644 vendor/github.com/gobuffalo/events/README.md delete mode 100644 vendor/github.com/gobuffalo/events/event.go delete mode 100644 vendor/github.com/gobuffalo/events/events.go delete mode 100644 vendor/github.com/gobuffalo/events/filter.go delete mode 100644 vendor/github.com/gobuffalo/events/go.mod delete mode 100644 vendor/github.com/gobuffalo/events/go.sum delete mode 100644 vendor/github.com/gobuffalo/events/listener.go delete mode 100644 vendor/github.com/gobuffalo/events/listener_map.go delete mode 100644 vendor/github.com/gobuffalo/events/manager.go delete mode 100644 vendor/github.com/gobuffalo/events/plugins.go delete mode 100644 vendor/github.com/gobuffalo/events/shoulders.md delete mode 100644 vendor/github.com/gobuffalo/events/version.go delete mode 100644 vendor/github.com/gobuffalo/flect/.gitignore delete mode 100644 vendor/github.com/gobuffalo/flect/.gometalinter.json delete mode 100644 vendor/github.com/gobuffalo/flect/.travis.yml delete mode 100644 vendor/github.com/gobuffalo/flect/LICENSE.txt delete mode 100644 vendor/github.com/gobuffalo/flect/Makefile delete mode 100644 vendor/github.com/gobuffalo/flect/README.md delete mode 100644 vendor/github.com/gobuffalo/flect/acronyms.go delete mode 100644 vendor/github.com/gobuffalo/flect/camelize.go delete mode 100644 vendor/github.com/gobuffalo/flect/capitalize.go delete mode 100644 vendor/github.com/gobuffalo/flect/custom_data.go delete mode 100644 vendor/github.com/gobuffalo/flect/dasherize.go delete mode 100644 vendor/github.com/gobuffalo/flect/flect.go delete mode 100644 vendor/github.com/gobuffalo/flect/go.mod delete mode 100644 vendor/github.com/gobuffalo/flect/go.sum delete mode 100644 vendor/github.com/gobuffalo/flect/ident.go delete mode 100644 vendor/github.com/gobuffalo/flect/lower_upper.go delete mode 100644 vendor/github.com/gobuffalo/flect/name/char.go delete mode 100644 vendor/github.com/gobuffalo/flect/name/file.go delete mode 100644 vendor/github.com/gobuffalo/flect/name/folder.go delete mode 100644 vendor/github.com/gobuffalo/flect/name/ident.go delete mode 100644 vendor/github.com/gobuffalo/flect/name/join.go delete mode 100644 vendor/github.com/gobuffalo/flect/name/key.go delete mode 100644 vendor/github.com/gobuffalo/flect/name/name.go delete mode 100644 vendor/github.com/gobuffalo/flect/name/os_path.go delete mode 100644 vendor/github.com/gobuffalo/flect/name/package.go delete mode 100644 vendor/github.com/gobuffalo/flect/name/param_id.go delete mode 100644 vendor/github.com/gobuffalo/flect/name/resource.go delete mode 100644 vendor/github.com/gobuffalo/flect/name/tablize.go delete mode 100644 vendor/github.com/gobuffalo/flect/name/url.go delete mode 100644 vendor/github.com/gobuffalo/flect/name/var_case.go delete mode 100644 vendor/github.com/gobuffalo/flect/ordinalize.go delete mode 100644 vendor/github.com/gobuffalo/flect/pascalize.go delete mode 100644 vendor/github.com/gobuffalo/flect/plural_rules.go delete mode 100644 vendor/github.com/gobuffalo/flect/pluralize.go delete mode 100644 vendor/github.com/gobuffalo/flect/rule.go delete mode 100644 vendor/github.com/gobuffalo/flect/singular_rules.go delete mode 100644 vendor/github.com/gobuffalo/flect/singularize.go delete mode 100644 vendor/github.com/gobuffalo/flect/titleize.go delete mode 100644 vendor/github.com/gobuffalo/flect/underscore.go delete mode 100644 vendor/github.com/gobuffalo/flect/version.go delete mode 100644 vendor/github.com/gobuffalo/genny/.codeclimate.yml delete mode 100644 vendor/github.com/gobuffalo/genny/.gitignore delete mode 100644 vendor/github.com/gobuffalo/genny/.gometalinter.json delete mode 100644 vendor/github.com/gobuffalo/genny/.goreleaser.yml delete mode 100644 vendor/github.com/gobuffalo/genny/.travis.yml delete mode 100644 vendor/github.com/gobuffalo/genny/LICENSE.txt delete mode 100644 vendor/github.com/gobuffalo/genny/Makefile delete mode 100644 vendor/github.com/gobuffalo/genny/README.md delete mode 100644 vendor/github.com/gobuffalo/genny/SHOULDERS.md delete mode 100644 vendor/github.com/gobuffalo/genny/confirm.go delete mode 100644 vendor/github.com/gobuffalo/genny/dir.go delete mode 100644 vendor/github.com/gobuffalo/genny/disk.go delete mode 100644 vendor/github.com/gobuffalo/genny/dry_runner.go delete mode 100644 vendor/github.com/gobuffalo/genny/events.go delete mode 100644 vendor/github.com/gobuffalo/genny/file.go delete mode 100644 vendor/github.com/gobuffalo/genny/force.go delete mode 100644 vendor/github.com/gobuffalo/genny/generator.go delete mode 100644 vendor/github.com/gobuffalo/genny/genny.go delete mode 100644 vendor/github.com/gobuffalo/genny/go.mod delete mode 100644 vendor/github.com/gobuffalo/genny/go.sum delete mode 100644 vendor/github.com/gobuffalo/genny/group.go delete mode 100644 vendor/github.com/gobuffalo/genny/helpers.go delete mode 100644 vendor/github.com/gobuffalo/genny/logger.go delete mode 100644 vendor/github.com/gobuffalo/genny/replacer.go delete mode 100644 vendor/github.com/gobuffalo/genny/results.go delete mode 100644 vendor/github.com/gobuffalo/genny/runner.go delete mode 100644 vendor/github.com/gobuffalo/genny/step.go delete mode 100644 vendor/github.com/gobuffalo/genny/transformer.go delete mode 100644 vendor/github.com/gobuffalo/genny/version.go delete mode 100644 vendor/github.com/gobuffalo/genny/wet_runner.go delete mode 100644 vendor/github.com/gobuffalo/gogen/.gitignore delete mode 100644 vendor/github.com/gobuffalo/gogen/.gometalinter.json delete mode 100644 vendor/github.com/gobuffalo/gogen/add_import.go delete mode 100644 vendor/github.com/gobuffalo/gogen/add_inside_block.go delete mode 100644 vendor/github.com/gobuffalo/gogen/append.go delete mode 100644 vendor/github.com/gobuffalo/gogen/files.go delete mode 100644 vendor/github.com/gobuffalo/gogen/fmt.go delete mode 100644 vendor/github.com/gobuffalo/gogen/get.go delete mode 100644 vendor/github.com/gobuffalo/gogen/go.mod delete mode 100644 vendor/github.com/gobuffalo/gogen/go.sum delete mode 100644 vendor/github.com/gobuffalo/gogen/goimports/README.md delete mode 100644 vendor/github.com/gobuffalo/gogen/goimports/goimports.go delete mode 100644 vendor/github.com/gobuffalo/gogen/gomods/gomods.go delete mode 100644 vendor/github.com/gobuffalo/gogen/gomods/init.go delete mode 100644 vendor/github.com/gobuffalo/gogen/gomods/tidy.go delete mode 100644 vendor/github.com/gobuffalo/gogen/package.go delete mode 100644 vendor/github.com/gobuffalo/gogen/replace_block_body.go delete mode 100644 vendor/github.com/gobuffalo/gogen/rewrite_import.go delete mode 100644 vendor/github.com/gobuffalo/gogen/templates.go delete mode 100644 vendor/github.com/gobuffalo/gogen/version.go delete mode 100644 vendor/github.com/gobuffalo/logger/.gometalinter.json create mode 100644 vendor/github.com/gobuffalo/logger/SHOULDERS.md delete mode 100644 vendor/github.com/gobuffalo/mapi/.gitignore delete mode 100644 vendor/github.com/gobuffalo/mapi/.gometalinter.json delete mode 100644 vendor/github.com/gobuffalo/mapi/Makefile delete mode 100644 vendor/github.com/gobuffalo/mapi/go.mod delete mode 100644 vendor/github.com/gobuffalo/mapi/go.sum delete mode 100644 vendor/github.com/gobuffalo/mapi/mapi.go delete mode 100644 vendor/github.com/gobuffalo/mapi/shoulders.md delete mode 100644 vendor/github.com/gobuffalo/mapi/version.go delete mode 100644 vendor/github.com/gobuffalo/meta/.gitignore delete mode 100644 vendor/github.com/gobuffalo/meta/.gometalinter.json delete mode 100644 vendor/github.com/gobuffalo/meta/.travis.yml delete mode 100644 vendor/github.com/gobuffalo/meta/LICENSE delete mode 100644 vendor/github.com/gobuffalo/meta/Makefile delete mode 100644 vendor/github.com/gobuffalo/meta/SHOULDERS.md delete mode 100644 vendor/github.com/gobuffalo/meta/app.go delete mode 100644 vendor/github.com/gobuffalo/meta/go.mod delete mode 100644 vendor/github.com/gobuffalo/meta/go.sum delete mode 100644 vendor/github.com/gobuffalo/meta/meta.go delete mode 100644 vendor/github.com/gobuffalo/meta/tags.go delete mode 100644 vendor/github.com/gobuffalo/meta/version.go delete mode 100644 vendor/github.com/gobuffalo/packd/.gometalinter.json create mode 100644 vendor/github.com/gobuffalo/packd/SHOULDERS.md rename vendor/github.com/gobuffalo/{envy => packd/internal/takeon/github.com/markbates/errx}/.gitignore (100%) rename vendor/github.com/gobuffalo/{gogen => packd/internal/takeon/github.com/markbates/errx}/LICENSE (100%) rename vendor/github.com/gobuffalo/{gogen => packd/internal/takeon/github.com/markbates/errx}/Makefile (61%) create mode 100644 vendor/github.com/gobuffalo/packd/internal/takeon/github.com/markbates/errx/SHOULDERS.md rename vendor/github.com/gobuffalo/{gogen => packd/internal/takeon/github.com/markbates/errx}/azure-pipelines.yml (61%) rename vendor/github.com/gobuffalo/{gogen => packd/internal/takeon/github.com/markbates/errx}/azure-tests.yml (100%) create mode 100644 vendor/github.com/gobuffalo/packd/internal/takeon/github.com/markbates/errx/errx.go create mode 100644 vendor/github.com/gobuffalo/packd/internal/takeon/github.com/markbates/errx/version.go rename vendor/github.com/gobuffalo/{syncx/byte_map.go => packd/map.go} (85%) rename vendor/github.com/gobuffalo/{gogen/parsed_file.go => packr/v2/jam/parser/gogen.go} (53%) delete mode 100644 vendor/github.com/gobuffalo/syncx/.gitignore delete mode 100644 vendor/github.com/gobuffalo/syncx/.gometalinter.json delete mode 100644 vendor/github.com/gobuffalo/syncx/.travis.yml delete mode 100644 vendor/github.com/gobuffalo/syncx/LICENSE delete mode 100644 vendor/github.com/gobuffalo/syncx/README.md delete mode 100644 vendor/github.com/gobuffalo/syncx/go.mod delete mode 100644 vendor/github.com/gobuffalo/syncx/go.sum delete mode 100644 vendor/github.com/gobuffalo/syncx/int_map.go delete mode 100644 vendor/github.com/gobuffalo/syncx/interface_map.go delete mode 100644 vendor/github.com/gobuffalo/syncx/string_map.go delete mode 100644 vendor/github.com/gobuffalo/syncx/version.go delete mode 100644 vendor/github.com/joho/godotenv/.gitignore delete mode 100644 vendor/github.com/joho/godotenv/.travis.yml delete mode 100644 vendor/github.com/joho/godotenv/LICENCE delete mode 100644 vendor/github.com/joho/godotenv/README.md delete mode 100644 vendor/github.com/joho/godotenv/godotenv.go create mode 100644 vendor/github.com/karrick/godirwalk/azure-pipelines.yml create mode 100644 vendor/github.com/karrick/godirwalk/bench.sh create mode 100644 vendor/github.com/karrick/godirwalk/debug_development.go create mode 100644 vendor/github.com/karrick/godirwalk/debug_release.go rename vendor/github.com/karrick/godirwalk/{withFileno.go => inoWithFileno.go} (100%) rename vendor/github.com/karrick/godirwalk/{withIno.go => inoWithIno.go} (58%) create mode 100644 vendor/github.com/karrick/godirwalk/modeType.go create mode 100644 vendor/github.com/karrick/godirwalk/modeTypeWithType.go create mode 100644 vendor/github.com/karrick/godirwalk/modeTypeWithoutType.go rename vendor/github.com/karrick/godirwalk/{withNamlen.go => nameWithNamlen.go} (93%) rename vendor/github.com/karrick/godirwalk/{withoutNamlen.go => nameWithoutNamlen.go} (51%) create mode 100644 vendor/github.com/karrick/godirwalk/reclenFromNamlen.go create mode 100644 vendor/github.com/karrick/godirwalk/reclenFromReclen.go create mode 100644 vendor/github.com/karrick/godirwalk/scandir_unix.go create mode 100644 vendor/github.com/karrick/godirwalk/scandir_windows.go create mode 100644 vendor/github.com/karrick/godirwalk/scanner.go delete mode 100644 vendor/github.com/konsorten/go-windows-terminal-sequences/LICENSE delete mode 100644 vendor/github.com/konsorten/go-windows-terminal-sequences/README.md delete mode 100644 vendor/github.com/konsorten/go-windows-terminal-sequences/go.mod delete mode 100644 vendor/github.com/konsorten/go-windows-terminal-sequences/sequences.go delete mode 100644 vendor/github.com/konsorten/go-windows-terminal-sequences/sequences_dummy.go rename vendor/github.com/{gobuffalo/events => markbates/errx}/.gitignore (100%) rename vendor/github.com/{gobuffalo/mapi => markbates/errx}/LICENSE (97%) rename vendor/github.com/{gobuffalo/syncx => markbates/errx}/Makefile (61%) create mode 100644 vendor/github.com/markbates/errx/SHOULDERS.md rename vendor/github.com/{gobuffalo/logger => markbates/errx}/azure-pipelines.yml (61%) rename vendor/github.com/{gobuffalo/logger => markbates/errx}/azure-tests.yml (100%) create mode 100644 vendor/github.com/markbates/errx/errx.go create mode 100644 vendor/github.com/markbates/errx/go.mod create mode 100644 vendor/github.com/markbates/errx/go.sum create mode 100644 vendor/github.com/markbates/errx/version.go create mode 100644 vendor/github.com/markbates/oncer/SHOULDERS.md rename vendor/github.com/{gobuffalo/packd => markbates/oncer}/azure-pipelines.yml (57%) rename vendor/github.com/{gobuffalo/packd => markbates/oncer}/azure-tests.yml (100%) create mode 100644 vendor/github.com/markbates/oncer/version.go delete mode 100644 vendor/github.com/rogpeppe/go-internal/LICENSE delete mode 100644 vendor/github.com/rogpeppe/go-internal/modfile/gopkgin.go delete mode 100644 vendor/github.com/rogpeppe/go-internal/modfile/print.go delete mode 100644 vendor/github.com/rogpeppe/go-internal/modfile/read.go delete mode 100644 vendor/github.com/rogpeppe/go-internal/modfile/rule.go delete mode 100644 vendor/github.com/rogpeppe/go-internal/module/module.go delete mode 100644 vendor/github.com/rogpeppe/go-internal/semver/semver.go create mode 100644 vendor/github.com/sirupsen/logrus/.golangci.yml create mode 100644 vendor/github.com/sirupsen/logrus/buffer_pool.go create mode 100644 vendor/github.com/sirupsen/logrus/terminal_check_js.go delete mode 100644 vendor/golang.org/x/crypto/ssh/terminal/util_linux.go delete mode 100644 vendor/golang.org/x/crypto/ssh/terminal/util_solaris.go create mode 100644 vendor/golang.org/x/net/internal/socket/cmsghdr_unix.go create mode 100644 vendor/golang.org/x/net/internal/socket/cmsghdr_zos_s390x.go create mode 100644 vendor/golang.org/x/net/internal/socket/msghdr_zos_s390x.go delete mode 100644 vendor/golang.org/x/net/internal/socket/sys_bsdvar.go create mode 100644 vendor/golang.org/x/net/internal/socket/sys_const_zos.go delete mode 100644 vendor/golang.org/x/net/internal/socket/sys_darwin.go delete mode 100644 vendor/golang.org/x/net/internal/socket/sys_dragonfly.go rename vendor/golang.org/x/net/internal/socket/{sys_go1_11_darwin.go => sys_zos_s390x.go} (52%) create mode 100644 vendor/golang.org/x/net/internal/socket/sys_zos_s390x.s create mode 100644 vendor/golang.org/x/net/internal/socket/zsys_openbsd_mips64.go create mode 100644 vendor/golang.org/x/net/internal/socket/zsys_zos_s390x.go create mode 100644 vendor/golang.org/x/net/ipv4/control_zos.go create mode 100644 vendor/golang.org/x/net/ipv4/sys_zos.go create mode 100644 vendor/golang.org/x/net/ipv4/zsys_zos_s390x.go create mode 100644 vendor/golang.org/x/sys/plan9/asm.s create mode 100644 vendor/golang.org/x/sys/plan9/asm_plan9_386.s create mode 100644 vendor/golang.org/x/sys/plan9/asm_plan9_amd64.s create mode 100644 vendor/golang.org/x/sys/plan9/asm_plan9_arm.s create mode 100644 vendor/golang.org/x/sys/plan9/const_plan9.go create mode 100644 vendor/golang.org/x/sys/plan9/dir_plan9.go create mode 100644 vendor/golang.org/x/sys/plan9/env_plan9.go create mode 100644 vendor/golang.org/x/sys/plan9/errors_plan9.go create mode 100644 vendor/golang.org/x/sys/plan9/mkall.sh create mode 100644 vendor/golang.org/x/sys/plan9/mkerrors.sh create mode 100644 vendor/golang.org/x/sys/plan9/mksysnum_plan9.sh create mode 100644 vendor/golang.org/x/sys/plan9/pwd_go15_plan9.go create mode 100644 vendor/golang.org/x/sys/plan9/pwd_plan9.go create mode 100644 vendor/golang.org/x/sys/plan9/race.go create mode 100644 vendor/golang.org/x/sys/plan9/race0.go create mode 100644 vendor/golang.org/x/sys/plan9/str.go create mode 100644 vendor/golang.org/x/sys/plan9/syscall.go create mode 100644 vendor/golang.org/x/sys/plan9/syscall_plan9.go create mode 100644 vendor/golang.org/x/sys/plan9/zsyscall_plan9_386.go create mode 100644 vendor/golang.org/x/sys/plan9/zsyscall_plan9_amd64.go create mode 100644 vendor/golang.org/x/sys/plan9/zsyscall_plan9_arm.go create mode 100644 vendor/golang.org/x/sys/plan9/zsysnum_plan9.go create mode 100644 vendor/golang.org/x/term/AUTHORS create mode 100644 vendor/golang.org/x/term/CONTRIBUTING.md create mode 100644 vendor/golang.org/x/term/CONTRIBUTORS rename vendor/{github.com/gobuffalo/gogen/goimports => golang.org/x/term}/LICENSE (100%) create mode 100644 vendor/golang.org/x/term/PATENTS create mode 100644 vendor/golang.org/x/term/README.md create mode 100644 vendor/golang.org/x/term/go.mod create mode 100644 vendor/golang.org/x/term/go.sum rename vendor/golang.org/x/{crypto/ssh/terminal/util_plan9.go => term/term.go} (52%) create mode 100644 vendor/golang.org/x/term/term_plan9.go rename vendor/golang.org/x/{crypto/ssh/terminal/util.go => term/term_unix.go} (53%) rename vendor/golang.org/x/{crypto/ssh/terminal/util_bsd.go => term/term_unix_bsd.go} (80%) rename vendor/golang.org/x/{crypto/ssh/terminal/util_aix.go => term/term_unix_other.go} (60%) create mode 100644 vendor/golang.org/x/term/term_unsupported.go rename vendor/golang.org/x/{crypto/ssh/terminal/util_windows.go => term/term_windows.go} (53%) create mode 100644 vendor/golang.org/x/term/terminal.go create mode 100644 vendor/golang.org/x/text/unicode/norm/tables12.0.0.go diff --git a/go.mod b/go.mod index 2eba078d6..08de5b6be 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,8 @@ require ( github.com/disintegration/imaging v1.6.0 github.com/fvbommel/sortorder v1.0.2 github.com/go-chi/chi v4.0.2+incompatible - github.com/gobuffalo/packr/v2 v2.0.2 + github.com/gobuffalo/logger v1.0.4 // indirect + github.com/gobuffalo/packr/v2 v2.8.1 github.com/golang-migrate/migrate/v4 v4.3.1 github.com/gorilla/securecookie v1.1.1 github.com/gorilla/sessions v1.2.0 @@ -21,13 +22,15 @@ require ( github.com/jinzhu/copier v0.0.0-20190924061706-b57f9002281a github.com/jmoiron/sqlx v1.2.0 github.com/json-iterator/go v1.1.9 + github.com/karrick/godirwalk v1.16.1 // indirect github.com/mattn/go-sqlite3 v1.14.6 github.com/natefinch/pie v0.0.0-20170715172608-9a0d72014007 github.com/remeh/sizedwaitgroup v1.0.0 github.com/robertkrimen/otto v0.0.0-20200922221731-ef014fd054ac github.com/rs/cors v1.6.0 github.com/shurcooL/graphql v0.0.0-20181231061246-d48a9a75455f - github.com/sirupsen/logrus v1.4.2 + github.com/sirupsen/logrus v1.8.1 + github.com/spf13/afero v1.2.0 // indirect github.com/spf13/pflag v1.0.3 github.com/spf13/viper v1.7.0 github.com/stretchr/testify v1.5.1 @@ -35,10 +38,11 @@ require ( github.com/tidwall/pretty v1.2.0 // indirect github.com/vektah/gqlparser/v2 v2.0.1 github.com/vektra/mockery/v2 v2.2.1 - golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 + golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97 golang.org/x/image v0.0.0-20210220032944-ac19c3e999fb - golang.org/x/net v0.0.0-20200822124328-c89045814202 - golang.org/x/sys v0.0.0-20210616094352-59db8d763f22 + golang.org/x/net v0.0.0-20210226172049-e18ecbb05110 + golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c + golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b // indirect golang.org/x/tools v0.0.0-20200915031644-64986481280e // indirect gopkg.in/sourcemap.v1 v1.0.5 // indirect gopkg.in/yaml.v2 v2.3.0 diff --git a/go.sum b/go.sum index f70dae912..8e5faa378 100644 --- a/go.sum +++ b/go.sum @@ -1,7 +1,5 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.31.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.36.0/go.mod h1:RUoy9p/M4ge0HzT8L+SDZ8jg+Q6fth0CiBuhFJpSV40= cloud.google.com/go v0.37.4/go.mod h1:NHPJ89PdicEuT9hdPXMROBD91xc5uRDxsMtSB16k7hw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= @@ -13,18 +11,13 @@ cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7 cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -dmitri.shuralyov.com/app/changes v0.0.0-20180602232624-0a106ad413e3/go.mod h1:Yl+fi1br7+Rr3LqpNJf1/uxUdtRUV+Tnj0o93V2B9MU= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -dmitri.shuralyov.com/html/belt v0.0.0-20180602232347-f7d459c86be0/go.mod h1:JLBrvjyP0v+ecvNYvCpyZgu5/xkfAUhi6wJj28eUfSU= -dmitri.shuralyov.com/service/change v0.0.0-20181023043359-a85b471d5412/go.mod h1:a1inKt/atXimZ4Mv927x+r7UpyzRUf4emIoiiSC2TN4= -dmitri.shuralyov.com/state v0.0.0-20180228185332-28bcc343414c/go.mod h1:0PRwlb0D6DFvNNtx+9ybjezNCa8XF0xaYcETyp6rHWU= github.com/99designs/gqlgen v0.12.2 h1:aOdpsiCycFtCnAv8CAI1exnKrIDHMqtMzQoXeTziY4o= github.com/99designs/gqlgen v0.12.2/go.mod h1:7zdGo6ry9u1YBp/qlb2uxSU5Mt2jQKLcBETQiKk+Bxo= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= @@ -33,13 +26,10 @@ github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWX github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/Yamashou/gqlgenc v0.0.0-20200902035953-4dbef3551953 h1:+iPJDL28FxZhEdtJ9qykrMt/oDiOvlzTa0zV06nUcFM= github.com/Yamashou/gqlgenc v0.0.0-20200902035953-4dbef3551953/go.mod h1:kaTsk10p2hJWwrB2t7vMsk1lXj9KAHaDYRtJQiB+Ick= -github.com/agnivade/levenshtein v1.0.1 h1:3oJU7J3FGFmyhn8KHjmVaZCN5hxTr7GxgRue+sxIXdQ= github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= -github.com/agnivade/levenshtein v1.0.3 h1:M5ZnqLOoZR8ygVq0FfkXsNOKzMCk0xRiow0R5+5VkQ0= github.com/agnivade/levenshtein v1.0.3/go.mod h1:4SFRZbbXWLF4MU1T9Qg0pGgH3Pjs+t6ie5efyrwRJXs= github.com/agnivade/levenshtein v1.1.0 h1:n6qGwyHG61v3ABce1rPVZklEYRT8NFpCMrpZdBUbYGM= github.com/agnivade/levenshtein v1.1.0/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo= -github.com/ajg/form v0.0.0-20160822230020-523a5da1a92f/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/anacrolix/dms v1.2.2 h1:0mk2/DXNqa5KDDbaLgFPf3oMV6VCGdFNh3d/gt4oafM= @@ -51,12 +41,10 @@ github.com/anacrolix/missinggo v1.1.0/go.mod h1:MBJu3Sk/k3ZfGYcS7z18gwfu72Ey/xop github.com/anacrolix/tagflag v0.0.0-20180109131632-2146c8d41bf0/go.mod h1:1m2U/K6ZT+JZG0+bdMK6qauP49QT4wE5pmhJXOKKCHw= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= -github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= github.com/antchfx/htmlquery v1.2.3 h1:sP3NFDneHx2stfNXCKbhHFo8XgNjCACnU/4AO5gWz6M= github.com/antchfx/htmlquery v1.2.3/go.mod h1:B0ABL+F5irhhMWg54ymEZinzMSi0Kt3I2if0BLYa3V0= github.com/antchfx/xpath v1.1.6 h1:6sVh6hB5T6phw1pFpHRQ+C4bd8sNI+O58flqtg7h0R0= github.com/antchfx/xpath v1.1.6/go.mod h1:Yee4kTMuNiPYJ7nSNorELQMr1J33uOpXDMByNYhvtNk= -github.com/apache/thrift v0.0.0-20180902110319-2566ecd5d999/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0 h1:jfIu9sQUG6Ig+0+Ap1h4unLjW6YQJpKZVmUzxsD4E/Q= github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0/go.mod h1:t2tdKJDJF9BV14lnkjHmOQgcvEKgtqs5a1N3LNdJhGE= @@ -71,7 +59,6 @@ github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kB github.com/bitly/go-hostpool v0.0.0-20171023180738-a3a6125de932/go.mod h1:NOuUCSz6Q9T7+igc/hlvDOUdtWKryOrtFyIVABv/p7k= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= -github.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625/go.mod h1:HYsPBTaaSFSlLx/70C2HPIMNZpVV8+vt/A+FMnYP11g= github.com/bradfitz/iter v0.0.0-20140124041915-454541ec3da2/go.mod h1:PyRFw1Lt2wKX4ZVSQ2mk+PeDa1rxyObEDlApuIsUKuo= github.com/bradfitz/iter v0.0.0-20190303215204-33e6a9893b0c/go.mod h1:PyRFw1Lt2wKX4ZVSQ2mk+PeDa1rxyObEDlApuIsUKuo= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= @@ -85,14 +72,11 @@ github.com/chromedp/sysutil v1.0.0/go.mod h1:kgWmDdq8fTzXYcKIBqIYvRRTnYb9aNS9moA github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= github.com/cockroachdb/cockroach-go v0.0.0-20181001143604-e0a95dfd547c/go.mod h1:XGLbWH/ujMcbPbhZq52Nv6UrCghb1yGn//133kEsvDk= -github.com/codegangsta/negroni v1.0.0/go.mod h1:v0y3T5G7Y1UlFfyxFn/QLRU4a2EuNau2iZY63YTKWo0= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/corona10/goimagehash v1.0.3 h1:NZM518aKLmoNluluhfHGxT3LGOnrojrxhGn63DR/CZA= @@ -129,24 +113,17 @@ github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5Xh github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/dustin/go-humanize v0.0.0-20180421182945-02af3965c54e/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/dustin/go-humanize v0.0.0-20180713052910-9f541cc9db5d/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= -github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/edsrzf/mmap-go v0.0.0-20170320065105-0bce6a688712/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/structs v1.0.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= -github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= -github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsouza/fake-gcs-server v1.7.0/go.mod h1:5XIRs4YvwNbNoz+1JF8j6KLAyDh7RHGAyAK3EP2EsNk= github.com/fvbommel/sortorder v1.0.2 h1:mV4o8B2hKboCdkJm+a7uX/SIpZob4JzUpc5GGnM45eo= github.com/fvbommel/sortorder v1.0.2/go.mod h1:uk88iVf1ovNn1iLfgUVU2F9o5eO30ui720w+kxuqRs0= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= github.com/glycerine/go-unsnap-stream v0.0.0-20180323001048-9f0cb55181dd/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE= github.com/glycerine/goconvey v0.0.0-20180728074245-46e3a41ad493/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24= github.com/go-chi/chi v3.3.2+incompatible/go.mod h1:eB3wogJHnLi3x/kFX2A+IbTBlXxmMeXJVKy9tTv1XzQ= @@ -160,214 +137,13 @@ github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG github.com/go-sql-driver/mysql v1.4.1 h1:g24URVg0OFbNUTx9qqY1IRZ9D9z3iPyi5zKhQZpNwpA= github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/gobuffalo/attrs v0.0.0-20190219185331-f338c9388485/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0= -github.com/gobuffalo/buffalo v0.12.8-0.20181004233540-fac9bb505aa8/go.mod h1:sLyT7/dceRXJUxSsE813JTQtA3Eb1vjxWfo/N//vXIY= -github.com/gobuffalo/buffalo v0.13.0/go.mod h1:Mjn1Ba9wpIbpbrD+lIDMy99pQ0H0LiddMIIDGse7qT4= -github.com/gobuffalo/buffalo-plugins v1.0.2/go.mod h1:pOp/uF7X3IShFHyobahTkTLZaeUXwb0GrUTb9ngJWTs= -github.com/gobuffalo/buffalo-plugins v1.0.4/go.mod h1:pWS1vjtQ6uD17MVFWf7i3zfThrEKWlI5+PYLw/NaDB4= -github.com/gobuffalo/buffalo-plugins v1.4.3/go.mod h1:uCzTY0woez4nDMdQjkcOYKanngeUVRO2HZi7ezmAjWY= -github.com/gobuffalo/buffalo-plugins v1.5.1/go.mod h1:jbmwSZK5+PiAP9cC09VQOrGMZFCa/P0UMlIS3O12r5w= -github.com/gobuffalo/buffalo-plugins v1.6.4/go.mod h1:/+N1aophkA2jZ1ifB2O3Y9yGwu6gKOVMtUmJnbg+OZI= -github.com/gobuffalo/buffalo-plugins v1.6.5/go.mod h1:0HVkbgrVs/MnPZ/FOseDMVanCTm2RNcdM0PuXcL1NNI= -github.com/gobuffalo/buffalo-plugins v1.6.7/go.mod h1:ZGZRkzz2PiKWHs0z7QsPBOTo2EpcGRArMEym6ghKYgk= -github.com/gobuffalo/buffalo-plugins v1.6.9/go.mod h1:yYlYTrPdMCz+6/+UaXg5Jm4gN3xhsvsQ2ygVatZV5vw= -github.com/gobuffalo/buffalo-plugins v1.6.11/go.mod h1:eAA6xJIL8OuynJZ8amXjRmHND6YiusVAaJdHDN1Lu8Q= -github.com/gobuffalo/buffalo-plugins v1.8.2/go.mod h1:9te6/VjEQ7pKp7lXlDIMqzxgGpjlKoAcAANdCgoR960= -github.com/gobuffalo/buffalo-plugins v1.8.3/go.mod h1:IAWq6vjZJVXebIq2qGTLOdlXzmpyTZ5iJG5b59fza5U= -github.com/gobuffalo/buffalo-plugins v1.9.4/go.mod h1:grCV6DGsQlVzQwk6XdgcL3ZPgLm9BVxlBmXPMF8oBHI= -github.com/gobuffalo/buffalo-plugins v1.10.0/go.mod h1:4osg8d9s60txLuGwXnqH+RCjPHj9K466cDFRl3PErHI= -github.com/gobuffalo/buffalo-plugins v1.11.0 h1:yZ6USaSdAKpogRS8DZJgeG7/CTPGmyhplwifphmmegw= -github.com/gobuffalo/buffalo-plugins v1.11.0/go.mod h1:rtIvAYRjYibgmWhnjKmo7OadtnxuMG5ZQLr25ozAzjg= -github.com/gobuffalo/buffalo-plugins v1.12.0 h1:5rvYQ7mwfPwUW9zqcMd9ahWtPVOOouMKZjv88q45Z7c= -github.com/gobuffalo/buffalo-plugins v1.12.0/go.mod h1:kw4Mj2vQXqe4X5TI36PEQgswbL30heGQwJEeDKd1v+4= -github.com/gobuffalo/buffalo-pop v1.0.5/go.mod h1:Fw/LfFDnSmB/vvQXPvcXEjzP98Tc+AudyNWUBWKCwQ8= -github.com/gobuffalo/depgen v0.0.0-20190219190223-ba8c93fa0c2c/go.mod h1:CE/HUV4vDCXtJayRf6WoMWgezb1yH4QHg8GNK8FL0JI= -github.com/gobuffalo/envy v1.6.4/go.mod h1:Abh+Jfw475/NWtYMEt+hnJWRiC8INKWibIMyNt1w2Mc= -github.com/gobuffalo/envy v1.6.5/go.mod h1:N+GkhhZ/93bGZc6ZKhJLP6+m+tCNPKwgSpH9kaifseQ= -github.com/gobuffalo/envy v1.6.6/go.mod h1:N+GkhhZ/93bGZc6ZKhJLP6+m+tCNPKwgSpH9kaifseQ= -github.com/gobuffalo/envy v1.6.7/go.mod h1:N+GkhhZ/93bGZc6ZKhJLP6+m+tCNPKwgSpH9kaifseQ= -github.com/gobuffalo/envy v1.6.8/go.mod h1:N+GkhhZ/93bGZc6ZKhJLP6+m+tCNPKwgSpH9kaifseQ= -github.com/gobuffalo/envy v1.6.9/go.mod h1:N+GkhhZ/93bGZc6ZKhJLP6+m+tCNPKwgSpH9kaifseQ= -github.com/gobuffalo/envy v1.6.10/go.mod h1:X0CFllQjTV5ogsnUrg+Oks2yTI+PU2dGYBJOEI2D1Uo= -github.com/gobuffalo/envy v1.6.11/go.mod h1:Fiq52W7nrHGDggFPhn2ZCcHw4u/rqXkqo+i7FB6EAcg= -github.com/gobuffalo/envy v1.6.12 h1:zkhss8DXz/pty2HAyA8BnvWMTYxo4gjd4+WCnYovoxY= -github.com/gobuffalo/envy v1.6.12/go.mod h1:qJNrJhKkZpEW0glh5xP2syQHH5kgdmgsKss2Kk8PTP0= -github.com/gobuffalo/envy v1.6.13/go.mod h1:w9DJppgl51JwUFWWd/M/6/otrPtWV3WYMa+NNLunqKA= -github.com/gobuffalo/envy v1.6.15 h1:OsV5vOpHYUpP7ZLS6sem1y40/lNX1BZj+ynMiRi21lQ= -github.com/gobuffalo/envy v1.6.15/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= -github.com/gobuffalo/events v1.0.3/go.mod h1:Txo8WmqScapa7zimEQIwgiJBvMECMe9gJjsKNPN3uZw= -github.com/gobuffalo/events v1.0.7/go.mod h1:z8txf6H9jWhQ5Scr7YPLWg/cgXBRj8Q4uYI+rsVCCSQ= -github.com/gobuffalo/events v1.0.8/go.mod h1:A5KyqT1sA+3GJiBE4QKZibse9mtOcI9nw8gGrDdqYGs= -github.com/gobuffalo/events v1.1.3/go.mod h1:9yPGWYv11GENtzrIRApwQRMYSbUgCsZ1w6R503fCfrk= -github.com/gobuffalo/events v1.1.4/go.mod h1:09/YRRgZHEOts5Isov+g9X2xajxdvOAcUuAHIX/O//A= -github.com/gobuffalo/events v1.1.5/go.mod h1:3YUSzgHfYctSjEjLCWbkXP6djH2M+MLaVRzb4ymbAK0= -github.com/gobuffalo/events v1.1.7/go.mod h1:6fGqxH2ing5XMb3EYRq9LEkVlyPGs4oO/eLzh+S8CxY= -github.com/gobuffalo/events v1.1.8/go.mod h1:UFy+W6X6VbCWS8k2iT81HYX65dMtiuVycMy04cplt/8= -github.com/gobuffalo/events v1.1.9 h1:ukq5ys/h0TuiX7eLJyZBD1dJOy0r19JTEYmgXKG9j+Y= -github.com/gobuffalo/events v1.1.9/go.mod h1:/0nf8lMtP5TkgNbzYxR6Bl4GzBy5s5TebgNTdRfRbPM= -github.com/gobuffalo/events v1.2.0 h1:YovlMNcwNTfIm/3OdB+KemDOm8yUz4XIH+4kbMhGXWw= -github.com/gobuffalo/events v1.2.0/go.mod h1:pxvpvsKXKZNPtHuIxUV3K+g+KP5o4forzaeFj++bh68= -github.com/gobuffalo/fizz v1.0.12/go.mod h1:C0sltPxpYK8Ftvf64kbsQa2yiCZY4RZviurNxXdAKwc= -github.com/gobuffalo/flect v0.0.0-20180907193754-dc14d8acaf9f/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA= -github.com/gobuffalo/flect v0.0.0-20181002182613-4571df4b1daf/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA= -github.com/gobuffalo/flect v0.0.0-20181007231023-ae7ed6bfe683/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA= -github.com/gobuffalo/flect v0.0.0-20181018182602-fd24a256709f/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA= -github.com/gobuffalo/flect v0.0.0-20181019110701-3d6f0b585514/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA= -github.com/gobuffalo/flect v0.0.0-20181024204909-8f6be1a8c6c2/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA= -github.com/gobuffalo/flect v0.0.0-20181104133451-1f6e9779237a/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA= -github.com/gobuffalo/flect v0.0.0-20181114183036-47375f6d8328/go.mod h1:0HvNbHdfh+WOvDSIASqJOSxTOWSxCCUF++k/Y53v9rI= -github.com/gobuffalo/flect v0.0.0-20181210151238-24a2b68e0316/go.mod h1:en58vff74S9b99Eg42Dr+/9yPu437QjlNsO/hBYPuOk= -github.com/gobuffalo/flect v0.0.0-20190104192022-4af577e09bf2/go.mod h1:en58vff74S9b99Eg42Dr+/9yPu437QjlNsO/hBYPuOk= -github.com/gobuffalo/flect v0.0.0-20190117212819-a62e61d96794 h1:HZOs07hF3AmoaUj4HJQHV5RqfOuGnPZI7aFcireIrww= -github.com/gobuffalo/flect v0.0.0-20190117212819-a62e61d96794/go.mod h1:397QT6v05LkZkn07oJXXT6y9FCfwC8Pug0WA2/2mE9k= -github.com/gobuffalo/flect v0.1.0 h1:EJvbvZlo9exJk5UK02lz5pTs3XEpIM5/4o691KfvtkM= -github.com/gobuffalo/flect v0.1.0/go.mod h1:d2ehjJqGOH/Kjqcoz+F7jHTBbmDb38yXA598Hb50EGs= -github.com/gobuffalo/genny v0.0.0-20180924032338-7af3a40f2252/go.mod h1:tUTQOogrr7tAQnhajMSH6rv1BVev34H2sa1xNHMy94g= -github.com/gobuffalo/genny v0.0.0-20181003150629-3786a0744c5d/go.mod h1:WAd8HmjMVrnkAZbmfgH5dLBUchsZfqzp/WS5sQz+uTM= -github.com/gobuffalo/genny v0.0.0-20181005145118-318a41a134cc/go.mod h1:WAd8HmjMVrnkAZbmfgH5dLBUchsZfqzp/WS5sQz+uTM= -github.com/gobuffalo/genny v0.0.0-20181007153042-b8de7d566757/go.mod h1:+oG5Ljrw04czAHbPXREwaFojJbpUvcIy4DiOnbEJFTA= -github.com/gobuffalo/genny v0.0.0-20181012161047-33e5f43d83a6/go.mod h1:+oG5Ljrw04czAHbPXREwaFojJbpUvcIy4DiOnbEJFTA= -github.com/gobuffalo/genny v0.0.0-20181017160347-90a774534246/go.mod h1:+oG5Ljrw04czAHbPXREwaFojJbpUvcIy4DiOnbEJFTA= -github.com/gobuffalo/genny v0.0.0-20181024195656-51392254bf53/go.mod h1:o9GEH5gn5sCKLVB5rHFC4tq40rQ3VRUzmx6WwmaqISE= -github.com/gobuffalo/genny v0.0.0-20181025145300-af3f81d526b8/go.mod h1:uZ1fFYvdcP8mu0B/Ynarf6dsGvp7QFIpk/QACUuFUVI= -github.com/gobuffalo/genny v0.0.0-20181027191429-94d6cfb5c7fc/go.mod h1:x7SkrQQBx204Y+O9EwRXeszLJDTaWN0GnEasxgLrQTA= -github.com/gobuffalo/genny v0.0.0-20181027195209-3887b7171c4f/go.mod h1:JbKx8HSWICu5zyqWOa0dVV1pbbXOHusrSzQUprW6g+w= -github.com/gobuffalo/genny v0.0.0-20181106193839-7dcb0924caf1/go.mod h1:x61yHxvbDCgQ/7cOAbJCacZQuHgB0KMSzoYcw5debjU= -github.com/gobuffalo/genny v0.0.0-20181107223128-f18346459dbe/go.mod h1:utQD3aKKEsdb03oR+Vi/6ztQb1j7pO10N3OBoowRcSU= -github.com/gobuffalo/genny v0.0.0-20181114215459-0a4decd77f5d/go.mod h1:kN2KZ8VgXF9VIIOj/GM0Eo7YK+un4Q3tTreKOf0q1ng= -github.com/gobuffalo/genny v0.0.0-20181119162812-e8ff4adce8bb/go.mod h1:BA9htSe4bZwBDJLe8CUkoqkypq3hn3+CkoHqVOW718E= -github.com/gobuffalo/genny v0.0.0-20181127225641-2d959acc795b/go.mod h1:l54xLXNkteX/PdZ+HlgPk1qtcrgeOr3XUBBPDbH+7CQ= -github.com/gobuffalo/genny v0.0.0-20181128191930-77e34f71ba2a/go.mod h1:FW/D9p7cEEOqxYA71/hnrkOWm62JZ5ZNxcNIVJEaWBU= -github.com/gobuffalo/genny v0.0.0-20181203165245-fda8bcce96b1/go.mod h1:wpNSANu9UErftfiaAlz1pDZclrYzLtO5lALifODyjuM= -github.com/gobuffalo/genny v0.0.0-20181203201232-849d2c9534ea/go.mod h1:wpNSANu9UErftfiaAlz1pDZclrYzLtO5lALifODyjuM= -github.com/gobuffalo/genny v0.0.0-20181206121324-d6fb8a0dbe36/go.mod h1:wpNSANu9UErftfiaAlz1pDZclrYzLtO5lALifODyjuM= -github.com/gobuffalo/genny v0.0.0-20181207164119-84844398a37d/go.mod h1:y0ysCHGGQf2T3vOhCrGHheYN54Y/REj0ayd0Suf4C/8= -github.com/gobuffalo/genny v0.0.0-20181211165820-e26c8466f14d/go.mod h1:sHnK+ZSU4e2feXP3PA29ouij6PUEiN+RCwECjCTB3yM= -github.com/gobuffalo/genny v0.0.0-20190104222617-a71664fc38e7/go.mod h1:QPsQ1FnhEsiU8f+O0qKWXz2RE4TiDqLVChWkBuh1WaY= -github.com/gobuffalo/genny v0.0.0-20190112155932-f31a84fcacf5 h1:boQS3dA9PxhyufJEWIILrG6pJQbDnpwP2rFyvWacdoY= -github.com/gobuffalo/genny v0.0.0-20190112155932-f31a84fcacf5/go.mod h1:CIaHCrSIuJ4il6ka3Hub4DR4adDrGoXGEEt2FbBxoIo= -github.com/gobuffalo/genny v0.0.0-20190124191459-3310289fa4b4/go.mod h1:yIRqxhZV2sAzb+B3iPUMLauTRrYP8tJUlZ1zV9teKik= -github.com/gobuffalo/genny v0.0.0-20190131150032-1045e97d19fb/go.mod h1:yIRqxhZV2sAzb+B3iPUMLauTRrYP8tJUlZ1zV9teKik= -github.com/gobuffalo/genny v0.0.0-20190131190646-008a76242145/go.mod h1:NJvPZJxb9M4z790P6N2SMZKSUYpASpEvLuUWnHGKzb4= -github.com/gobuffalo/genny v0.0.0-20190219203444-c95082806342 h1:ewzWZ+TT9/3wYSnUPQRU7YFzqWAx4dgUXdgvJVTVLCA= -github.com/gobuffalo/genny v0.0.0-20190219203444-c95082806342/go.mod h1:3BLT+Vs94EEz3fKR8WWOkYpL6c1tdJcZUNCe3LZAnvQ= -github.com/gobuffalo/gitgen v0.0.0-20190219185555-91c2c5f0aad5/go.mod h1:ZzGIrxBvCJEluaU4i3CN0GFlu1Qmb3yK8ziV02evJ1E= -github.com/gobuffalo/github_flavored_markdown v1.0.4/go.mod h1:uRowCdK+q8d/RF0Kt3/DSalaIXbb0De/dmTqMQdkQ4I= -github.com/gobuffalo/github_flavored_markdown v1.0.5/go.mod h1:U0643QShPF+OF2tJvYNiYDLDGDuQmJZXsf/bHOJPsMY= -github.com/gobuffalo/github_flavored_markdown v1.0.7/go.mod h1:w93Pd9Lz6LvyQXEG6DktTPHkOtCbr+arAD5mkwMzXLI= -github.com/gobuffalo/gogen v0.0.0-20190219194924-d32a17ad9761/go.mod h1:v47C8sid+ZM2qK+YpQ2MGJKssKAqyTsH1wl/pTCPdz8= -github.com/gobuffalo/gogen v0.0.0-20190224213239-1c6076128bbc h1:GjmMs2PLx+rH9In421AR1RkHV5AG9lLnRpIPhWauvoI= -github.com/gobuffalo/gogen v0.0.0-20190224213239-1c6076128bbc/go.mod h1:tQqPADZKflmJCR4FHRHYNPP79cXPICyxUiUHyhuXtqg= -github.com/gobuffalo/httptest v1.0.2/go.mod h1:7T1IbSrg60ankme0aDLVnEY0h056g9M1/ZvpVThtB7E= -github.com/gobuffalo/licenser v0.0.0-20180924033006-eae28e638a42/go.mod h1:Ubo90Np8gpsSZqNScZZkVXXAo5DGhTb+WYFIjlnog8w= -github.com/gobuffalo/licenser v0.0.0-20181025145548-437d89de4f75/go.mod h1:x3lEpYxkRG/XtGCUNkio+6RZ/dlOvLzTI9M1auIwFcw= -github.com/gobuffalo/licenser v0.0.0-20181027200154-58051a75da95/go.mod h1:BzhaaxGd1tq1+OLKObzgdCV9kqVhbTulxOpYbvMQWS0= -github.com/gobuffalo/licenser v0.0.0-20181109171355-91a2a7aac9a7/go.mod h1:m+Ygox92pi9bdg+gVaycvqE8RVSjZp7mWw75+K5NPHk= -github.com/gobuffalo/licenser v0.0.0-20181128165715-cc7305f8abed/go.mod h1:oU9F9UCE+AzI/MueCKZamsezGOOHfSirltllOVeRTAE= -github.com/gobuffalo/licenser v0.0.0-20181203160806-fe900bbede07/go.mod h1:ph6VDNvOzt1CdfaWC+9XwcBnlSTBz2j49PBwum6RFaU= -github.com/gobuffalo/licenser v0.0.0-20181211173111-f8a311c51159/go.mod h1:ve/Ue99DRuvnTaLq2zKa6F4KtHiYf7W046tDjuGYPfM= -github.com/gobuffalo/logger v0.0.0-20181022175615-46cfb361fc27/go.mod h1:8sQkgyhWipz1mIctHF4jTxmJh1Vxhp7mP8IqbljgJZo= -github.com/gobuffalo/logger v0.0.0-20181027144941-73d08d2bb969/go.mod h1:7uGg2duHKpWnN4+YmyKBdLXfhopkAdVM6H3nKbyFbz8= -github.com/gobuffalo/logger v0.0.0-20181027193913-9cf4dd0efe46/go.mod h1:7uGg2duHKpWnN4+YmyKBdLXfhopkAdVM6H3nKbyFbz8= -github.com/gobuffalo/logger v0.0.0-20181109185836-3feeab578c17/go.mod h1:oNErH0xLe+utO+OW8ptXMSA5DkiSEDW1u3zGIt8F9Ew= -github.com/gobuffalo/logger v0.0.0-20181117211126-8e9b89b7c264/go.mod h1:5etB91IE0uBlw9k756fVKZJdS+7M7ejVhmpXXiSFj0I= -github.com/gobuffalo/logger v0.0.0-20181127160119-5b956e21995c h1:Z/ppYX6EtPEysbW4VEGz2dO+4F4VTthWp2sWRUCANdU= -github.com/gobuffalo/logger v0.0.0-20181127160119-5b956e21995c/go.mod h1:+HxKANrR9VGw9yN3aOAppJKvhO05ctDi63w4mDnKv2U= -github.com/gobuffalo/logger v0.0.0-20190224201004-be78ebfea0fa h1:26mAf6lQ2m1PSrYlsC16sFAaocXAM+jnCkpj3qKmDmU= -github.com/gobuffalo/logger v0.0.0-20190224201004-be78ebfea0fa/go.mod h1:+HxKANrR9VGw9yN3aOAppJKvhO05ctDi63w4mDnKv2U= -github.com/gobuffalo/makr v1.1.5/go.mod h1:Y+o0btAH1kYAMDJW/TX3+oAXEu0bmSLLoC9mIFxtzOw= -github.com/gobuffalo/mapi v1.0.0/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= -github.com/gobuffalo/mapi v1.0.1 h1:JRuTiZzDEZhBHkFiHTxJkYRT6CbYuL0K/rn+1byJoEA= -github.com/gobuffalo/mapi v1.0.1/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= -github.com/gobuffalo/meta v0.0.0-20181018155829-df62557efcd3/go.mod h1:XTTOhwMNryif3x9LkTTBO/Llrveezd71u3quLd0u7CM= -github.com/gobuffalo/meta v0.0.0-20181018192820-8c6cef77dab3/go.mod h1:E94EPzx9NERGCY69UWlcj6Hipf2uK/vnfrF4QD0plVE= -github.com/gobuffalo/meta v0.0.0-20181025145500-3a985a084b0a/go.mod h1:YDAKBud2FP7NZdruCSlmTmDOZbVSa6bpK7LJ/A/nlKg= -github.com/gobuffalo/meta v0.0.0-20181114191255-b130ebedd2f7/go.mod h1:K6cRZ29ozr4Btvsqkjvg5nDFTLOgTqf03KA70Ks0ypE= -github.com/gobuffalo/meta v0.0.0-20181127070345-0d7e59dd540b/go.mod h1:RLO7tMvE0IAKAM8wny1aN12pvEKn7EtkBLkUZR00Qf8= -github.com/gobuffalo/meta v0.0.0-20190120163247-50bbb1fa260d h1:cP3lJDiGboBok8q6axF0rqWjlg/MOCfgjuwuNp5TlhE= -github.com/gobuffalo/meta v0.0.0-20190120163247-50bbb1fa260d/go.mod h1:KKsH44nIK2gA8p0PJmRT9GvWJUdphkDUA8AJEvFWiqM= -github.com/gobuffalo/meta v0.0.0-20190121163014-ecaa953cbfb3 h1:JzhweLavqD8ZNLOIBRvE5IPyp+sw/wYQmL9c5XwZuHI= -github.com/gobuffalo/meta v0.0.0-20190121163014-ecaa953cbfb3/go.mod h1:KLfkGnS+Tucc+iTkUcAUBtxpwOJGfhw2pHRLddPxMQY= -github.com/gobuffalo/mw-basicauth v1.0.3/go.mod h1:dg7+ilMZOKnQFHDefUzUHufNyTswVUviCBgF244C1+0= -github.com/gobuffalo/mw-contenttype v0.0.0-20180802152300-74f5a47f4d56/go.mod h1:7EvcmzBbeCvFtQm5GqF9ys6QnCxz2UM1x0moiWLq1No= -github.com/gobuffalo/mw-csrf v0.0.0-20180802151833-446ff26e108b/go.mod h1:sbGtb8DmDZuDUQoxjr8hG1ZbLtZboD9xsn6p77ppcHo= -github.com/gobuffalo/mw-forcessl v0.0.0-20180802152810-73921ae7a130/go.mod h1:JvNHRj7bYNAMUr/5XMkZaDcw3jZhUZpsmzhd//FFWmQ= -github.com/gobuffalo/mw-i18n v0.0.0-20180802152014-e3060b7e13d6/go.mod h1:91AQfukc52A6hdfIfkxzyr+kpVYDodgAeT5cjX1UIj4= -github.com/gobuffalo/mw-paramlogger v0.0.0-20181005191442-d6ee392ec72e/go.mod h1:6OJr6VwSzgJMqWMj7TYmRUqzNe2LXu/W1rRW4MAz/ME= -github.com/gobuffalo/mw-tokenauth v0.0.0-20181001105134-8545f626c189/go.mod h1:UqBF00IfKvd39ni5+yI5MLMjAf4gX7cDKN/26zDOD6c= -github.com/gobuffalo/packd v0.0.0-20181027182251-01ad393492c8/go.mod h1:SmdBdhj6uhOsg1Ui4SFAyrhuc7U4VCildosO5IDJ3lc= -github.com/gobuffalo/packd v0.0.0-20181027190505-aafc0d02c411/go.mod h1:SmdBdhj6uhOsg1Ui4SFAyrhuc7U4VCildosO5IDJ3lc= -github.com/gobuffalo/packd v0.0.0-20181027194105-7ae579e6d213/go.mod h1:SmdBdhj6uhOsg1Ui4SFAyrhuc7U4VCildosO5IDJ3lc= -github.com/gobuffalo/packd v0.0.0-20181031195726-c82734870264/go.mod h1:Yf2toFaISlyQrr5TfO3h6DB9pl9mZRmyvBGQb/aQ/pI= -github.com/gobuffalo/packd v0.0.0-20181104210303-d376b15f8e96/go.mod h1:Yf2toFaISlyQrr5TfO3h6DB9pl9mZRmyvBGQb/aQ/pI= -github.com/gobuffalo/packd v0.0.0-20181111195323-b2e760a5f0ff/go.mod h1:Yf2toFaISlyQrr5TfO3h6DB9pl9mZRmyvBGQb/aQ/pI= -github.com/gobuffalo/packd v0.0.0-20181114190715-f25c5d2471d7/go.mod h1:Yf2toFaISlyQrr5TfO3h6DB9pl9mZRmyvBGQb/aQ/pI= -github.com/gobuffalo/packd v0.0.0-20181124090624-311c6248e5fb/go.mod h1:Foenia9ZvITEvG05ab6XpiD5EfBHPL8A6hush8SJ0o8= -github.com/gobuffalo/packd v0.0.0-20181207120301-c49825f8f6f4/go.mod h1:LYc0TGKFBBFTRC9dg2pcRcMqGCTMD7T2BIMP7OBuQAA= -github.com/gobuffalo/packd v0.0.0-20181212173646-eca3b8fd6687 h1:uZ+G4JprR0UEq0aHZs+6eP7TEZuFfrIkmQWejIBV/QQ= -github.com/gobuffalo/packd v0.0.0-20181212173646-eca3b8fd6687/go.mod h1:LYc0TGKFBBFTRC9dg2pcRcMqGCTMD7T2BIMP7OBuQAA= -github.com/gobuffalo/packd v0.0.0-20190224160250-d04dd98aca5b h1:QlU2UkP7c/XJ994sM1Z8YN9tHsKeIOp7dyMqiLvyNt0= -github.com/gobuffalo/packd v0.0.0-20190224160250-d04dd98aca5b/go.mod h1:LYc0TGKFBBFTRC9dg2pcRcMqGCTMD7T2BIMP7OBuQAA= -github.com/gobuffalo/packr v1.13.7/go.mod h1:KkinLIn/n6+3tVXMwg6KkNvWwVsrRAz4ph+jgpk3Z24= -github.com/gobuffalo/packr v1.15.0/go.mod h1:t5gXzEhIviQwVlNx/+3SfS07GS+cZ2hn76WLzPp6MGI= -github.com/gobuffalo/packr v1.15.1/go.mod h1:IeqicJ7jm8182yrVmNbM6PR4g79SjN9tZLH8KduZZwE= -github.com/gobuffalo/packr v1.19.0/go.mod h1:MstrNkfCQhd5o+Ct4IJ0skWlxN8emOq8DsoT1G98VIU= -github.com/gobuffalo/packr v1.20.0/go.mod h1:JDytk1t2gP+my1ig7iI4NcVaXr886+N0ecUga6884zw= -github.com/gobuffalo/packr v1.21.0 h1:p2ujcDJQp2QTiYWcI0ByHbr/gMoCouok6M0vXs/yTYQ= -github.com/gobuffalo/packr v1.21.0/go.mod h1:H00jGfj1qFKxscFJSw8wcL4hpQtPe1PfU2wa6sg/SR0= -github.com/gobuffalo/packr/v2 v2.0.0-rc.8/go.mod h1:y60QCdzwuMwO2R49fdQhsjCPv7tLQFR0ayzxxla9zes= -github.com/gobuffalo/packr/v2 v2.0.0-rc.9/go.mod h1:fQqADRfZpEsgkc7c/K7aMew3n4aF1Kji7+lIZeR98Fc= -github.com/gobuffalo/packr/v2 v2.0.0-rc.10/go.mod h1:4CWWn4I5T3v4c1OsJ55HbHlUEKNWMITG5iIkdr4Px4w= -github.com/gobuffalo/packr/v2 v2.0.0-rc.11/go.mod h1:JoieH/3h3U4UmatmV93QmqyPUdf4wVM9HELaHEu+3fk= -github.com/gobuffalo/packr/v2 v2.0.0-rc.12/go.mod h1:FV1zZTsVFi1DSCboO36Xgs4pzCZBjB/tDV9Cz/lSaR8= -github.com/gobuffalo/packr/v2 v2.0.0-rc.13/go.mod h1:2Mp7GhBFMdJlOK8vGfl7SYtfMP3+5roE39ejlfjw0rA= -github.com/gobuffalo/packr/v2 v2.0.0-rc.14/go.mod h1:06otbrNvDKO1eNQ3b8hst+1010UooI2MFg+B2Ze4MV8= -github.com/gobuffalo/packr/v2 v2.0.0-rc.15 h1:vSmYcMO6CtuNQvMSbEJeIJlaeZzz2zoxGLTy8HrDh80= -github.com/gobuffalo/packr/v2 v2.0.0-rc.15/go.mod h1:IMe7H2nJvcKXSF90y4X1rjYIRlNMJYCxEhssBXNZwWs= -github.com/gobuffalo/packr/v2 v2.0.0/go.mod h1:7McfLpSxaPUoSQm7gYpTZRQSK63mX8EKzzYSEFKvfkM= -github.com/gobuffalo/packr/v2 v2.0.1/go.mod h1:tp5/5A2e67F1lUGTiNadtA2ToP045+mvkWzaqMCsZr4= -github.com/gobuffalo/packr/v2 v2.0.2 h1:Rlh39nDGlfG0wGSrfFi72JknkNdjRpEr44ZFymEOY80= -github.com/gobuffalo/packr/v2 v2.0.2/go.mod h1:6Y+2NY9cHDlrz96xkJG8bfPwLlCdJVS/irhNJmwD7kM= -github.com/gobuffalo/plush v3.7.16+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= -github.com/gobuffalo/plush v3.7.20+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= -github.com/gobuffalo/plush v3.7.21+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= -github.com/gobuffalo/plush v3.7.22+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= -github.com/gobuffalo/plush v3.7.23+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= -github.com/gobuffalo/plush v3.7.30+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= -github.com/gobuffalo/plush v3.7.31+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= -github.com/gobuffalo/plush v3.7.32+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= -github.com/gobuffalo/plush v3.7.33+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= -github.com/gobuffalo/plushgen v0.0.0-20181128164830-d29dcb966cb2/go.mod h1:r9QwptTFnuvSaSRjpSp4S2/4e2D3tJhARYbvEBcKSb4= -github.com/gobuffalo/plushgen v0.0.0-20181203163832-9fc4964505c2/go.mod h1:opEdT33AA2HdrIwK1aibqnTJDVVKXC02Bar/GT1YRVs= -github.com/gobuffalo/plushgen v0.0.0-20181207152837-eedb135bd51b/go.mod h1:Lcw7HQbEVm09sAQrCLzIxuhFbB3nAgp4c55E+UlynR0= -github.com/gobuffalo/plushgen v0.0.0-20190104222512-177cd2b872b3/go.mod h1:tYxCozi8X62bpZyKXYHw1ncx2ZtT2nFvG42kuLwYjoc= -github.com/gobuffalo/pop v4.8.2+incompatible/go.mod h1:DwBz3SD5SsHpTZiTubcsFWcVDpJWGsxjVjMPnkiThWg= -github.com/gobuffalo/pop v4.8.3+incompatible/go.mod h1:DwBz3SD5SsHpTZiTubcsFWcVDpJWGsxjVjMPnkiThWg= -github.com/gobuffalo/pop v4.8.4+incompatible/go.mod h1:DwBz3SD5SsHpTZiTubcsFWcVDpJWGsxjVjMPnkiThWg= -github.com/gobuffalo/release v1.0.35/go.mod h1:VtHFAKs61vO3wboCec5xr9JPTjYyWYcvaM3lclkc4x4= -github.com/gobuffalo/release v1.0.38/go.mod h1:VtHFAKs61vO3wboCec5xr9JPTjYyWYcvaM3lclkc4x4= -github.com/gobuffalo/release v1.0.42/go.mod h1:RPs7EtafH4oylgetOJpGP0yCZZUiO4vqHfTHJjSdpug= -github.com/gobuffalo/release v1.0.52/go.mod h1:RPs7EtafH4oylgetOJpGP0yCZZUiO4vqHfTHJjSdpug= -github.com/gobuffalo/release v1.0.53/go.mod h1:FdF257nd8rqhNaqtDWFGhxdJ/Ig4J7VcS3KL7n/a+aA= -github.com/gobuffalo/release v1.0.54/go.mod h1:Pe5/RxRa/BE8whDpGfRqSI7D1a0evGK1T4JDm339tJc= -github.com/gobuffalo/release v1.0.61/go.mod h1:mfIO38ujUNVDlBziIYqXquYfBF+8FDHUjKZgYC1Hj24= -github.com/gobuffalo/release v1.0.72/go.mod h1:NP5NXgg/IX3M5XmHmWR99D687/3Dt9qZtTK/Lbwc1hU= -github.com/gobuffalo/release v1.1.1/go.mod h1:Sluak1Xd6kcp6snkluR1jeXAogdJZpFFRzTYRs/2uwg= -github.com/gobuffalo/release v1.1.3/go.mod h1:CuXc5/m+4zuq8idoDt1l4va0AXAn/OSs08uHOfMVr8E= -github.com/gobuffalo/release v1.1.6/go.mod h1:18naWa3kBsqO0cItXZNJuefCKOENpbbUIqRL1g+p6z0= -github.com/gobuffalo/shoulders v1.0.1/go.mod h1:V33CcVmaQ4gRUmHKwq1fiTXuf8Gp/qjQBUL5tHPmvbA= -github.com/gobuffalo/syncx v0.0.0-20181120191700-98333ab04150/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw= -github.com/gobuffalo/syncx v0.0.0-20181120194010-558ac7de985f h1:S5EeH1reN93KR0L6TQvkRpu9YggCYXrUqFh1iEgvdC0= -github.com/gobuffalo/syncx v0.0.0-20181120194010-558ac7de985f/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw= -github.com/gobuffalo/tags v2.0.11+incompatible/go.mod h1:9XmhOkyaB7UzvuY4UoZO4s67q8/xRMVJEaakauVQYeY= -github.com/gobuffalo/tags v2.0.14+incompatible/go.mod h1:9XmhOkyaB7UzvuY4UoZO4s67q8/xRMVJEaakauVQYeY= -github.com/gobuffalo/tags v2.0.15+incompatible/go.mod h1:9XmhOkyaB7UzvuY4UoZO4s67q8/xRMVJEaakauVQYeY= -github.com/gobuffalo/uuid v2.0.3+incompatible/go.mod h1:ErhIzkRhm0FtRuiE/PeORqcw4cVi1RtSpnwYrxuvkfE= -github.com/gobuffalo/uuid v2.0.4+incompatible/go.mod h1:ErhIzkRhm0FtRuiE/PeORqcw4cVi1RtSpnwYrxuvkfE= -github.com/gobuffalo/uuid v2.0.5+incompatible/go.mod h1:ErhIzkRhm0FtRuiE/PeORqcw4cVi1RtSpnwYrxuvkfE= -github.com/gobuffalo/validate v2.0.3+incompatible/go.mod h1:N+EtDe0J8252BgfzQUChBgfd6L93m9weay53EWFVsMM= -github.com/gobuffalo/x v0.0.0-20181003152136-452098b06085/go.mod h1:WevpGD+5YOreDJznWevcn8NTmQEW5STSBgIkpkjzqXc= -github.com/gobuffalo/x v0.0.0-20181007152206-913e47c59ca7/go.mod h1:9rDPXaB3kXdKWzMc4odGQQdG2e2DIEmANy5aSJ9yesY= +github.com/gobuffalo/logger v1.0.3/go.mod h1:SoeejUwldiS7ZsyCBphOGURmWdwUFXs0J7TCjEhjKxM= +github.com/gobuffalo/logger v1.0.4 h1:HFJRqL7AmL4QNvQb9Grss9sDz+3u02VBgAoR03A7q4o= +github.com/gobuffalo/logger v1.0.4/go.mod h1:/GRUdWb+gM3shxj0P5jiV6ecVS3X0aboJvl+hBu0HeE= +github.com/gobuffalo/packd v1.0.0 h1:6ERZvJHfe24rfFmA9OaoKBdC7+c9sydrytMg8SdFGBM= +github.com/gobuffalo/packd v1.0.0/go.mod h1:6VTc4htmJRFB7u1m/4LeMTWjFoYrUiBkU9Fdec9hrhI= +github.com/gobuffalo/packr/v2 v2.8.1 h1:tkQpju6i3EtMXJ9uoF5GT6kB+LMTimDWD8Xvbz6zDVA= +github.com/gobuffalo/packr/v2 v2.8.1/go.mod h1:c/PLlOuTU+p3SybaJATW3H6lX/iK7xEz5OeMf+NnJpg= github.com/gobwas/httphead v0.1.0 h1:exrUm0f4YX0L7EBwZHuCF4GDp8aJfVeBrlLQrs6NqWU= github.com/gobwas/httphead v0.1.0/go.mod h1:O/RXo79gxV8G+RqlR/otEwx4Q36zl9rqC5u12GKvMCM= github.com/gobwas/pool v0.2.1 h1:xfeeEhW7pwmX8nuLVlqbzVc7udMDrwetjEv+TZIz1og= @@ -375,8 +151,6 @@ github.com/gobwas/pool v0.2.1/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6Wezm github.com/gobwas/ws v1.1.0-rc.5 h1:QOAag7FoBaBYYHRqzqkhhd8fq5RTubvI4v3Ft/gDVVQ= github.com/gobwas/ws v1.1.0-rc.5/go.mod h1:nzvNcVha5eUziGrbxFCo6qFIojQHjJV5cLYIbezhfL0= github.com/gocql/gocql v0.0.0-20190301043612-f6df8288f9b4/go.mod h1:4Fw1eo5iaEhDUs8XyuhSVCVy52Jq3L+/3GJgYkwc+/0= -github.com/gofrs/uuid v3.1.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/protobuf v1.0.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= @@ -384,22 +158,18 @@ github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zV github.com/golang-migrate/migrate/v4 v4.3.1 h1:3eR1NY+pplX+m6yJ1fQf5dFWX3fBgUtZfDiaS/kJVu4= github.com/golang-migrate/migrate/v4 v4.3.1/go.mod h1:mJ89KBgbXmM3P49BqOxRL3riNF/ATlg5kMhm17GA0dE= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef h1:veQD95Isof8w9/WXiA+pa3tz3fJXkt5B7QaRBrM62gk= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:tluoj9z5200jBnyusfRPU2LqT6J+DAorxEvtC7LHB+E= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/snappy v0.0.0-20170215233205-553a64147049/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/gomodule/redigo v2.0.0+incompatible/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= github.com/google/btree v0.0.0-20180124185431-e89373fe6b4a/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= @@ -414,11 +184,8 @@ github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXi github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/googleapis/gax-go v2.0.0+incompatible/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY= -github.com/googleapis/gax-go/v2 v2.0.3/go.mod h1:LLvjysVCY1JZeum8Z6l8qUty8fiNwE08qbEPm1M08qg= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e h1:JKmoR8x90Iww1ks85zJ1lfDGgIiMDuIptTOhJq+zKyg= github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= @@ -427,21 +194,15 @@ github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51 github.com/gorilla/mux v1.6.1/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.1/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/pat v0.0.0-20180118222023-199c85a7f6d1/go.mod h1:YeAe0gNeiNT5hoiZRI4yiOky6jVdNvfO2N6Kav/HmxY= github.com/gorilla/securecookie v1.1.1 h1:miw7JPhV+b/lAHSXz4qd/nN9jRiAFV5FwjeKyCS8BvQ= github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= -github.com/gorilla/sessions v1.1.2/go.mod h1:8KCfur6+4Mqcc6S0FEfKuN15Vl5MgXW92AE8ovaJD0w= -github.com/gorilla/sessions v1.1.3/go.mod h1:8KCfur6+4Mqcc6S0FEfKuN15Vl5MgXW92AE8ovaJD0w= github.com/gorilla/sessions v1.2.0 h1:S7P+1Hm5V/AT9cjEcUD5uDaQSX0OE577aCXgoaKpYbQ= github.com/gorilla/sessions v1.2.0/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM= -github.com/gorilla/websocket v1.4.0 h1:WDFjx/TMzVgy9VdMMQi2K2Emtwi2QcUQsztZ/zLaH/Q= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.5.0/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/h2non/filetype v1.0.8 h1:le8gpf+FQA0/DlDABbtisA1KiTS0Xi+YSC/E8yY3Y14= github.com/h2non/filetype v1.0.8/go.mod h1:isekKqOuhMj+s/7r3rIeTErIRy4Rub5uBWHfvMusLMU= @@ -461,7 +222,6 @@ github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdv github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= -github.com/hashicorp/golang-lru v0.5.0 h1:CL2msUPvZTLb5O648aiLNJw3hnBxN2+1Jq8rCOH9wdo= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1 h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= @@ -477,16 +237,11 @@ github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NH github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/jackc/fake v0.0.0-20150926172116-812a484cc733/go.mod h1:WrMFNQdiFJ80sQsxDoMokWK1W5TQtxBFNpzWTD84ibQ= github.com/jackc/pgx v3.2.0+incompatible/go.mod h1:0ZGrqGqkRlliWnWB4zKnWtjbSWbGkVEFm4TeybAXq+I= -github.com/jellevandenhooff/dkim v0.0.0-20150330215556-f50fe3d243e1/go.mod h1:E0B/fFc00Y+Rasa88328GlI/XbtyysCtTHZS8h7IrBU= github.com/jinzhu/copier v0.0.0-20190924061706-b57f9002281a h1:zPPuIq2jAWWPTrGt70eK/BSch+gFAGrNzecsoENgu2o= github.com/jinzhu/copier v0.0.0-20190924061706-b57f9002281a/go.mod h1:yL958EeXv8Ylng6IfnvG4oflryUi3vgA3xPs9hmII1s= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= -github.com/jmoiron/sqlx v0.0.0-20180614180643-0dae4fefe7c0/go.mod h1:IiEW3SEiiErVyFdH8NTuWjSifiEQKUoyK3LNqr2kCHU= github.com/jmoiron/sqlx v1.2.0 h1:41Ip0zITnmWNR/vHV+S4m+VoUivnWY5E4OJfLZjCJMA= github.com/jmoiron/sqlx v1.2.0/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks= -github.com/joho/godotenv v1.2.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= -github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc= -github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= @@ -499,73 +254,46 @@ github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7 github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8= -github.com/karrick/godirwalk v1.7.5/go.mod h1:2c9FRhkDxdIbgkOnCEvnSWs71Bhugbl46shStcFDJ34= -github.com/karrick/godirwalk v1.7.7/go.mod h1:2c9FRhkDxdIbgkOnCEvnSWs71Bhugbl46shStcFDJ34= -github.com/karrick/godirwalk v1.7.8 h1:VfG72pyIxgtC7+3X9CMHI0AOl4LwyRAg98WAgsvffi8= -github.com/karrick/godirwalk v1.7.8/go.mod h1:2c9FRhkDxdIbgkOnCEvnSWs71Bhugbl46shStcFDJ34= -github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= +github.com/karrick/godirwalk v1.15.8/go.mod h1:j4mkqPuvaLI8mp1DroR3P6ad7cyYd4c1qeJ3RV7ULlk= +github.com/karrick/godirwalk v1.16.1 h1:DynhcF+bztK8gooS0+NDJFrdNZjJ3gzVzC545UNA9iw= +github.com/karrick/godirwalk v1.16.1/go.mod h1:j4mkqPuvaLI8mp1DroR3P6ad7cyYd4c1qeJ3RV7ULlk= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/konsorten/go-windows-terminal-sequences v0.0.0-20180402223658-b729f2633dfe/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.2 h1:DB17ag19krx9CFsz4o3enTrPXyIXCl+2iCXH/aMAp9s= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/pty v1.1.3/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kshvakov/clickhouse v1.3.5/go.mod h1:DMzX7FxRymoNkVgizH0DWAL8Cur7wHLgx3MUnGwJqpE= github.com/lib/pq v1.0.0 h1:X5PMW56eZitiTeO7tKzZxFCSpbFZJtkMMooicw2us9A= github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/logrusorgru/aurora v0.0.0-20200102142835-e9ef32dff381/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4= -github.com/magiconair/properties v1.8.0 h1:LLgXmsheXeRoUOBOjtwPQCWIYqM/LU1ayDtDePerRcY= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/markbates/deplist v1.0.4/go.mod h1:gRRbPbbuA8TmMiRvaOzUlRfzfjeCCBqX2A6arxN01MM= -github.com/markbates/deplist v1.0.5/go.mod h1:gRRbPbbuA8TmMiRvaOzUlRfzfjeCCBqX2A6arxN01MM= -github.com/markbates/going v1.0.2/go.mod h1:UWCk3zm0UKefHZ7l8BNqi26UyiEMniznk8naLdTcy6c= -github.com/markbates/going v1.0.3/go.mod h1:fQiT6v6yQar9UD6bd/D4Z5Afbk9J6BBVBtLiyY4gp2o= -github.com/markbates/grift v1.0.4/go.mod h1:wbmtW74veyx+cgfwFhlnnMWqhoz55rnHR47oMXzsyVs= -github.com/markbates/hmax v1.0.0/go.mod h1:cOkR9dktiESxIMu+65oc/r/bdY4bE8zZw3OLhLx0X2c= -github.com/markbates/inflect v1.0.0/go.mod h1:oTeZL2KHA7CUX6X+fovmK9OvIOFuqu0TwdQrZjLTh88= -github.com/markbates/inflect v1.0.1/go.mod h1:uv3UVNBe5qBIfCm8O8Q+DW+S1EopeyINj+Ikhc7rnCk= -github.com/markbates/inflect v1.0.3/go.mod h1:1fR9+pO2KHEO9ZRtto13gDwwZaAKstQzferVeWqbgNs= -github.com/markbates/inflect v1.0.4/go.mod h1:1fR9+pO2KHEO9ZRtto13gDwwZaAKstQzferVeWqbgNs= -github.com/markbates/oncer v0.0.0-20180924031910-e862a676800b/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= -github.com/markbates/oncer v0.0.0-20180924034138-723ad0170a46/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= -github.com/markbates/oncer v0.0.0-20181014194634-05fccaae8fc4/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= -github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2 h1:JgVTCPf0uBVcUSWpyXmGpgOc62nK5HWUBKAGc3Qqa5k= -github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= -github.com/markbates/refresh v1.4.10/go.mod h1:NDPHvotuZmTmesXxr95C9bjlw1/0frJwtME2dzcVKhc= -github.com/markbates/safe v1.0.0/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= +github.com/markbates/errx v1.1.0 h1:QDFeR+UP95dO12JgW+tgi2UVfo0V8YBHiUIOaeBPiEI= +github.com/markbates/errx v1.1.0/go.mod h1:PLa46Oex9KNbVDZhKel8v1OT7hD5JZ2eI7AHhA0wswc= +github.com/markbates/oncer v1.0.0 h1:E83IaVAHygyndzPimgUYJjbshhDTALZyXxvk9FOlQRY= +github.com/markbates/oncer v1.0.0/go.mod h1:Z59JA581E9GP6w96jai+TGqafHPW+cPfRxz2aSZ0mcI= github.com/markbates/safe v1.0.1 h1:yjZkbvRM6IzKj9tlu/zMJLS0n/V351OZWRnF3QfaUxI= github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= -github.com/markbates/sigtx v1.0.0/go.mod h1:QF1Hv6Ic6Ca6W+T+DL0Y/ypborFKyvUY9HmuCD4VeTc= -github.com/markbates/willie v1.0.9/go.mod h1:fsrFVWl91+gXpx/6dv715j7i11fYPfZ9ZGfH0DQzY7w= github.com/matryer/moq v0.0.0-20200106131100-75d0ddfc0007 h1:reVOUXwnhsYv/8UqjvhrMOu5CNT9UapHFLbQ2JcXsmg= github.com/matryer/moq v0.0.0-20200106131100-75d0ddfc0007/go.mod h1:9ELz6aaclSIGnZBoaSLZ3NAl1VTufbOrXBPvtcy6WiQ= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-sqlite3 v1.9.0 h1:pDRiWfl+++eC2FEFRy6jXmQlvp4Yh3z1MJKg4UeYM/4= github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= -github.com/mattn/go-sqlite3 v1.10.0 h1:jbhqpg7tQe4SupckyijYiy0mJJ/pRyHvXf7JdWK860o= github.com/mattn/go-sqlite3 v1.10.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/mattn/go-sqlite3 v1.14.6 h1:dNPt6NO46WmLVt2DLNpwczCmdV5boIZ6g/tlDrlRUbg= github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/microcosm-cc/bluemonday v1.0.1/go.mod h1:hsXNsILzKxV+sX77C5b8FSuKF00vh2OMYv+xgHpAMF4= -github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= @@ -576,40 +304,30 @@ github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS4 github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v0.0.0-20180203102830-a4e142e9c047/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.0.0/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742 h1:Esafd1046DLDQ0W1YjYsBW+p8U2u7vzgW2SQVmlNazg= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/mongodb/mongo-go-driver v0.3.0/go.mod h1:NK/HWDIIZkaYsnYa0hmtP443T5ELr0KDecmIioVuuyU= -github.com/monoculum/formam v0.0.0-20180901015400-4e68be1d79ba/go.mod h1:RKgILGEJq24YyJ2ban8EO0RUVSJlF1pGsEvoLEACr/Q= github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae/go.mod h1:qAyveg+e4CE+eKJXWVjKXM4ck2QobLqTDytGJbLLhJg= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/nakagami/firebirdsql v0.0.0-20190310045651-3c02a58cfed8/go.mod h1:86wM1zFnC6/uDBfZGNwB65O+pR2OFi5q/YQaEUid1qA= github.com/natefinch/pie v0.0.0-20170715172608-9a0d72014007 h1:Ohgj9L0EYOgXxkDp+bczlMBiulwmqYzQpvQNUdtt3oc= github.com/natefinch/pie v0.0.0-20170715172608-9a0d72014007/go.mod h1:wKCOWMb6iNlvKiOToY2cNuaovSXvIiv1zDi9QDR7aGQ= -github.com/neelance/astrewrite v0.0.0-20160511093645-99348263ae86/go.mod h1:kHJEU3ofeGjhHklVoIGuVj85JJwZ6kWPaJwCIxgnFmo= -github.com/neelance/sourcemap v0.0.0-20151028013722-8c68805598ab/go.mod h1:Qr6/a/Q4r9LP1IltGz7tA7iOK1WonHEYhu1HRBA7ZiM= github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 h1:zYyBkD/k9seD2A7fsi6Oo2LfFZAehjjQMERAvZLEDnQ= github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646/go.mod h1:jpp1/29i3P1S/RLdc7JQKbRpFeM1dOBd8T9ki5s+AY8= -github.com/nicksnyder/go-i18n v1.10.0/go.mod h1:HrK7VCrbOvQoUAQ7Vpy7i87N7JZZZ7R2xBGjv0j365Q= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= -github.com/onsi/gomega v1.4.2/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8= github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc= @@ -617,25 +335,21 @@ github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/9 github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= -github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= @@ -646,21 +360,14 @@ github.com/remeh/sizedwaitgroup v1.0.0/go.mod h1:3j2R4OIe/SeS6YDhICBy22RWjJC5eNC github.com/robertkrimen/otto v0.0.0-20200922221731-ef014fd054ac h1:kYPjbEN6YPYWWHI6ky1J813KzIq/8+Wg4TO4xU7A/KU= github.com/robertkrimen/otto v0.0.0-20200922221731-ef014fd054ac/go.mod h1:xvqspoSXJTIpemEonrMDFq6XzwHYYgToXWj5eRX1OtY= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= -github.com/rogpeppe/go-internal v1.0.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.1.0 h1:g0fH8RicVgNl+zVZDCDfbdWxAWoAEJyI7I3TZYXFiig= -github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.2.2 h1:J7U/N7eRtzjhs26d6GqMh2HBuXP8/Z64Densiiieafo= -github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.3.0 h1:RR9dF3JtopPvtkroDZuVD7qquD0bnHlKSqaQhgwt8yk= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.5.2 h1:qLvObTrvO/XRCqmkKxUlOBc48bI3efyDuAZe25QiF0w= +github.com/rogpeppe/go-internal v1.5.2/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rs/cors v1.6.0 h1:G9tHG9lebljV9mfp9SNPDL36nCDxmo3zTlAf1YgvzmI= github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= github.com/rs/zerolog v1.18.0 h1:CbAm3kP2Tptby1i9sYy2MGRg0uxIN9cyDb59Ys7W8z8= github.com/rs/zerolog v1.18.0/go.mod h1:9nvC1axdVrAHcu/s9taAVfBuIdTZLVQmKQyvrUjF5+I= -github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= -github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= -github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= @@ -668,77 +375,40 @@ github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb github.com/ryszard/goskiplist v0.0.0-20150312221310-2dfbae5fcf46/go.mod h1:uAQ5PCi+MFsC7HjREoAz1BU+Mq60+05gifQSsHSDG/8= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/serenize/snaker v0.0.0-20171204205717-a683aaf2d516/go.mod h1:Yow6lPLSAXx2ifx470yD/nUe22Dv5vBvxK/UK9UUTVs= -github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= -github.com/shurcooL/component v0.0.0-20170202220835-f88ec8f54cc4/go.mod h1:XhFIlyj5a1fBNx5aJTbKoIq0mNaPvOagO+HjB3EtxrY= -github.com/shurcooL/events v0.0.0-20181021180414-410e4ca65f48/go.mod h1:5u70Mqkb5O5cxEA8nxTsgrgLehJeAw6Oc4Ab1c/P1HM= -github.com/shurcooL/github_flavored_markdown v0.0.0-20181002035957-2122de532470/go.mod h1:2dOwnU2uBioM+SGy2aZoq1f/Sd1l9OkAeAUvjSyvgU0= -github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= -github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ= -github.com/shurcooL/gofontwoff v0.0.0-20180329035133-29b52fc0a18d/go.mod h1:05UtEgK5zq39gLST6uB0cf3NEHjETfB4Fgr3Gx5R9Vw= -github.com/shurcooL/gopherjslib v0.0.0-20160914041154-feb6d3990c2c/go.mod h1:8d3azKNyqcHP1GaQE/c6dDgjkgSx2BZ4IoEi4F1reUI= github.com/shurcooL/graphql v0.0.0-20181231061246-d48a9a75455f h1:tygelZueB1EtXkPI6mQ4o9DQ0+FKW41hTbunoXZCTqk= github.com/shurcooL/graphql v0.0.0-20181231061246-d48a9a75455f/go.mod h1:AuYgA5Kyo4c7HfUmvRGs/6rGlMMV/6B1bVnB9JxJEEg= -github.com/shurcooL/highlight_diff v0.0.0-20170515013008-09bb4053de1b/go.mod h1:ZpfEhSmds4ytuByIcDnOLkTHGUI6KNqRNPDLHDk+mUU= -github.com/shurcooL/highlight_go v0.0.0-20170515013102-78fb10f4a5f8/go.mod h1:UDKB5a1T23gOMUJrI+uSuH0VRDStOiUVSjBTRDVBVag= -github.com/shurcooL/highlight_go v0.0.0-20181028180052-98c3abbbae20/go.mod h1:UDKB5a1T23gOMUJrI+uSuH0VRDStOiUVSjBTRDVBVag= -github.com/shurcooL/home v0.0.0-20181020052607-80b7ffcb30f9/go.mod h1:+rgNQw2P9ARFAs37qieuu7ohDNQ3gds9msbT2yn85sg= -github.com/shurcooL/htmlg v0.0.0-20170918183704-d01228ac9e50/go.mod h1:zPn1wHpTIePGnXSHpsVPWEktKXHr6+SS6x/IKRb7cpw= -github.com/shurcooL/httperror v0.0.0-20170206035902-86b7830d14cc/go.mod h1:aYMfkZ6DWSJPJ6c4Wwz3QtW22G7mf/PEgaB9k/ik5+Y= github.com/shurcooL/httpfs v0.0.0-20171119174359-809beceb2371/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg= -github.com/shurcooL/httpgzip v0.0.0-20180522190206-b1c53ac65af9/go.mod h1:919LwcH0M7/W4fcZ0/jy0qGght1GIhqyS/EgWGH2j5Q= -github.com/shurcooL/issues v0.0.0-20181008053335-6292fdc1e191/go.mod h1:e2qWDig5bLteJ4fwvDAc2NHzqFEthkqn7aOZAOpj+PQ= -github.com/shurcooL/issuesapp v0.0.0-20180602232740-048589ce2241/go.mod h1:NPpHK2TI7iSaM0buivtFUc9offApnI0Alt/K8hcHy0I= -github.com/shurcooL/notifications v0.0.0-20181007000457-627ab5aea122/go.mod h1:b5uSkrEVM1jQUspwbixRBhaIjIzL2xazXp6kntxYle0= -github.com/shurcooL/octicon v0.0.0-20180602230221-c42b0e3b24d9/go.mod h1:eWdoE5JD4R5UVWDucdOPg1g2fqQRq78IQa9zlOV1vpQ= -github.com/shurcooL/octicon v0.0.0-20181028054416-fa4f57f9efb2/go.mod h1:eWdoE5JD4R5UVWDucdOPg1g2fqQRq78IQa9zlOV1vpQ= -github.com/shurcooL/reactions v0.0.0-20181006231557-f2e0b4ca5b82/go.mod h1:TCR1lToEk4d2s07G3XGfz2QrgHXg4RJBvjrOozvoWfk= -github.com/shurcooL/sanitized_anchor_name v0.0.0-20170918181015-86672fcb3f95/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/shurcooL/users v0.0.0-20180125191416-49c67e49c537/go.mod h1:QJTqeLYEDaXHZDBsXlPCDqdhQuJkuw4NOtaxYe3xii4= github.com/shurcooL/vfsgen v0.0.0-20180121065927-ffb13db8def0/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw= -github.com/shurcooL/webdavfs v0.0.0-20170829043945-18c3829fa133/go.mod h1:hKmq5kWdCj2z2KEozexVbfEZIWiTjhE0+UjmZgPqehw= -github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= -github.com/sirupsen/logrus v1.1.0/go.mod h1:zrgwTnHtNr00buQ1vSptGe8m1f/BbgsPukg8qsT7A+A= -github.com/sirupsen/logrus v1.1.1/go.mod h1:zrgwTnHtNr00buQ1vSptGe8m1f/BbgsPukg8qsT7A+A= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.3.0 h1:hI/7Q+DtNZ2kINb6qt/lS+IyXnHQe9e90POfeewL/ME= -github.com/sirupsen/logrus v1.3.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= -github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= +github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v0.0.0-20181108003508-044398e4856c/go.mod h1:XDJAKZRPZ1CvBcN2aX5YOUTYGHki24fSF0Iv48Ibg0s= github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= -github.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d/go.mod h1:UdhH50NIW0fCiwBSr0co2m7BnFLdv4fQTgdqdJTHFeE= -github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e/go.mod h1:HuIsMU8RRBOtsCgI77wP899iHVBQpCmg4ErYMZB+2IA= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.0 h1:O9FblXGxoTc51M+cqr74Bm2Tmt4PvkA5iu/j8HrkNuY= github.com/spf13/afero v1.2.0/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= -github.com/spf13/cast v1.2.0/go.mod h1:r2rcYCSwa1IExKTDiTfzaxqT2FNHs8hODu4LnUfgKEg= github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v0.0.3 h1:ZlrZ4XsMRm04Fr5pSFxBgfND2EBVa1nLpiy1stUsX/8= -github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/cobra v0.0.6/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/cobra v1.0.0 h1:6m/oheQuQ13N9ks4hubMG6BnvwOeaJrqSPLahSnczz8= github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/pflag v1.0.2/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/viper v1.2.1/go.mod h1:P4AexN0a+C9tGAnUFNwDMYYZv3pjFuvmeiMyKRaNVlI= -github.com/spf13/viper v1.3.1/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/spf13/viper v1.4.0 h1:yXHLWeravcrgGyFSyCgdYpXQ9dR9c/WED3pg1RhxqEU= github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= github.com/spf13/viper v1.7.0 h1:xVKxvI7ouOI5I+U9s2eeiUfMaWBVoXA3AWskkrqK0VM= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= @@ -747,29 +417,23 @@ github.com/stretchr/objx v0.1.1 h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= -github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA= github.com/tidwall/gjson v1.8.1 h1:8j5EE9Hrh3l9Od1OIEDAb7IpezNA20UdRngNAj5N0WU= github.com/tidwall/gjson v1.8.1/go.mod h1:5/xDoumyyDNerp2U36lyolv46b3uF/9Bu6OfyQ9GImk= github.com/tidwall/match v1.0.3 h1:FQUVvBImDutD8wJLN6c5eMzWtjgONK9MwIBCOrUJKeE= github.com/tidwall/match v1.0.3/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/pretty v0.0.0-20180105212114-65a9db5fad51/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= -github.com/tidwall/pretty v1.1.0 h1:K3hMW5epkdAVwibsQEfR/7Zj0Qgt4DxtNumTq/VloO8= github.com/tidwall/pretty v1.1.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs= github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= -github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/unrolled/secure v0.0.0-20180918153822-f340ee86eb8b/go.mod h1:mnPT77IAdsi/kV7+Es7y+pXALeV3h7G6dQF6mNYjcLA= -github.com/unrolled/secure v0.0.0-20181005190816-ff9db2ff917f/go.mod h1:mnPT77IAdsi/kV7+Es7y+pXALeV3h7G6dQF6mNYjcLA= github.com/urfave/cli/v2 v2.1.1 h1:Qt8FeAtxE/vfdrLmR3rxR6JRE0RoVmbXu8+6kZtYU4k= github.com/urfave/cli/v2 v2.1.1/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ= github.com/vektah/dataloaden v0.2.1-0.20190515034641-a19b9a6e7c9e h1:+w0Zm/9gaWpEAyDlU1eKOuk5twTjAjuevXqcJJw8hrg= @@ -792,42 +456,23 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= gitlab.com/nyarla/go-crypt v0.0.0-20160106005555-d9a5dc2b789b/go.mod h1:T3BPAOm2cqquPa0MKWeNkmOM5RQsRhkrwMWonFMN7fE= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.opencensus.io v0.18.0/go.mod h1:vKdFvxhtzZ9onBp9VKHK8z/sRpBMnKAsufL7wlDrCOA= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go4.org v0.0.0-20180809161055-417644f6feb5/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE= -golang.org/x/build v0.0.0-20190111050920-041ab4dc3f9d/go.mod h1:OWs+y06UdEOHN4y+MfF/py+xQ/tYqIWW03b70/CG9Rw= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20180910181607-0e37d006457b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181001203147-e3636079e1a4/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181009213950-7c1a557ab941/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181015023909-0c41d7ab0a0e/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181024171144-74cb1d3d52f4/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181025113841-85e1b3f9139a/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181025213731-e84da0312774/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181106171534-e4dc69e5b2fd/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181112202954-3d3f9f413869/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181127143415-eb0de9b17e85/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190102171810-8d7daa0c54b3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190103213133-ff983b9c42bc h1:F5tKCVGp+MUAHhKp5MZtGqAlGX3+oCsiL1Q629FL90M= -golang.org/x/crypto v0.0.0-20190103213133-ff983b9c42bc/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734 h1:p/H982KKEjUnLJkM3tt/LemDnOc1GiZL5FCVlORJ5zo= golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550 h1:ObdrDkeb4kJdCP557AjRjq69pTHfNouLtWZG7j9rPN8= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI= +golang.org/x/crypto v0.0.0-20191122220453-ac88ee75c92c/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97 h1:/UOmuWzQfxxo9UtlXMwuQU8CMgg1eZXqTRwkSQJWKOI= +golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -835,11 +480,9 @@ golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm0 golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b h1:+qEpEAPhDZ1o0x3tHzZTQDArnOixOzGD9HUJfcg0mb4= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/image v0.0.0-20210220032944-ac19c3e999fb h1:fqpd0EBDzlHRCjiphRR5Zo/RSWWQlWv34418dnEixWk= golang.org/x/image v0.0.0-20210220032944-ac19c3e999fb/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -852,29 +495,17 @@ golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCc golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.2.0 h1:KU7oHjnv3XNWfa5COkzUifxZmxp1TyI7ImMXqFxLwvQ= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180816102801-aaf60122140d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180921000356-2f5d2388922f/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180926154720-4dfa2610cdf3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181011144130-49bb7cea24b1/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181017193950-04a2e542c03f/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181029044818-c44066c5c816/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181102091132-c10e9556a7bc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181106065722-10aee1819953/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181108082009-03003ca0c849/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181207154023-610586996380/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -884,122 +515,74 @@ golang.org/x/net v0.0.0-20190415214537-1da14a5a36f2/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190424112056-4829fb13d2c6/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190522155817-f3200d17e092 h1:4QSRKanuywn15aTZvI/mIDEgPQpswuFndXpOj3rKEco= golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200421231249-e086a090c8fd h1:QPwSajcTUrFriMF1nJ3XzgoqakqQEsnZf9LdXdi2nkI= golang.org/x/net v0.0.0-20200421231249-e086a090c8fd/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200822124328-c89045814202 h1:VvcQYSHwXgi7W+TpUR6A9g6Up98WAHf3f/ulnJ62IyA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110 h1:qWPm9rbaAMKs8Bq/9LRpbMqxWRVUAQwMI9fVrssnTfw= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181106182150-f42d05182288/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/perf v0.0.0-20180704124530-6e6d33e29852/go.mod h1:JLpeXjPJfIyPr5TlbXLkXWLhP8nz10XfvxElABhCtcw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208 h1:qwRHBd0NqMbJxfbotnDhm2ByMI1Shq4Y6oRJo21SGJA= golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180816055513-1c9583448a9c/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180906133057-8cf3aee42992/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180921163948-d47a0f339242/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180927150500-dad3d9fb7b6e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181005133103-4497e2df6f9e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181011152604-fa43e7bc11ba/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181022134430-8a28ead16f52/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181024145615-5cd93ef61a7c/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181025063200-d989b31c8746/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181026064943-731415f00dce/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181029174526-d69651ed3497/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181106135930-3a76605856fd/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181206074257-70b957f3b65e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190102155601-82a175fd1598/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190116161447-11f53e031339 h1:g/Jesu8+QLnA0CPzF3E1pURg0Byr7i6jLoX5sqjcAh0= -golang.org/x/sys v0.0.0-20190116161447-11f53e031339/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190415145633-3fd5a3612ccd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190426135247-a129542de9ae h1:mQLHiymj/JXKnnjc62tb7nD5pZLs940/sXJu+Xp3DBA= golang.org/x/sys v0.0.0-20190426135247-a129542de9ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd h1:xhmwyvizuTgC2qz7ZlMluP20uW+C3Rm0FD/WLDX8884= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201207223542-d4d67f95c62d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210525143221-35b2ab0089ea/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210616094352-59db8d763f22 h1:RqytpXGR1iVNX7psjB3ff8y7sNFinVFvkx1c8SjBkio= -golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c h1:F1jZWGFhYfh0Ci55sIpILtKKK8p3i2/krTr0H1rg74I= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b h1:9zKuko04nR4gjZ4+DNjHqRlAJqbJETHwiNKDqTfOjfE= +golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181003024731-2f84ea8ef872/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181006002542-f60d9635b16a/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181008205924-a2b3f7f249e9/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181013182035-5e66757b835f/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181017214349-06f26fdaaa28/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181024171208-a2dc47679d30/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181026183834-f60e5f99f081/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181030000716-a0a13e073c7b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181105230042-78dc5bac0cac/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181107215632-34b416bd17b3/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181114190951-94339b83286c/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181119130350-139d099f6620/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181127195227-b4e97c0ed882/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181127232545-e782529d0ddd/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181203210056-e5f3ab76ea4b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181205224935-3576414c54a4/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181206194817-bcd4e47d0288/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181207183836-8bc39b988060/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181212172921-837e80568c09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190102213336-ca9055ed7d04/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190104182027-498d95493402/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190111214448-fc1d57b08d7b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190118193359-16909d206f00 h1:6OmoTtlNJlHuWNIjTEyUtMBHrryp8NRuf/XtnC7MmXM= -golang.org/x/tools v0.0.0-20190118193359-16909d206f00/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190124004107-78ee07aa9465/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190125232054-d66bd3c5d5a6 h1:iZgcI2DDp6zW5v9Z/5+f0NuqoxNdmzg4hivjk2WLXpY= golang.org/x/tools v0.0.0-20190125232054-d66bd3c5d5a6/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190131142011-8dbcc66f33bb/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190206221403-44bcb96178d3/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190219185102-9394956cfdc5/go.mod h1:E6PF97AdD6v0s+fPshSmumCW1S1Ne85RbPQxELkKa44= -golang.org/x/tools v0.0.0-20190221204921-83362c3779f5/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= @@ -1008,7 +591,6 @@ golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3 golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190425222832-ad9eeb80039a/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190515012406-7d7faa4812bd h1:oMEQDWVXVNpceQoVd1JN3CQ7LYJJzs5qWqZIUcxXHHw= golang.org/x/tools v0.0.0-20190515012406-7d7faa4812bd/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= @@ -1020,11 +602,9 @@ golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200114235610-7ae403b6b589 h1:rjUrONFu4kLchcZTfp3/96bR8bW8dIa8uz3cR5n0cgM= golang.org/x/tools v0.0.0-20200114235610-7ae403b6b589/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200323144430-8dcfad9e016e h1:ssd5ulOvVWlh4kDSUF2SqzmMeWfjmwDXM+uGw/aQjRE= +golang.org/x/tools v0.0.0-20200308013534-11ec41452d41/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200323144430-8dcfad9e016e/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200827163409-021d7c6f1ec3 h1:OjYQxZBKJFs+sJbHkvSGIKNMkZXDJQ9JsMpebGhkafI= golang.org/x/tools v0.0.0-20200827163409-021d7c6f1ec3/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200915031644-64986481280e h1:tfSNPIxC48Azhz4nLSPskz/yE9R6ftFRK8pfgfqWUAc= golang.org/x/tools v0.0.0-20200915031644-64986481280e/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= @@ -1032,14 +612,10 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/api v0.0.0-20180910000450-7ca32eb868bf/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= -google.golang.org/api v0.0.0-20181030000543-1d582fd0359e/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= -google.golang.org/api v0.1.0/go.mod h1:UGEZY7KEX120AnNLIHFMKIo4obdJhkp2tPbaPlQx13Y= google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= google.golang.org/api v0.3.2/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= @@ -1048,19 +624,12 @@ google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEn google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0 h1:KxkO13IPW4Lslp2bz+KHP2E3gtFlrIGNThxkZQ3g+4c= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1 h1:QzqyMA1tlu6CgqCDUtU9V+ZKhLFT2dkJuANu5QaxI3I= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20181029155118-b69ba1387ce2/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20181202183823-bd91e49a0898/go.mod h1:7Ep/1NZk928CDR8SjdVbjWNpdIf6nzjE3BTgJDr2Atg= -google.golang.org/genproto v0.0.0-20190201180003-4b09977fb922/go.mod h1:L3J43x8/uS+qIUoksaLKe6OS3nUKxOKuIFz1sl2/jx4= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190404172233-64821d5d2107/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -1070,44 +639,33 @@ google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98 google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= -google.golang.org/grpc v1.16.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= -gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc/go.mod h1:m7x9LTH6d71AHyAX77c9yqWCCa3UKHcVEj9y7hAtKDk= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= -gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df/go.mod h1:LRQQ+SO6ZHR7tOkpBDuZnXENFzX8qRjMDMyPD6BRkCw= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.51.0 h1:AQvPpx3LzTDM0AjnIRlVFwFFGC+npRopjZxLJj6gdno= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/mail.v2 v2.0.0-20180731213649-a0242b2233b4/go.mod h1:htwXN1Qh09vZJ1NVKxQqHPBaCBbzKhp5GzuJEA4VJWw= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/sourcemap.v1 v1.0.5 h1:inv58fC9f9J3TK2Y2R1NPntXEn3/wjWHkonhIUODNTI= gopkg.in/sourcemap.v1 v1.0.5/go.mod h1:2RlvNNSMglmRrcvhfuzp4hQHwOtjxlbjX7UPY/GXb78= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= -grpc.go4.org v0.0.0-20170609214715-11d0a25b4919/go.mod h1:77eQGdRu53HpSqPFJFmuJdjuHRquDANNeA4x7B8WQ9o= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -1116,5 +674,3 @@ honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= sourcegraph.com/sourcegraph/appdash v0.0.0-20180110180208-2cc67fd64755/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= sourcegraph.com/sourcegraph/appdash-data v0.0.0-20151005221446-73f23eafcf67/go.mod h1:L5q+DGLGOQFpo1snNEkLOJT2d1YTW66rWNzatr3He1k= -sourcegraph.com/sourcegraph/go-diff v0.5.0/go.mod h1:kuch7UrkMzY0X+p9CRK03kfuPQ2zzQcaEFbx8wA8rck= -sourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4/go.mod h1:ketZ/q3QxT9HOBeFhu6RdvsftgpsbFHBF5Cas6cDKZ0= diff --git a/graphql/documents/data/config.graphql b/graphql/documents/data/config.graphql index 329e9fb3b..992bafa44 100644 --- a/graphql/documents/data/config.graphql +++ b/graphql/documents/data/config.graphql @@ -32,6 +32,7 @@ fragment ConfigGeneralData on ConfigGeneralResult { galleryExtensions excludes imageExcludes + customPerformerImageLocation scraperUserAgent scraperCertCheck scraperCDPPath diff --git a/graphql/schema/types/config.graphql b/graphql/schema/types/config.graphql index d4251b82c..89143fb7f 100644 --- a/graphql/schema/types/config.graphql +++ b/graphql/schema/types/config.graphql @@ -89,6 +89,8 @@ input ConfigGeneralInput { excludes: [String!] """Array of file regexp to exclude from Image Scans""" imageExcludes: [String!] + """Custom Performer Image Location""" + customPerformerImageLocation: String """Scraper user agent string""" scraperUserAgent: String @deprecated(reason: "use mutation ConfigureScraping(input: ConfigScrapingInput) instead") """Scraper CDP path. Path to chrome executable or remote address""" @@ -162,6 +164,8 @@ type ConfigGeneralResult { excludes: [String!]! """Array of file regexp to exclude from Image Scans""" imageExcludes: [String!]! + """Custom Performer Image Location""" + customPerformerImageLocation: String """Scraper user agent string""" scraperUserAgent: String @deprecated(reason: "use ConfigResult.scraping instead") """Scraper CDP path. Path to chrome executable or remote address""" diff --git a/pkg/api/images.go b/pkg/api/images.go index 013df4be3..e38fb6aeb 100644 --- a/pkg/api/images.go +++ b/pkg/api/images.go @@ -1,49 +1,67 @@ package api import ( - "math/rand" "strings" "github.com/gobuffalo/packr/v2" + "github.com/stashapp/stash/pkg/logger" + "github.com/stashapp/stash/pkg/manager/config" "github.com/stashapp/stash/pkg/utils" ) -var performerBox *packr.Box -var performerBoxMale *packr.Box +type imageBox struct { + box *packr.Box + files []string +} + +func newImageBox(box *packr.Box) *imageBox { + return &imageBox{ + box: box, + files: box.List(), + } +} + +var performerBox *imageBox +var performerBoxMale *imageBox +var performerBoxCustom *imageBox func initialiseImages() { - performerBox = packr.New("Performer Box", "../../static/performer") - performerBoxMale = packr.New("Male Performer Box", "../../static/performer_male") + performerBox = newImageBox(packr.New("Performer Box", "../../static/performer")) + performerBoxMale = newImageBox(packr.New("Male Performer Box", "../../static/performer_male")) + initialiseCustomImages() } -func getRandomPerformerImage(gender string) ([]byte, error) { - var box *packr.Box - switch strings.ToUpper(gender) { - case "FEMALE": - box = performerBox - case "MALE": - box = performerBoxMale - default: - box = performerBox - +func initialiseCustomImages() { + customPath := config.GetInstance().GetCustomPerformerImageLocation() + if customPath != "" { + logger.Debugf("Loading custom performer images from %s", customPath) + // We need to set performerBoxCustom at runtime, as this is a custom path, and store it in a pointer. + performerBoxCustom = newImageBox(packr.Folder(customPath)) + } else { + performerBoxCustom = nil } - imageFiles := box.List() - index := rand.Intn(len(imageFiles)) - return box.Find(imageFiles[index]) } -func getRandomPerformerImageUsingName(name, gender string) ([]byte, error) { - var box *packr.Box - switch strings.ToUpper(gender) { - case "FEMALE": - box = performerBox - case "MALE": - box = performerBoxMale - default: - box = performerBox +func getRandomPerformerImageUsingName(name, gender, customPath string) ([]byte, error) { + var box *imageBox + // If we have a custom path, we should return a new box in the given path. + if performerBoxCustom != nil && len(performerBoxCustom.files) > 0 { + box = performerBoxCustom } - imageFiles := box.List() + + if box == nil { + switch strings.ToUpper(gender) { + case "FEMALE": + box = performerBox + case "MALE": + box = performerBoxMale + default: + box = performerBox + } + } + + imageFiles := box.files index := utils.IntFromString(name) % uint64(len(imageFiles)) - return box.Find(imageFiles[index]) + return box.box.Find(imageFiles[index]) } diff --git a/pkg/api/resolver_mutation_configure.go b/pkg/api/resolver_mutation_configure.go index 6c10647ca..f489a23a1 100644 --- a/pkg/api/resolver_mutation_configure.go +++ b/pkg/api/resolver_mutation_configure.go @@ -167,6 +167,11 @@ func (r *mutationResolver) ConfigureGeneral(ctx context.Context, input models.Co c.Set(config.CreateGalleriesFromFolders, input.CreateGalleriesFromFolders) + if input.CustomPerformerImageLocation != nil { + c.Set(config.CustomPerformerImageLocation, *input.CustomPerformerImageLocation) + initialiseCustomImages() + } + refreshScraperCache := false if input.ScraperUserAgent != nil { c.Set(config.ScraperUserAgent, input.ScraperUserAgent) diff --git a/pkg/api/resolver_query_configuration.go b/pkg/api/resolver_query_configuration.go index cf284142a..53ab886bb 100644 --- a/pkg/api/resolver_query_configuration.go +++ b/pkg/api/resolver_query_configuration.go @@ -50,45 +50,48 @@ func makeConfigGeneralResult() *models.ConfigGeneralResult { maxTranscodeSize := config.GetMaxTranscodeSize() maxStreamingTranscodeSize := config.GetMaxStreamingTranscodeSize() + customPerformerImageLocation := config.GetCustomPerformerImageLocation() + scraperUserAgent := config.GetScraperUserAgent() scraperCDPPath := config.GetScraperCDPPath() return &models.ConfigGeneralResult{ - Stashes: config.GetStashPaths(), - DatabasePath: config.GetDatabasePath(), - GeneratedPath: config.GetGeneratedPath(), - ConfigFilePath: config.GetConfigFilePath(), - ScrapersPath: config.GetScrapersPath(), - CachePath: config.GetCachePath(), - CalculateMd5: config.IsCalculateMD5(), - VideoFileNamingAlgorithm: config.GetVideoFileNamingAlgorithm(), - ParallelTasks: config.GetParallelTasks(), - PreviewAudio: config.GetPreviewAudio(), - PreviewSegments: config.GetPreviewSegments(), - PreviewSegmentDuration: config.GetPreviewSegmentDuration(), - PreviewExcludeStart: config.GetPreviewExcludeStart(), - PreviewExcludeEnd: config.GetPreviewExcludeEnd(), - PreviewPreset: config.GetPreviewPreset(), - MaxTranscodeSize: &maxTranscodeSize, - MaxStreamingTranscodeSize: &maxStreamingTranscodeSize, - APIKey: config.GetAPIKey(), - Username: config.GetUsername(), - Password: config.GetPasswordHash(), - MaxSessionAge: config.GetMaxSessionAge(), - LogFile: &logFile, - LogOut: config.GetLogOut(), - LogLevel: config.GetLogLevel(), - LogAccess: config.GetLogAccess(), - VideoExtensions: config.GetVideoExtensions(), - ImageExtensions: config.GetImageExtensions(), - GalleryExtensions: config.GetGalleryExtensions(), - CreateGalleriesFromFolders: config.GetCreateGalleriesFromFolders(), - Excludes: config.GetExcludes(), - ImageExcludes: config.GetImageExcludes(), - ScraperUserAgent: &scraperUserAgent, - ScraperCertCheck: config.GetScraperCertCheck(), - ScraperCDPPath: &scraperCDPPath, - StashBoxes: config.GetStashBoxes(), + Stashes: config.GetStashPaths(), + DatabasePath: config.GetDatabasePath(), + GeneratedPath: config.GetGeneratedPath(), + ConfigFilePath: config.GetConfigFilePath(), + ScrapersPath: config.GetScrapersPath(), + CachePath: config.GetCachePath(), + CalculateMd5: config.IsCalculateMD5(), + VideoFileNamingAlgorithm: config.GetVideoFileNamingAlgorithm(), + ParallelTasks: config.GetParallelTasks(), + PreviewAudio: config.GetPreviewAudio(), + PreviewSegments: config.GetPreviewSegments(), + PreviewSegmentDuration: config.GetPreviewSegmentDuration(), + PreviewExcludeStart: config.GetPreviewExcludeStart(), + PreviewExcludeEnd: config.GetPreviewExcludeEnd(), + PreviewPreset: config.GetPreviewPreset(), + MaxTranscodeSize: &maxTranscodeSize, + MaxStreamingTranscodeSize: &maxStreamingTranscodeSize, + APIKey: config.GetAPIKey(), + Username: config.GetUsername(), + Password: config.GetPasswordHash(), + MaxSessionAge: config.GetMaxSessionAge(), + LogFile: &logFile, + LogOut: config.GetLogOut(), + LogLevel: config.GetLogLevel(), + LogAccess: config.GetLogAccess(), + VideoExtensions: config.GetVideoExtensions(), + ImageExtensions: config.GetImageExtensions(), + GalleryExtensions: config.GetGalleryExtensions(), + CreateGalleriesFromFolders: config.GetCreateGalleriesFromFolders(), + Excludes: config.GetExcludes(), + ImageExcludes: config.GetImageExcludes(), + CustomPerformerImageLocation: &customPerformerImageLocation, + ScraperUserAgent: &scraperUserAgent, + ScraperCertCheck: config.GetScraperCertCheck(), + ScraperCDPPath: &scraperCDPPath, + StashBoxes: config.GetStashBoxes(), } } diff --git a/pkg/api/routes_performer.go b/pkg/api/routes_performer.go index 7e50c4551..1940e0dfe 100644 --- a/pkg/api/routes_performer.go +++ b/pkg/api/routes_performer.go @@ -7,6 +7,7 @@ import ( "github.com/go-chi/chi" "github.com/stashapp/stash/pkg/manager" + "github.com/stashapp/stash/pkg/manager/config" "github.com/stashapp/stash/pkg/models" "github.com/stashapp/stash/pkg/utils" ) @@ -39,7 +40,7 @@ func (rs performerRoutes) Image(w http.ResponseWriter, r *http.Request) { } if len(image) == 0 || defaultParam == "true" { - image, _ = getRandomPerformerImageUsingName(performer.Name.String, performer.Gender.String) + image, _ = getRandomPerformerImageUsingName(performer.Name.String, performer.Gender.String, config.GetInstance().GetCustomPerformerImageLocation()) } utils.ServeImage(image, w, r) diff --git a/pkg/manager/config/config.go b/pkg/manager/config/config.go index 618fdcdcf..8e1c29209 100644 --- a/pkg/manager/config/config.go +++ b/pkg/manager/config/config.go @@ -120,6 +120,7 @@ var defaultMenuItems = []string{"scenes", "images", "movies", "markers", "galler const SoundOnPreview = "sound_on_preview" const WallShowTitle = "wall_show_title" +const CustomPerformerImageLocation = "custom_performer_image_location" const MaximumLoopDuration = "maximum_loop_duration" const AutostartVideo = "autostart_video" const ShowStudioAsText = "show_studio_as_text" @@ -585,6 +586,12 @@ func (i *Instance) GetWallShowTitle() bool { return viper.GetBool(WallShowTitle) } +func (i *Instance) GetCustomPerformerImageLocation() string { + // don't set the default, as it causes race condition crashes + // viper.SetDefault(CustomPerformerImageLocation, "") + return viper.GetString(CustomPerformerImageLocation) +} + func (i *Instance) GetWallPlayback() string { viper.SetDefault(WallPlayback, "video") return viper.GetString(WallPlayback) diff --git a/ui/v2.5/src/components/Changelog/versions/v090.md b/ui/v2.5/src/components/Changelog/versions/v090.md index 4a10a7da9..48641fc4b 100644 --- a/ui/v2.5/src/components/Changelog/versions/v090.md +++ b/ui/v2.5/src/components/Changelog/versions/v090.md @@ -1,4 +1,5 @@ ### ✨ New Features +* Support setting a custom directory for default performer images. ([#1489](https://github.com/stashapp/stash/pull/1489)) * Added filtering and sorting on scene marker count for tags. ([#1603](https://github.com/stashapp/stash/pull/1603)) * Support excluding fields and editing tags when saving from scene tagger view. ([#1605](https://github.com/stashapp/stash/pull/1605)) * Added not equals/greater than/less than modifiers for resolution criteria. ([#1568](https://github.com/stashapp/stash/pull/1568)) diff --git a/ui/v2.5/src/components/Settings/SettingsConfigurationPanel.tsx b/ui/v2.5/src/components/Settings/SettingsConfigurationPanel.tsx index c20383c05..bd8f4406f 100644 --- a/ui/v2.5/src/components/Settings/SettingsConfigurationPanel.tsx +++ b/ui/v2.5/src/components/Settings/SettingsConfigurationPanel.tsx @@ -126,6 +126,10 @@ export const SettingsConfigurationPanel: React.FC = () => { const [excludes, setExcludes] = useState([]); const [imageExcludes, setImageExcludes] = useState([]); + const [ + customPerformerImageLocation, + setCustomPerformerImageLocation, + ] = useState(); const [stashBoxes, setStashBoxes] = useState([]); const { data, error, loading } = useConfiguration(); @@ -166,6 +170,7 @@ export const SettingsConfigurationPanel: React.FC = () => { galleryExtensions: commaDelimitedToList(galleryExtensions), excludes, imageExcludes, + customPerformerImageLocation, stashBoxes: stashBoxes.map( (b) => ({ @@ -213,6 +218,9 @@ export const SettingsConfigurationPanel: React.FC = () => { ); setExcludes(conf.general.excludes); setImageExcludes(conf.general.imageExcludes); + setCustomPerformerImageLocation( + conf.general.customPerformerImageLocation ?? "" + ); setStashBoxes( conf.general.stashBoxes.map((box, i) => ({ name: box?.name ?? undefined, @@ -817,6 +825,28 @@ export const SettingsConfigurationPanel: React.FC = () => {
    + +

    {intl.formatMessage({ id: "performers" })}

    + +
    + {intl.formatMessage({ + id: "config.ui.performers.options.image_location.heading", + })} +
    + ) => { + setCustomPerformerImageLocation(e.currentTarget.value); + }} + /> + + {intl.formatMessage({ + id: "config.ui.performers.options.image_location.description", + })} + +
    +

    diff --git a/ui/v2.5/src/components/Settings/SettingsInterfacePanel/SettingsInterfacePanel.tsx b/ui/v2.5/src/components/Settings/SettingsInterfacePanel/SettingsInterfacePanel.tsx index ec7f5f313..a2f6e14f1 100644 --- a/ui/v2.5/src/components/Settings/SettingsInterfacePanel/SettingsInterfacePanel.tsx +++ b/ui/v2.5/src/components/Settings/SettingsInterfacePanel/SettingsInterfacePanel.tsx @@ -136,6 +136,7 @@ export const SettingsInterfacePanel: React.FC = () => { {intl.formatMessage({ id: "config.ui.menu_items.description" })} +
    {intl.formatMessage({ id: "config.ui.scene_wall.heading" })}
    TAGS - -push: - git push origin master - git push github master - diff --git a/vendor/github.com/BurntSushi/toml/README.md b/vendor/github.com/BurntSushi/toml/README.md deleted file mode 100644 index 7c1b37ecc..000000000 --- a/vendor/github.com/BurntSushi/toml/README.md +++ /dev/null @@ -1,218 +0,0 @@ -## TOML parser and encoder for Go with reflection - -TOML stands for Tom's Obvious, Minimal Language. This Go package provides a -reflection interface similar to Go's standard library `json` and `xml` -packages. This package also supports the `encoding.TextUnmarshaler` and -`encoding.TextMarshaler` interfaces so that you can define custom data -representations. (There is an example of this below.) - -Spec: https://github.com/toml-lang/toml - -Compatible with TOML version -[v0.4.0](https://github.com/toml-lang/toml/blob/master/versions/en/toml-v0.4.0.md) - -Documentation: https://godoc.org/github.com/BurntSushi/toml - -Installation: - -```bash -go get github.com/BurntSushi/toml -``` - -Try the toml validator: - -```bash -go get github.com/BurntSushi/toml/cmd/tomlv -tomlv some-toml-file.toml -``` - -[![Build Status](https://travis-ci.org/BurntSushi/toml.svg?branch=master)](https://travis-ci.org/BurntSushi/toml) [![GoDoc](https://godoc.org/github.com/BurntSushi/toml?status.svg)](https://godoc.org/github.com/BurntSushi/toml) - -### Testing - -This package passes all tests in -[toml-test](https://github.com/BurntSushi/toml-test) for both the decoder -and the encoder. - -### Examples - -This package works similarly to how the Go standard library handles `XML` -and `JSON`. Namely, data is loaded into Go values via reflection. - -For the simplest example, consider some TOML file as just a list of keys -and values: - -```toml -Age = 25 -Cats = [ "Cauchy", "Plato" ] -Pi = 3.14 -Perfection = [ 6, 28, 496, 8128 ] -DOB = 1987-07-05T05:45:00Z -``` - -Which could be defined in Go as: - -```go -type Config struct { - Age int - Cats []string - Pi float64 - Perfection []int - DOB time.Time // requires `import time` -} -``` - -And then decoded with: - -```go -var conf Config -if _, err := toml.Decode(tomlData, &conf); err != nil { - // handle error -} -``` - -You can also use struct tags if your struct field name doesn't map to a TOML -key value directly: - -```toml -some_key_NAME = "wat" -``` - -```go -type TOML struct { - ObscureKey string `toml:"some_key_NAME"` -} -``` - -### Using the `encoding.TextUnmarshaler` interface - -Here's an example that automatically parses duration strings into -`time.Duration` values: - -```toml -[[song]] -name = "Thunder Road" -duration = "4m49s" - -[[song]] -name = "Stairway to Heaven" -duration = "8m03s" -``` - -Which can be decoded with: - -```go -type song struct { - Name string - Duration duration -} -type songs struct { - Song []song -} -var favorites songs -if _, err := toml.Decode(blob, &favorites); err != nil { - log.Fatal(err) -} - -for _, s := range favorites.Song { - fmt.Printf("%s (%s)\n", s.Name, s.Duration) -} -``` - -And you'll also need a `duration` type that satisfies the -`encoding.TextUnmarshaler` interface: - -```go -type duration struct { - time.Duration -} - -func (d *duration) UnmarshalText(text []byte) error { - var err error - d.Duration, err = time.ParseDuration(string(text)) - return err -} -``` - -### More complex usage - -Here's an example of how to load the example from the official spec page: - -```toml -# This is a TOML document. Boom. - -title = "TOML Example" - -[owner] -name = "Tom Preston-Werner" -organization = "GitHub" -bio = "GitHub Cofounder & CEO\nLikes tater tots and beer." -dob = 1979-05-27T07:32:00Z # First class dates? Why not? - -[database] -server = "192.168.1.1" -ports = [ 8001, 8001, 8002 ] -connection_max = 5000 -enabled = true - -[servers] - - # You can indent as you please. Tabs or spaces. TOML don't care. - [servers.alpha] - ip = "10.0.0.1" - dc = "eqdc10" - - [servers.beta] - ip = "10.0.0.2" - dc = "eqdc10" - -[clients] -data = [ ["gamma", "delta"], [1, 2] ] # just an update to make sure parsers support it - -# Line breaks are OK when inside arrays -hosts = [ - "alpha", - "omega" -] -``` - -And the corresponding Go types are: - -```go -type tomlConfig struct { - Title string - Owner ownerInfo - DB database `toml:"database"` - Servers map[string]server - Clients clients -} - -type ownerInfo struct { - Name string - Org string `toml:"organization"` - Bio string - DOB time.Time -} - -type database struct { - Server string - Ports []int - ConnMax int `toml:"connection_max"` - Enabled bool -} - -type server struct { - IP string - DC string -} - -type clients struct { - Data [][]interface{} - Hosts []string -} -``` - -Note that a case insensitive match will be tried if an exact match can't be -found. - -A working example of the above can be found in `_examples/example.{go,toml}`. diff --git a/vendor/github.com/BurntSushi/toml/decode.go b/vendor/github.com/BurntSushi/toml/decode.go deleted file mode 100644 index b0fd51d5b..000000000 --- a/vendor/github.com/BurntSushi/toml/decode.go +++ /dev/null @@ -1,509 +0,0 @@ -package toml - -import ( - "fmt" - "io" - "io/ioutil" - "math" - "reflect" - "strings" - "time" -) - -func e(format string, args ...interface{}) error { - return fmt.Errorf("toml: "+format, args...) -} - -// Unmarshaler is the interface implemented by objects that can unmarshal a -// TOML description of themselves. -type Unmarshaler interface { - UnmarshalTOML(interface{}) error -} - -// Unmarshal decodes the contents of `p` in TOML format into a pointer `v`. -func Unmarshal(p []byte, v interface{}) error { - _, err := Decode(string(p), v) - return err -} - -// Primitive is a TOML value that hasn't been decoded into a Go value. -// When using the various `Decode*` functions, the type `Primitive` may -// be given to any value, and its decoding will be delayed. -// -// A `Primitive` value can be decoded using the `PrimitiveDecode` function. -// -// The underlying representation of a `Primitive` value is subject to change. -// Do not rely on it. -// -// N.B. Primitive values are still parsed, so using them will only avoid -// the overhead of reflection. They can be useful when you don't know the -// exact type of TOML data until run time. -type Primitive struct { - undecoded interface{} - context Key -} - -// DEPRECATED! -// -// Use MetaData.PrimitiveDecode instead. -func PrimitiveDecode(primValue Primitive, v interface{}) error { - md := MetaData{decoded: make(map[string]bool)} - return md.unify(primValue.undecoded, rvalue(v)) -} - -// PrimitiveDecode is just like the other `Decode*` functions, except it -// decodes a TOML value that has already been parsed. Valid primitive values -// can *only* be obtained from values filled by the decoder functions, -// including this method. (i.e., `v` may contain more `Primitive` -// values.) -// -// Meta data for primitive values is included in the meta data returned by -// the `Decode*` functions with one exception: keys returned by the Undecoded -// method will only reflect keys that were decoded. Namely, any keys hidden -// behind a Primitive will be considered undecoded. Executing this method will -// update the undecoded keys in the meta data. (See the example.) -func (md *MetaData) PrimitiveDecode(primValue Primitive, v interface{}) error { - md.context = primValue.context - defer func() { md.context = nil }() - return md.unify(primValue.undecoded, rvalue(v)) -} - -// Decode will decode the contents of `data` in TOML format into a pointer -// `v`. -// -// TOML hashes correspond to Go structs or maps. (Dealer's choice. They can be -// used interchangeably.) -// -// TOML arrays of tables correspond to either a slice of structs or a slice -// of maps. -// -// TOML datetimes correspond to Go `time.Time` values. -// -// All other TOML types (float, string, int, bool and array) correspond -// to the obvious Go types. -// -// An exception to the above rules is if a type implements the -// encoding.TextUnmarshaler interface. In this case, any primitive TOML value -// (floats, strings, integers, booleans and datetimes) will be converted to -// a byte string and given to the value's UnmarshalText method. See the -// Unmarshaler example for a demonstration with time duration strings. -// -// Key mapping -// -// TOML keys can map to either keys in a Go map or field names in a Go -// struct. The special `toml` struct tag may be used to map TOML keys to -// struct fields that don't match the key name exactly. (See the example.) -// A case insensitive match to struct names will be tried if an exact match -// can't be found. -// -// The mapping between TOML values and Go values is loose. That is, there -// may exist TOML values that cannot be placed into your representation, and -// there may be parts of your representation that do not correspond to -// TOML values. This loose mapping can be made stricter by using the IsDefined -// and/or Undecoded methods on the MetaData returned. -// -// This decoder will not handle cyclic types. If a cyclic type is passed, -// `Decode` will not terminate. -func Decode(data string, v interface{}) (MetaData, error) { - rv := reflect.ValueOf(v) - if rv.Kind() != reflect.Ptr { - return MetaData{}, e("Decode of non-pointer %s", reflect.TypeOf(v)) - } - if rv.IsNil() { - return MetaData{}, e("Decode of nil %s", reflect.TypeOf(v)) - } - p, err := parse(data) - if err != nil { - return MetaData{}, err - } - md := MetaData{ - p.mapping, p.types, p.ordered, - make(map[string]bool, len(p.ordered)), nil, - } - return md, md.unify(p.mapping, indirect(rv)) -} - -// DecodeFile is just like Decode, except it will automatically read the -// contents of the file at `fpath` and decode it for you. -func DecodeFile(fpath string, v interface{}) (MetaData, error) { - bs, err := ioutil.ReadFile(fpath) - if err != nil { - return MetaData{}, err - } - return Decode(string(bs), v) -} - -// DecodeReader is just like Decode, except it will consume all bytes -// from the reader and decode it for you. -func DecodeReader(r io.Reader, v interface{}) (MetaData, error) { - bs, err := ioutil.ReadAll(r) - if err != nil { - return MetaData{}, err - } - return Decode(string(bs), v) -} - -// unify performs a sort of type unification based on the structure of `rv`, -// which is the client representation. -// -// Any type mismatch produces an error. Finding a type that we don't know -// how to handle produces an unsupported type error. -func (md *MetaData) unify(data interface{}, rv reflect.Value) error { - - // Special case. Look for a `Primitive` value. - if rv.Type() == reflect.TypeOf((*Primitive)(nil)).Elem() { - // Save the undecoded data and the key context into the primitive - // value. - context := make(Key, len(md.context)) - copy(context, md.context) - rv.Set(reflect.ValueOf(Primitive{ - undecoded: data, - context: context, - })) - return nil - } - - // Special case. Unmarshaler Interface support. - if rv.CanAddr() { - if v, ok := rv.Addr().Interface().(Unmarshaler); ok { - return v.UnmarshalTOML(data) - } - } - - // Special case. Handle time.Time values specifically. - // TODO: Remove this code when we decide to drop support for Go 1.1. - // This isn't necessary in Go 1.2 because time.Time satisfies the encoding - // interfaces. - if rv.Type().AssignableTo(rvalue(time.Time{}).Type()) { - return md.unifyDatetime(data, rv) - } - - // Special case. Look for a value satisfying the TextUnmarshaler interface. - if v, ok := rv.Interface().(TextUnmarshaler); ok { - return md.unifyText(data, v) - } - // BUG(burntsushi) - // The behavior here is incorrect whenever a Go type satisfies the - // encoding.TextUnmarshaler interface but also corresponds to a TOML - // hash or array. In particular, the unmarshaler should only be applied - // to primitive TOML values. But at this point, it will be applied to - // all kinds of values and produce an incorrect error whenever those values - // are hashes or arrays (including arrays of tables). - - k := rv.Kind() - - // laziness - if k >= reflect.Int && k <= reflect.Uint64 { - return md.unifyInt(data, rv) - } - switch k { - case reflect.Ptr: - elem := reflect.New(rv.Type().Elem()) - err := md.unify(data, reflect.Indirect(elem)) - if err != nil { - return err - } - rv.Set(elem) - return nil - case reflect.Struct: - return md.unifyStruct(data, rv) - case reflect.Map: - return md.unifyMap(data, rv) - case reflect.Array: - return md.unifyArray(data, rv) - case reflect.Slice: - return md.unifySlice(data, rv) - case reflect.String: - return md.unifyString(data, rv) - case reflect.Bool: - return md.unifyBool(data, rv) - case reflect.Interface: - // we only support empty interfaces. - if rv.NumMethod() > 0 { - return e("unsupported type %s", rv.Type()) - } - return md.unifyAnything(data, rv) - case reflect.Float32: - fallthrough - case reflect.Float64: - return md.unifyFloat64(data, rv) - } - return e("unsupported type %s", rv.Kind()) -} - -func (md *MetaData) unifyStruct(mapping interface{}, rv reflect.Value) error { - tmap, ok := mapping.(map[string]interface{}) - if !ok { - if mapping == nil { - return nil - } - return e("type mismatch for %s: expected table but found %T", - rv.Type().String(), mapping) - } - - for key, datum := range tmap { - var f *field - fields := cachedTypeFields(rv.Type()) - for i := range fields { - ff := &fields[i] - if ff.name == key { - f = ff - break - } - if f == nil && strings.EqualFold(ff.name, key) { - f = ff - } - } - if f != nil { - subv := rv - for _, i := range f.index { - subv = indirect(subv.Field(i)) - } - if isUnifiable(subv) { - md.decoded[md.context.add(key).String()] = true - md.context = append(md.context, key) - if err := md.unify(datum, subv); err != nil { - return err - } - md.context = md.context[0 : len(md.context)-1] - } else if f.name != "" { - // Bad user! No soup for you! - return e("cannot write unexported field %s.%s", - rv.Type().String(), f.name) - } - } - } - return nil -} - -func (md *MetaData) unifyMap(mapping interface{}, rv reflect.Value) error { - tmap, ok := mapping.(map[string]interface{}) - if !ok { - if tmap == nil { - return nil - } - return badtype("map", mapping) - } - if rv.IsNil() { - rv.Set(reflect.MakeMap(rv.Type())) - } - for k, v := range tmap { - md.decoded[md.context.add(k).String()] = true - md.context = append(md.context, k) - - rvkey := indirect(reflect.New(rv.Type().Key())) - rvval := reflect.Indirect(reflect.New(rv.Type().Elem())) - if err := md.unify(v, rvval); err != nil { - return err - } - md.context = md.context[0 : len(md.context)-1] - - rvkey.SetString(k) - rv.SetMapIndex(rvkey, rvval) - } - return nil -} - -func (md *MetaData) unifyArray(data interface{}, rv reflect.Value) error { - datav := reflect.ValueOf(data) - if datav.Kind() != reflect.Slice { - if !datav.IsValid() { - return nil - } - return badtype("slice", data) - } - sliceLen := datav.Len() - if sliceLen != rv.Len() { - return e("expected array length %d; got TOML array of length %d", - rv.Len(), sliceLen) - } - return md.unifySliceArray(datav, rv) -} - -func (md *MetaData) unifySlice(data interface{}, rv reflect.Value) error { - datav := reflect.ValueOf(data) - if datav.Kind() != reflect.Slice { - if !datav.IsValid() { - return nil - } - return badtype("slice", data) - } - n := datav.Len() - if rv.IsNil() || rv.Cap() < n { - rv.Set(reflect.MakeSlice(rv.Type(), n, n)) - } - rv.SetLen(n) - return md.unifySliceArray(datav, rv) -} - -func (md *MetaData) unifySliceArray(data, rv reflect.Value) error { - sliceLen := data.Len() - for i := 0; i < sliceLen; i++ { - v := data.Index(i).Interface() - sliceval := indirect(rv.Index(i)) - if err := md.unify(v, sliceval); err != nil { - return err - } - } - return nil -} - -func (md *MetaData) unifyDatetime(data interface{}, rv reflect.Value) error { - if _, ok := data.(time.Time); ok { - rv.Set(reflect.ValueOf(data)) - return nil - } - return badtype("time.Time", data) -} - -func (md *MetaData) unifyString(data interface{}, rv reflect.Value) error { - if s, ok := data.(string); ok { - rv.SetString(s) - return nil - } - return badtype("string", data) -} - -func (md *MetaData) unifyFloat64(data interface{}, rv reflect.Value) error { - if num, ok := data.(float64); ok { - switch rv.Kind() { - case reflect.Float32: - fallthrough - case reflect.Float64: - rv.SetFloat(num) - default: - panic("bug") - } - return nil - } - return badtype("float", data) -} - -func (md *MetaData) unifyInt(data interface{}, rv reflect.Value) error { - if num, ok := data.(int64); ok { - if rv.Kind() >= reflect.Int && rv.Kind() <= reflect.Int64 { - switch rv.Kind() { - case reflect.Int, reflect.Int64: - // No bounds checking necessary. - case reflect.Int8: - if num < math.MinInt8 || num > math.MaxInt8 { - return e("value %d is out of range for int8", num) - } - case reflect.Int16: - if num < math.MinInt16 || num > math.MaxInt16 { - return e("value %d is out of range for int16", num) - } - case reflect.Int32: - if num < math.MinInt32 || num > math.MaxInt32 { - return e("value %d is out of range for int32", num) - } - } - rv.SetInt(num) - } else if rv.Kind() >= reflect.Uint && rv.Kind() <= reflect.Uint64 { - unum := uint64(num) - switch rv.Kind() { - case reflect.Uint, reflect.Uint64: - // No bounds checking necessary. - case reflect.Uint8: - if num < 0 || unum > math.MaxUint8 { - return e("value %d is out of range for uint8", num) - } - case reflect.Uint16: - if num < 0 || unum > math.MaxUint16 { - return e("value %d is out of range for uint16", num) - } - case reflect.Uint32: - if num < 0 || unum > math.MaxUint32 { - return e("value %d is out of range for uint32", num) - } - } - rv.SetUint(unum) - } else { - panic("unreachable") - } - return nil - } - return badtype("integer", data) -} - -func (md *MetaData) unifyBool(data interface{}, rv reflect.Value) error { - if b, ok := data.(bool); ok { - rv.SetBool(b) - return nil - } - return badtype("boolean", data) -} - -func (md *MetaData) unifyAnything(data interface{}, rv reflect.Value) error { - rv.Set(reflect.ValueOf(data)) - return nil -} - -func (md *MetaData) unifyText(data interface{}, v TextUnmarshaler) error { - var s string - switch sdata := data.(type) { - case TextMarshaler: - text, err := sdata.MarshalText() - if err != nil { - return err - } - s = string(text) - case fmt.Stringer: - s = sdata.String() - case string: - s = sdata - case bool: - s = fmt.Sprintf("%v", sdata) - case int64: - s = fmt.Sprintf("%d", sdata) - case float64: - s = fmt.Sprintf("%f", sdata) - default: - return badtype("primitive (string-like)", data) - } - if err := v.UnmarshalText([]byte(s)); err != nil { - return err - } - return nil -} - -// rvalue returns a reflect.Value of `v`. All pointers are resolved. -func rvalue(v interface{}) reflect.Value { - return indirect(reflect.ValueOf(v)) -} - -// indirect returns the value pointed to by a pointer. -// Pointers are followed until the value is not a pointer. -// New values are allocated for each nil pointer. -// -// An exception to this rule is if the value satisfies an interface of -// interest to us (like encoding.TextUnmarshaler). -func indirect(v reflect.Value) reflect.Value { - if v.Kind() != reflect.Ptr { - if v.CanSet() { - pv := v.Addr() - if _, ok := pv.Interface().(TextUnmarshaler); ok { - return pv - } - } - return v - } - if v.IsNil() { - v.Set(reflect.New(v.Type().Elem())) - } - return indirect(reflect.Indirect(v)) -} - -func isUnifiable(rv reflect.Value) bool { - if rv.CanSet() { - return true - } - if _, ok := rv.Interface().(TextUnmarshaler); ok { - return true - } - return false -} - -func badtype(expected string, data interface{}) error { - return e("cannot load TOML value of type %T into a Go %s", data, expected) -} diff --git a/vendor/github.com/BurntSushi/toml/decode_meta.go b/vendor/github.com/BurntSushi/toml/decode_meta.go deleted file mode 100644 index b9914a679..000000000 --- a/vendor/github.com/BurntSushi/toml/decode_meta.go +++ /dev/null @@ -1,121 +0,0 @@ -package toml - -import "strings" - -// MetaData allows access to meta information about TOML data that may not -// be inferrable via reflection. In particular, whether a key has been defined -// and the TOML type of a key. -type MetaData struct { - mapping map[string]interface{} - types map[string]tomlType - keys []Key - decoded map[string]bool - context Key // Used only during decoding. -} - -// IsDefined returns true if the key given exists in the TOML data. The key -// should be specified hierarchially. e.g., -// -// // access the TOML key 'a.b.c' -// IsDefined("a", "b", "c") -// -// IsDefined will return false if an empty key given. Keys are case sensitive. -func (md *MetaData) IsDefined(key ...string) bool { - if len(key) == 0 { - return false - } - - var hash map[string]interface{} - var ok bool - var hashOrVal interface{} = md.mapping - for _, k := range key { - if hash, ok = hashOrVal.(map[string]interface{}); !ok { - return false - } - if hashOrVal, ok = hash[k]; !ok { - return false - } - } - return true -} - -// Type returns a string representation of the type of the key specified. -// -// Type will return the empty string if given an empty key or a key that -// does not exist. Keys are case sensitive. -func (md *MetaData) Type(key ...string) string { - fullkey := strings.Join(key, ".") - if typ, ok := md.types[fullkey]; ok { - return typ.typeString() - } - return "" -} - -// Key is the type of any TOML key, including key groups. Use (MetaData).Keys -// to get values of this type. -type Key []string - -func (k Key) String() string { - return strings.Join(k, ".") -} - -func (k Key) maybeQuotedAll() string { - var ss []string - for i := range k { - ss = append(ss, k.maybeQuoted(i)) - } - return strings.Join(ss, ".") -} - -func (k Key) maybeQuoted(i int) string { - quote := false - for _, c := range k[i] { - if !isBareKeyChar(c) { - quote = true - break - } - } - if quote { - return "\"" + strings.Replace(k[i], "\"", "\\\"", -1) + "\"" - } - return k[i] -} - -func (k Key) add(piece string) Key { - newKey := make(Key, len(k)+1) - copy(newKey, k) - newKey[len(k)] = piece - return newKey -} - -// Keys returns a slice of every key in the TOML data, including key groups. -// Each key is itself a slice, where the first element is the top of the -// hierarchy and the last is the most specific. -// -// The list will have the same order as the keys appeared in the TOML data. -// -// All keys returned are non-empty. -func (md *MetaData) Keys() []Key { - return md.keys -} - -// Undecoded returns all keys that have not been decoded in the order in which -// they appear in the original TOML document. -// -// This includes keys that haven't been decoded because of a Primitive value. -// Once the Primitive value is decoded, the keys will be considered decoded. -// -// Also note that decoding into an empty interface will result in no decoding, -// and so no keys will be considered decoded. -// -// In this sense, the Undecoded keys correspond to keys in the TOML document -// that do not have a concrete type in your representation. -func (md *MetaData) Undecoded() []Key { - undecoded := make([]Key, 0, len(md.keys)) - for _, key := range md.keys { - if !md.decoded[key.String()] { - undecoded = append(undecoded, key) - } - } - return undecoded -} diff --git a/vendor/github.com/BurntSushi/toml/doc.go b/vendor/github.com/BurntSushi/toml/doc.go deleted file mode 100644 index b371f396e..000000000 --- a/vendor/github.com/BurntSushi/toml/doc.go +++ /dev/null @@ -1,27 +0,0 @@ -/* -Package toml provides facilities for decoding and encoding TOML configuration -files via reflection. There is also support for delaying decoding with -the Primitive type, and querying the set of keys in a TOML document with the -MetaData type. - -The specification implemented: https://github.com/toml-lang/toml - -The sub-command github.com/BurntSushi/toml/cmd/tomlv can be used to verify -whether a file is a valid TOML document. It can also be used to print the -type of each key in a TOML document. - -Testing - -There are two important types of tests used for this package. The first is -contained inside '*_test.go' files and uses the standard Go unit testing -framework. These tests are primarily devoted to holistically testing the -decoder and encoder. - -The second type of testing is used to verify the implementation's adherence -to the TOML specification. These tests have been factored into their own -project: https://github.com/BurntSushi/toml-test - -The reason the tests are in a separate project is so that they can be used by -any implementation of TOML. Namely, it is language agnostic. -*/ -package toml diff --git a/vendor/github.com/BurntSushi/toml/encode.go b/vendor/github.com/BurntSushi/toml/encode.go deleted file mode 100644 index d905c21a2..000000000 --- a/vendor/github.com/BurntSushi/toml/encode.go +++ /dev/null @@ -1,568 +0,0 @@ -package toml - -import ( - "bufio" - "errors" - "fmt" - "io" - "reflect" - "sort" - "strconv" - "strings" - "time" -) - -type tomlEncodeError struct{ error } - -var ( - errArrayMixedElementTypes = errors.New( - "toml: cannot encode array with mixed element types") - errArrayNilElement = errors.New( - "toml: cannot encode array with nil element") - errNonString = errors.New( - "toml: cannot encode a map with non-string key type") - errAnonNonStruct = errors.New( - "toml: cannot encode an anonymous field that is not a struct") - errArrayNoTable = errors.New( - "toml: TOML array element cannot contain a table") - errNoKey = errors.New( - "toml: top-level values must be Go maps or structs") - errAnything = errors.New("") // used in testing -) - -var quotedReplacer = strings.NewReplacer( - "\t", "\\t", - "\n", "\\n", - "\r", "\\r", - "\"", "\\\"", - "\\", "\\\\", -) - -// Encoder controls the encoding of Go values to a TOML document to some -// io.Writer. -// -// The indentation level can be controlled with the Indent field. -type Encoder struct { - // A single indentation level. By default it is two spaces. - Indent string - - // hasWritten is whether we have written any output to w yet. - hasWritten bool - w *bufio.Writer -} - -// NewEncoder returns a TOML encoder that encodes Go values to the io.Writer -// given. By default, a single indentation level is 2 spaces. -func NewEncoder(w io.Writer) *Encoder { - return &Encoder{ - w: bufio.NewWriter(w), - Indent: " ", - } -} - -// Encode writes a TOML representation of the Go value to the underlying -// io.Writer. If the value given cannot be encoded to a valid TOML document, -// then an error is returned. -// -// The mapping between Go values and TOML values should be precisely the same -// as for the Decode* functions. Similarly, the TextMarshaler interface is -// supported by encoding the resulting bytes as strings. (If you want to write -// arbitrary binary data then you will need to use something like base64 since -// TOML does not have any binary types.) -// -// When encoding TOML hashes (i.e., Go maps or structs), keys without any -// sub-hashes are encoded first. -// -// If a Go map is encoded, then its keys are sorted alphabetically for -// deterministic output. More control over this behavior may be provided if -// there is demand for it. -// -// Encoding Go values without a corresponding TOML representation---like map -// types with non-string keys---will cause an error to be returned. Similarly -// for mixed arrays/slices, arrays/slices with nil elements, embedded -// non-struct types and nested slices containing maps or structs. -// (e.g., [][]map[string]string is not allowed but []map[string]string is OK -// and so is []map[string][]string.) -func (enc *Encoder) Encode(v interface{}) error { - rv := eindirect(reflect.ValueOf(v)) - if err := enc.safeEncode(Key([]string{}), rv); err != nil { - return err - } - return enc.w.Flush() -} - -func (enc *Encoder) safeEncode(key Key, rv reflect.Value) (err error) { - defer func() { - if r := recover(); r != nil { - if terr, ok := r.(tomlEncodeError); ok { - err = terr.error - return - } - panic(r) - } - }() - enc.encode(key, rv) - return nil -} - -func (enc *Encoder) encode(key Key, rv reflect.Value) { - // Special case. Time needs to be in ISO8601 format. - // Special case. If we can marshal the type to text, then we used that. - // Basically, this prevents the encoder for handling these types as - // generic structs (or whatever the underlying type of a TextMarshaler is). - switch rv.Interface().(type) { - case time.Time, TextMarshaler: - enc.keyEqElement(key, rv) - return - } - - k := rv.Kind() - switch k { - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, - reflect.Int64, - reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, - reflect.Uint64, - reflect.Float32, reflect.Float64, reflect.String, reflect.Bool: - enc.keyEqElement(key, rv) - case reflect.Array, reflect.Slice: - if typeEqual(tomlArrayHash, tomlTypeOfGo(rv)) { - enc.eArrayOfTables(key, rv) - } else { - enc.keyEqElement(key, rv) - } - case reflect.Interface: - if rv.IsNil() { - return - } - enc.encode(key, rv.Elem()) - case reflect.Map: - if rv.IsNil() { - return - } - enc.eTable(key, rv) - case reflect.Ptr: - if rv.IsNil() { - return - } - enc.encode(key, rv.Elem()) - case reflect.Struct: - enc.eTable(key, rv) - default: - panic(e("unsupported type for key '%s': %s", key, k)) - } -} - -// eElement encodes any value that can be an array element (primitives and -// arrays). -func (enc *Encoder) eElement(rv reflect.Value) { - switch v := rv.Interface().(type) { - case time.Time: - // Special case time.Time as a primitive. Has to come before - // TextMarshaler below because time.Time implements - // encoding.TextMarshaler, but we need to always use UTC. - enc.wf(v.UTC().Format("2006-01-02T15:04:05Z")) - return - case TextMarshaler: - // Special case. Use text marshaler if it's available for this value. - if s, err := v.MarshalText(); err != nil { - encPanic(err) - } else { - enc.writeQuoted(string(s)) - } - return - } - switch rv.Kind() { - case reflect.Bool: - enc.wf(strconv.FormatBool(rv.Bool())) - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, - reflect.Int64: - enc.wf(strconv.FormatInt(rv.Int(), 10)) - case reflect.Uint, reflect.Uint8, reflect.Uint16, - reflect.Uint32, reflect.Uint64: - enc.wf(strconv.FormatUint(rv.Uint(), 10)) - case reflect.Float32: - enc.wf(floatAddDecimal(strconv.FormatFloat(rv.Float(), 'f', -1, 32))) - case reflect.Float64: - enc.wf(floatAddDecimal(strconv.FormatFloat(rv.Float(), 'f', -1, 64))) - case reflect.Array, reflect.Slice: - enc.eArrayOrSliceElement(rv) - case reflect.Interface: - enc.eElement(rv.Elem()) - case reflect.String: - enc.writeQuoted(rv.String()) - default: - panic(e("unexpected primitive type: %s", rv.Kind())) - } -} - -// By the TOML spec, all floats must have a decimal with at least one -// number on either side. -func floatAddDecimal(fstr string) string { - if !strings.Contains(fstr, ".") { - return fstr + ".0" - } - return fstr -} - -func (enc *Encoder) writeQuoted(s string) { - enc.wf("\"%s\"", quotedReplacer.Replace(s)) -} - -func (enc *Encoder) eArrayOrSliceElement(rv reflect.Value) { - length := rv.Len() - enc.wf("[") - for i := 0; i < length; i++ { - elem := rv.Index(i) - enc.eElement(elem) - if i != length-1 { - enc.wf(", ") - } - } - enc.wf("]") -} - -func (enc *Encoder) eArrayOfTables(key Key, rv reflect.Value) { - if len(key) == 0 { - encPanic(errNoKey) - } - for i := 0; i < rv.Len(); i++ { - trv := rv.Index(i) - if isNil(trv) { - continue - } - panicIfInvalidKey(key) - enc.newline() - enc.wf("%s[[%s]]", enc.indentStr(key), key.maybeQuotedAll()) - enc.newline() - enc.eMapOrStruct(key, trv) - } -} - -func (enc *Encoder) eTable(key Key, rv reflect.Value) { - panicIfInvalidKey(key) - if len(key) == 1 { - // Output an extra newline between top-level tables. - // (The newline isn't written if nothing else has been written though.) - enc.newline() - } - if len(key) > 0 { - enc.wf("%s[%s]", enc.indentStr(key), key.maybeQuotedAll()) - enc.newline() - } - enc.eMapOrStruct(key, rv) -} - -func (enc *Encoder) eMapOrStruct(key Key, rv reflect.Value) { - switch rv := eindirect(rv); rv.Kind() { - case reflect.Map: - enc.eMap(key, rv) - case reflect.Struct: - enc.eStruct(key, rv) - default: - panic("eTable: unhandled reflect.Value Kind: " + rv.Kind().String()) - } -} - -func (enc *Encoder) eMap(key Key, rv reflect.Value) { - rt := rv.Type() - if rt.Key().Kind() != reflect.String { - encPanic(errNonString) - } - - // Sort keys so that we have deterministic output. And write keys directly - // underneath this key first, before writing sub-structs or sub-maps. - var mapKeysDirect, mapKeysSub []string - for _, mapKey := range rv.MapKeys() { - k := mapKey.String() - if typeIsHash(tomlTypeOfGo(rv.MapIndex(mapKey))) { - mapKeysSub = append(mapKeysSub, k) - } else { - mapKeysDirect = append(mapKeysDirect, k) - } - } - - var writeMapKeys = func(mapKeys []string) { - sort.Strings(mapKeys) - for _, mapKey := range mapKeys { - mrv := rv.MapIndex(reflect.ValueOf(mapKey)) - if isNil(mrv) { - // Don't write anything for nil fields. - continue - } - enc.encode(key.add(mapKey), mrv) - } - } - writeMapKeys(mapKeysDirect) - writeMapKeys(mapKeysSub) -} - -func (enc *Encoder) eStruct(key Key, rv reflect.Value) { - // Write keys for fields directly under this key first, because if we write - // a field that creates a new table, then all keys under it will be in that - // table (not the one we're writing here). - rt := rv.Type() - var fieldsDirect, fieldsSub [][]int - var addFields func(rt reflect.Type, rv reflect.Value, start []int) - addFields = func(rt reflect.Type, rv reflect.Value, start []int) { - for i := 0; i < rt.NumField(); i++ { - f := rt.Field(i) - // skip unexported fields - if f.PkgPath != "" && !f.Anonymous { - continue - } - frv := rv.Field(i) - if f.Anonymous { - t := f.Type - switch t.Kind() { - case reflect.Struct: - // Treat anonymous struct fields with - // tag names as though they are not - // anonymous, like encoding/json does. - if getOptions(f.Tag).name == "" { - addFields(t, frv, f.Index) - continue - } - case reflect.Ptr: - if t.Elem().Kind() == reflect.Struct && - getOptions(f.Tag).name == "" { - if !frv.IsNil() { - addFields(t.Elem(), frv.Elem(), f.Index) - } - continue - } - // Fall through to the normal field encoding logic below - // for non-struct anonymous fields. - } - } - - if typeIsHash(tomlTypeOfGo(frv)) { - fieldsSub = append(fieldsSub, append(start, f.Index...)) - } else { - fieldsDirect = append(fieldsDirect, append(start, f.Index...)) - } - } - } - addFields(rt, rv, nil) - - var writeFields = func(fields [][]int) { - for _, fieldIndex := range fields { - sft := rt.FieldByIndex(fieldIndex) - sf := rv.FieldByIndex(fieldIndex) - if isNil(sf) { - // Don't write anything for nil fields. - continue - } - - opts := getOptions(sft.Tag) - if opts.skip { - continue - } - keyName := sft.Name - if opts.name != "" { - keyName = opts.name - } - if opts.omitempty && isEmpty(sf) { - continue - } - if opts.omitzero && isZero(sf) { - continue - } - - enc.encode(key.add(keyName), sf) - } - } - writeFields(fieldsDirect) - writeFields(fieldsSub) -} - -// tomlTypeName returns the TOML type name of the Go value's type. It is -// used to determine whether the types of array elements are mixed (which is -// forbidden). If the Go value is nil, then it is illegal for it to be an array -// element, and valueIsNil is returned as true. - -// Returns the TOML type of a Go value. The type may be `nil`, which means -// no concrete TOML type could be found. -func tomlTypeOfGo(rv reflect.Value) tomlType { - if isNil(rv) || !rv.IsValid() { - return nil - } - switch rv.Kind() { - case reflect.Bool: - return tomlBool - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, - reflect.Int64, - reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, - reflect.Uint64: - return tomlInteger - case reflect.Float32, reflect.Float64: - return tomlFloat - case reflect.Array, reflect.Slice: - if typeEqual(tomlHash, tomlArrayType(rv)) { - return tomlArrayHash - } - return tomlArray - case reflect.Ptr, reflect.Interface: - return tomlTypeOfGo(rv.Elem()) - case reflect.String: - return tomlString - case reflect.Map: - return tomlHash - case reflect.Struct: - switch rv.Interface().(type) { - case time.Time: - return tomlDatetime - case TextMarshaler: - return tomlString - default: - return tomlHash - } - default: - panic("unexpected reflect.Kind: " + rv.Kind().String()) - } -} - -// tomlArrayType returns the element type of a TOML array. The type returned -// may be nil if it cannot be determined (e.g., a nil slice or a zero length -// slize). This function may also panic if it finds a type that cannot be -// expressed in TOML (such as nil elements, heterogeneous arrays or directly -// nested arrays of tables). -func tomlArrayType(rv reflect.Value) tomlType { - if isNil(rv) || !rv.IsValid() || rv.Len() == 0 { - return nil - } - firstType := tomlTypeOfGo(rv.Index(0)) - if firstType == nil { - encPanic(errArrayNilElement) - } - - rvlen := rv.Len() - for i := 1; i < rvlen; i++ { - elem := rv.Index(i) - switch elemType := tomlTypeOfGo(elem); { - case elemType == nil: - encPanic(errArrayNilElement) - case !typeEqual(firstType, elemType): - encPanic(errArrayMixedElementTypes) - } - } - // If we have a nested array, then we must make sure that the nested - // array contains ONLY primitives. - // This checks arbitrarily nested arrays. - if typeEqual(firstType, tomlArray) || typeEqual(firstType, tomlArrayHash) { - nest := tomlArrayType(eindirect(rv.Index(0))) - if typeEqual(nest, tomlHash) || typeEqual(nest, tomlArrayHash) { - encPanic(errArrayNoTable) - } - } - return firstType -} - -type tagOptions struct { - skip bool // "-" - name string - omitempty bool - omitzero bool -} - -func getOptions(tag reflect.StructTag) tagOptions { - t := tag.Get("toml") - if t == "-" { - return tagOptions{skip: true} - } - var opts tagOptions - parts := strings.Split(t, ",") - opts.name = parts[0] - for _, s := range parts[1:] { - switch s { - case "omitempty": - opts.omitempty = true - case "omitzero": - opts.omitzero = true - } - } - return opts -} - -func isZero(rv reflect.Value) bool { - switch rv.Kind() { - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return rv.Int() == 0 - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: - return rv.Uint() == 0 - case reflect.Float32, reflect.Float64: - return rv.Float() == 0.0 - } - return false -} - -func isEmpty(rv reflect.Value) bool { - switch rv.Kind() { - case reflect.Array, reflect.Slice, reflect.Map, reflect.String: - return rv.Len() == 0 - case reflect.Bool: - return !rv.Bool() - } - return false -} - -func (enc *Encoder) newline() { - if enc.hasWritten { - enc.wf("\n") - } -} - -func (enc *Encoder) keyEqElement(key Key, val reflect.Value) { - if len(key) == 0 { - encPanic(errNoKey) - } - panicIfInvalidKey(key) - enc.wf("%s%s = ", enc.indentStr(key), key.maybeQuoted(len(key)-1)) - enc.eElement(val) - enc.newline() -} - -func (enc *Encoder) wf(format string, v ...interface{}) { - if _, err := fmt.Fprintf(enc.w, format, v...); err != nil { - encPanic(err) - } - enc.hasWritten = true -} - -func (enc *Encoder) indentStr(key Key) string { - return strings.Repeat(enc.Indent, len(key)-1) -} - -func encPanic(err error) { - panic(tomlEncodeError{err}) -} - -func eindirect(v reflect.Value) reflect.Value { - switch v.Kind() { - case reflect.Ptr, reflect.Interface: - return eindirect(v.Elem()) - default: - return v - } -} - -func isNil(rv reflect.Value) bool { - switch rv.Kind() { - case reflect.Interface, reflect.Map, reflect.Ptr, reflect.Slice: - return rv.IsNil() - default: - return false - } -} - -func panicIfInvalidKey(key Key) { - for _, k := range key { - if len(k) == 0 { - encPanic(e("Key '%s' is not a valid table name. Key names "+ - "cannot be empty.", key.maybeQuotedAll())) - } - } -} - -func isValidKeyName(s string) bool { - return len(s) != 0 -} diff --git a/vendor/github.com/BurntSushi/toml/encoding_types.go b/vendor/github.com/BurntSushi/toml/encoding_types.go deleted file mode 100644 index d36e1dd60..000000000 --- a/vendor/github.com/BurntSushi/toml/encoding_types.go +++ /dev/null @@ -1,19 +0,0 @@ -// +build go1.2 - -package toml - -// In order to support Go 1.1, we define our own TextMarshaler and -// TextUnmarshaler types. For Go 1.2+, we just alias them with the -// standard library interfaces. - -import ( - "encoding" -) - -// TextMarshaler is a synonym for encoding.TextMarshaler. It is defined here -// so that Go 1.1 can be supported. -type TextMarshaler encoding.TextMarshaler - -// TextUnmarshaler is a synonym for encoding.TextUnmarshaler. It is defined -// here so that Go 1.1 can be supported. -type TextUnmarshaler encoding.TextUnmarshaler diff --git a/vendor/github.com/BurntSushi/toml/encoding_types_1.1.go b/vendor/github.com/BurntSushi/toml/encoding_types_1.1.go deleted file mode 100644 index e8d503d04..000000000 --- a/vendor/github.com/BurntSushi/toml/encoding_types_1.1.go +++ /dev/null @@ -1,18 +0,0 @@ -// +build !go1.2 - -package toml - -// These interfaces were introduced in Go 1.2, so we add them manually when -// compiling for Go 1.1. - -// TextMarshaler is a synonym for encoding.TextMarshaler. It is defined here -// so that Go 1.1 can be supported. -type TextMarshaler interface { - MarshalText() (text []byte, err error) -} - -// TextUnmarshaler is a synonym for encoding.TextUnmarshaler. It is defined -// here so that Go 1.1 can be supported. -type TextUnmarshaler interface { - UnmarshalText(text []byte) error -} diff --git a/vendor/github.com/BurntSushi/toml/lex.go b/vendor/github.com/BurntSushi/toml/lex.go deleted file mode 100644 index e0a742a88..000000000 --- a/vendor/github.com/BurntSushi/toml/lex.go +++ /dev/null @@ -1,953 +0,0 @@ -package toml - -import ( - "fmt" - "strings" - "unicode" - "unicode/utf8" -) - -type itemType int - -const ( - itemError itemType = iota - itemNIL // used in the parser to indicate no type - itemEOF - itemText - itemString - itemRawString - itemMultilineString - itemRawMultilineString - itemBool - itemInteger - itemFloat - itemDatetime - itemArray // the start of an array - itemArrayEnd - itemTableStart - itemTableEnd - itemArrayTableStart - itemArrayTableEnd - itemKeyStart - itemCommentStart - itemInlineTableStart - itemInlineTableEnd -) - -const ( - eof = 0 - comma = ',' - tableStart = '[' - tableEnd = ']' - arrayTableStart = '[' - arrayTableEnd = ']' - tableSep = '.' - keySep = '=' - arrayStart = '[' - arrayEnd = ']' - commentStart = '#' - stringStart = '"' - stringEnd = '"' - rawStringStart = '\'' - rawStringEnd = '\'' - inlineTableStart = '{' - inlineTableEnd = '}' -) - -type stateFn func(lx *lexer) stateFn - -type lexer struct { - input string - start int - pos int - line int - state stateFn - items chan item - - // Allow for backing up up to three runes. - // This is necessary because TOML contains 3-rune tokens (""" and '''). - prevWidths [3]int - nprev int // how many of prevWidths are in use - // If we emit an eof, we can still back up, but it is not OK to call - // next again. - atEOF bool - - // A stack of state functions used to maintain context. - // The idea is to reuse parts of the state machine in various places. - // For example, values can appear at the top level or within arbitrarily - // nested arrays. The last state on the stack is used after a value has - // been lexed. Similarly for comments. - stack []stateFn -} - -type item struct { - typ itemType - val string - line int -} - -func (lx *lexer) nextItem() item { - for { - select { - case item := <-lx.items: - return item - default: - lx.state = lx.state(lx) - } - } -} - -func lex(input string) *lexer { - lx := &lexer{ - input: input, - state: lexTop, - line: 1, - items: make(chan item, 10), - stack: make([]stateFn, 0, 10), - } - return lx -} - -func (lx *lexer) push(state stateFn) { - lx.stack = append(lx.stack, state) -} - -func (lx *lexer) pop() stateFn { - if len(lx.stack) == 0 { - return lx.errorf("BUG in lexer: no states to pop") - } - last := lx.stack[len(lx.stack)-1] - lx.stack = lx.stack[0 : len(lx.stack)-1] - return last -} - -func (lx *lexer) current() string { - return lx.input[lx.start:lx.pos] -} - -func (lx *lexer) emit(typ itemType) { - lx.items <- item{typ, lx.current(), lx.line} - lx.start = lx.pos -} - -func (lx *lexer) emitTrim(typ itemType) { - lx.items <- item{typ, strings.TrimSpace(lx.current()), lx.line} - lx.start = lx.pos -} - -func (lx *lexer) next() (r rune) { - if lx.atEOF { - panic("next called after EOF") - } - if lx.pos >= len(lx.input) { - lx.atEOF = true - return eof - } - - if lx.input[lx.pos] == '\n' { - lx.line++ - } - lx.prevWidths[2] = lx.prevWidths[1] - lx.prevWidths[1] = lx.prevWidths[0] - if lx.nprev < 3 { - lx.nprev++ - } - r, w := utf8.DecodeRuneInString(lx.input[lx.pos:]) - lx.prevWidths[0] = w - lx.pos += w - return r -} - -// ignore skips over the pending input before this point. -func (lx *lexer) ignore() { - lx.start = lx.pos -} - -// backup steps back one rune. Can be called only twice between calls to next. -func (lx *lexer) backup() { - if lx.atEOF { - lx.atEOF = false - return - } - if lx.nprev < 1 { - panic("backed up too far") - } - w := lx.prevWidths[0] - lx.prevWidths[0] = lx.prevWidths[1] - lx.prevWidths[1] = lx.prevWidths[2] - lx.nprev-- - lx.pos -= w - if lx.pos < len(lx.input) && lx.input[lx.pos] == '\n' { - lx.line-- - } -} - -// accept consumes the next rune if it's equal to `valid`. -func (lx *lexer) accept(valid rune) bool { - if lx.next() == valid { - return true - } - lx.backup() - return false -} - -// peek returns but does not consume the next rune in the input. -func (lx *lexer) peek() rune { - r := lx.next() - lx.backup() - return r -} - -// skip ignores all input that matches the given predicate. -func (lx *lexer) skip(pred func(rune) bool) { - for { - r := lx.next() - if pred(r) { - continue - } - lx.backup() - lx.ignore() - return - } -} - -// errorf stops all lexing by emitting an error and returning `nil`. -// Note that any value that is a character is escaped if it's a special -// character (newlines, tabs, etc.). -func (lx *lexer) errorf(format string, values ...interface{}) stateFn { - lx.items <- item{ - itemError, - fmt.Sprintf(format, values...), - lx.line, - } - return nil -} - -// lexTop consumes elements at the top level of TOML data. -func lexTop(lx *lexer) stateFn { - r := lx.next() - if isWhitespace(r) || isNL(r) { - return lexSkip(lx, lexTop) - } - switch r { - case commentStart: - lx.push(lexTop) - return lexCommentStart - case tableStart: - return lexTableStart - case eof: - if lx.pos > lx.start { - return lx.errorf("unexpected EOF") - } - lx.emit(itemEOF) - return nil - } - - // At this point, the only valid item can be a key, so we back up - // and let the key lexer do the rest. - lx.backup() - lx.push(lexTopEnd) - return lexKeyStart -} - -// lexTopEnd is entered whenever a top-level item has been consumed. (A value -// or a table.) It must see only whitespace, and will turn back to lexTop -// upon a newline. If it sees EOF, it will quit the lexer successfully. -func lexTopEnd(lx *lexer) stateFn { - r := lx.next() - switch { - case r == commentStart: - // a comment will read to a newline for us. - lx.push(lexTop) - return lexCommentStart - case isWhitespace(r): - return lexTopEnd - case isNL(r): - lx.ignore() - return lexTop - case r == eof: - lx.emit(itemEOF) - return nil - } - return lx.errorf("expected a top-level item to end with a newline, "+ - "comment, or EOF, but got %q instead", r) -} - -// lexTable lexes the beginning of a table. Namely, it makes sure that -// it starts with a character other than '.' and ']'. -// It assumes that '[' has already been consumed. -// It also handles the case that this is an item in an array of tables. -// e.g., '[[name]]'. -func lexTableStart(lx *lexer) stateFn { - if lx.peek() == arrayTableStart { - lx.next() - lx.emit(itemArrayTableStart) - lx.push(lexArrayTableEnd) - } else { - lx.emit(itemTableStart) - lx.push(lexTableEnd) - } - return lexTableNameStart -} - -func lexTableEnd(lx *lexer) stateFn { - lx.emit(itemTableEnd) - return lexTopEnd -} - -func lexArrayTableEnd(lx *lexer) stateFn { - if r := lx.next(); r != arrayTableEnd { - return lx.errorf("expected end of table array name delimiter %q, "+ - "but got %q instead", arrayTableEnd, r) - } - lx.emit(itemArrayTableEnd) - return lexTopEnd -} - -func lexTableNameStart(lx *lexer) stateFn { - lx.skip(isWhitespace) - switch r := lx.peek(); { - case r == tableEnd || r == eof: - return lx.errorf("unexpected end of table name " + - "(table names cannot be empty)") - case r == tableSep: - return lx.errorf("unexpected table separator " + - "(table names cannot be empty)") - case r == stringStart || r == rawStringStart: - lx.ignore() - lx.push(lexTableNameEnd) - return lexValue // reuse string lexing - default: - return lexBareTableName - } -} - -// lexBareTableName lexes the name of a table. It assumes that at least one -// valid character for the table has already been read. -func lexBareTableName(lx *lexer) stateFn { - r := lx.next() - if isBareKeyChar(r) { - return lexBareTableName - } - lx.backup() - lx.emit(itemText) - return lexTableNameEnd -} - -// lexTableNameEnd reads the end of a piece of a table name, optionally -// consuming whitespace. -func lexTableNameEnd(lx *lexer) stateFn { - lx.skip(isWhitespace) - switch r := lx.next(); { - case isWhitespace(r): - return lexTableNameEnd - case r == tableSep: - lx.ignore() - return lexTableNameStart - case r == tableEnd: - return lx.pop() - default: - return lx.errorf("expected '.' or ']' to end table name, "+ - "but got %q instead", r) - } -} - -// lexKeyStart consumes a key name up until the first non-whitespace character. -// lexKeyStart will ignore whitespace. -func lexKeyStart(lx *lexer) stateFn { - r := lx.peek() - switch { - case r == keySep: - return lx.errorf("unexpected key separator %q", keySep) - case isWhitespace(r) || isNL(r): - lx.next() - return lexSkip(lx, lexKeyStart) - case r == stringStart || r == rawStringStart: - lx.ignore() - lx.emit(itemKeyStart) - lx.push(lexKeyEnd) - return lexValue // reuse string lexing - default: - lx.ignore() - lx.emit(itemKeyStart) - return lexBareKey - } -} - -// lexBareKey consumes the text of a bare key. Assumes that the first character -// (which is not whitespace) has not yet been consumed. -func lexBareKey(lx *lexer) stateFn { - switch r := lx.next(); { - case isBareKeyChar(r): - return lexBareKey - case isWhitespace(r): - lx.backup() - lx.emit(itemText) - return lexKeyEnd - case r == keySep: - lx.backup() - lx.emit(itemText) - return lexKeyEnd - default: - return lx.errorf("bare keys cannot contain %q", r) - } -} - -// lexKeyEnd consumes the end of a key and trims whitespace (up to the key -// separator). -func lexKeyEnd(lx *lexer) stateFn { - switch r := lx.next(); { - case r == keySep: - return lexSkip(lx, lexValue) - case isWhitespace(r): - return lexSkip(lx, lexKeyEnd) - default: - return lx.errorf("expected key separator %q, but got %q instead", - keySep, r) - } -} - -// lexValue starts the consumption of a value anywhere a value is expected. -// lexValue will ignore whitespace. -// After a value is lexed, the last state on the next is popped and returned. -func lexValue(lx *lexer) stateFn { - // We allow whitespace to precede a value, but NOT newlines. - // In array syntax, the array states are responsible for ignoring newlines. - r := lx.next() - switch { - case isWhitespace(r): - return lexSkip(lx, lexValue) - case isDigit(r): - lx.backup() // avoid an extra state and use the same as above - return lexNumberOrDateStart - } - switch r { - case arrayStart: - lx.ignore() - lx.emit(itemArray) - return lexArrayValue - case inlineTableStart: - lx.ignore() - lx.emit(itemInlineTableStart) - return lexInlineTableValue - case stringStart: - if lx.accept(stringStart) { - if lx.accept(stringStart) { - lx.ignore() // Ignore """ - return lexMultilineString - } - lx.backup() - } - lx.ignore() // ignore the '"' - return lexString - case rawStringStart: - if lx.accept(rawStringStart) { - if lx.accept(rawStringStart) { - lx.ignore() // Ignore """ - return lexMultilineRawString - } - lx.backup() - } - lx.ignore() // ignore the "'" - return lexRawString - case '+', '-': - return lexNumberStart - case '.': // special error case, be kind to users - return lx.errorf("floats must start with a digit, not '.'") - } - if unicode.IsLetter(r) { - // Be permissive here; lexBool will give a nice error if the - // user wrote something like - // x = foo - // (i.e. not 'true' or 'false' but is something else word-like.) - lx.backup() - return lexBool - } - return lx.errorf("expected value but found %q instead", r) -} - -// lexArrayValue consumes one value in an array. It assumes that '[' or ',' -// have already been consumed. All whitespace and newlines are ignored. -func lexArrayValue(lx *lexer) stateFn { - r := lx.next() - switch { - case isWhitespace(r) || isNL(r): - return lexSkip(lx, lexArrayValue) - case r == commentStart: - lx.push(lexArrayValue) - return lexCommentStart - case r == comma: - return lx.errorf("unexpected comma") - case r == arrayEnd: - // NOTE(caleb): The spec isn't clear about whether you can have - // a trailing comma or not, so we'll allow it. - return lexArrayEnd - } - - lx.backup() - lx.push(lexArrayValueEnd) - return lexValue -} - -// lexArrayValueEnd consumes everything between the end of an array value and -// the next value (or the end of the array): it ignores whitespace and newlines -// and expects either a ',' or a ']'. -func lexArrayValueEnd(lx *lexer) stateFn { - r := lx.next() - switch { - case isWhitespace(r) || isNL(r): - return lexSkip(lx, lexArrayValueEnd) - case r == commentStart: - lx.push(lexArrayValueEnd) - return lexCommentStart - case r == comma: - lx.ignore() - return lexArrayValue // move on to the next value - case r == arrayEnd: - return lexArrayEnd - } - return lx.errorf( - "expected a comma or array terminator %q, but got %q instead", - arrayEnd, r, - ) -} - -// lexArrayEnd finishes the lexing of an array. -// It assumes that a ']' has just been consumed. -func lexArrayEnd(lx *lexer) stateFn { - lx.ignore() - lx.emit(itemArrayEnd) - return lx.pop() -} - -// lexInlineTableValue consumes one key/value pair in an inline table. -// It assumes that '{' or ',' have already been consumed. Whitespace is ignored. -func lexInlineTableValue(lx *lexer) stateFn { - r := lx.next() - switch { - case isWhitespace(r): - return lexSkip(lx, lexInlineTableValue) - case isNL(r): - return lx.errorf("newlines not allowed within inline tables") - case r == commentStart: - lx.push(lexInlineTableValue) - return lexCommentStart - case r == comma: - return lx.errorf("unexpected comma") - case r == inlineTableEnd: - return lexInlineTableEnd - } - lx.backup() - lx.push(lexInlineTableValueEnd) - return lexKeyStart -} - -// lexInlineTableValueEnd consumes everything between the end of an inline table -// key/value pair and the next pair (or the end of the table): -// it ignores whitespace and expects either a ',' or a '}'. -func lexInlineTableValueEnd(lx *lexer) stateFn { - r := lx.next() - switch { - case isWhitespace(r): - return lexSkip(lx, lexInlineTableValueEnd) - case isNL(r): - return lx.errorf("newlines not allowed within inline tables") - case r == commentStart: - lx.push(lexInlineTableValueEnd) - return lexCommentStart - case r == comma: - lx.ignore() - return lexInlineTableValue - case r == inlineTableEnd: - return lexInlineTableEnd - } - return lx.errorf("expected a comma or an inline table terminator %q, "+ - "but got %q instead", inlineTableEnd, r) -} - -// lexInlineTableEnd finishes the lexing of an inline table. -// It assumes that a '}' has just been consumed. -func lexInlineTableEnd(lx *lexer) stateFn { - lx.ignore() - lx.emit(itemInlineTableEnd) - return lx.pop() -} - -// lexString consumes the inner contents of a string. It assumes that the -// beginning '"' has already been consumed and ignored. -func lexString(lx *lexer) stateFn { - r := lx.next() - switch { - case r == eof: - return lx.errorf("unexpected EOF") - case isNL(r): - return lx.errorf("strings cannot contain newlines") - case r == '\\': - lx.push(lexString) - return lexStringEscape - case r == stringEnd: - lx.backup() - lx.emit(itemString) - lx.next() - lx.ignore() - return lx.pop() - } - return lexString -} - -// lexMultilineString consumes the inner contents of a string. It assumes that -// the beginning '"""' has already been consumed and ignored. -func lexMultilineString(lx *lexer) stateFn { - switch lx.next() { - case eof: - return lx.errorf("unexpected EOF") - case '\\': - return lexMultilineStringEscape - case stringEnd: - if lx.accept(stringEnd) { - if lx.accept(stringEnd) { - lx.backup() - lx.backup() - lx.backup() - lx.emit(itemMultilineString) - lx.next() - lx.next() - lx.next() - lx.ignore() - return lx.pop() - } - lx.backup() - } - } - return lexMultilineString -} - -// lexRawString consumes a raw string. Nothing can be escaped in such a string. -// It assumes that the beginning "'" has already been consumed and ignored. -func lexRawString(lx *lexer) stateFn { - r := lx.next() - switch { - case r == eof: - return lx.errorf("unexpected EOF") - case isNL(r): - return lx.errorf("strings cannot contain newlines") - case r == rawStringEnd: - lx.backup() - lx.emit(itemRawString) - lx.next() - lx.ignore() - return lx.pop() - } - return lexRawString -} - -// lexMultilineRawString consumes a raw string. Nothing can be escaped in such -// a string. It assumes that the beginning "'''" has already been consumed and -// ignored. -func lexMultilineRawString(lx *lexer) stateFn { - switch lx.next() { - case eof: - return lx.errorf("unexpected EOF") - case rawStringEnd: - if lx.accept(rawStringEnd) { - if lx.accept(rawStringEnd) { - lx.backup() - lx.backup() - lx.backup() - lx.emit(itemRawMultilineString) - lx.next() - lx.next() - lx.next() - lx.ignore() - return lx.pop() - } - lx.backup() - } - } - return lexMultilineRawString -} - -// lexMultilineStringEscape consumes an escaped character. It assumes that the -// preceding '\\' has already been consumed. -func lexMultilineStringEscape(lx *lexer) stateFn { - // Handle the special case first: - if isNL(lx.next()) { - return lexMultilineString - } - lx.backup() - lx.push(lexMultilineString) - return lexStringEscape(lx) -} - -func lexStringEscape(lx *lexer) stateFn { - r := lx.next() - switch r { - case 'b': - fallthrough - case 't': - fallthrough - case 'n': - fallthrough - case 'f': - fallthrough - case 'r': - fallthrough - case '"': - fallthrough - case '\\': - return lx.pop() - case 'u': - return lexShortUnicodeEscape - case 'U': - return lexLongUnicodeEscape - } - return lx.errorf("invalid escape character %q; only the following "+ - "escape characters are allowed: "+ - `\b, \t, \n, \f, \r, \", \\, \uXXXX, and \UXXXXXXXX`, r) -} - -func lexShortUnicodeEscape(lx *lexer) stateFn { - var r rune - for i := 0; i < 4; i++ { - r = lx.next() - if !isHexadecimal(r) { - return lx.errorf(`expected four hexadecimal digits after '\u', `+ - "but got %q instead", lx.current()) - } - } - return lx.pop() -} - -func lexLongUnicodeEscape(lx *lexer) stateFn { - var r rune - for i := 0; i < 8; i++ { - r = lx.next() - if !isHexadecimal(r) { - return lx.errorf(`expected eight hexadecimal digits after '\U', `+ - "but got %q instead", lx.current()) - } - } - return lx.pop() -} - -// lexNumberOrDateStart consumes either an integer, a float, or datetime. -func lexNumberOrDateStart(lx *lexer) stateFn { - r := lx.next() - if isDigit(r) { - return lexNumberOrDate - } - switch r { - case '_': - return lexNumber - case 'e', 'E': - return lexFloat - case '.': - return lx.errorf("floats must start with a digit, not '.'") - } - return lx.errorf("expected a digit but got %q", r) -} - -// lexNumberOrDate consumes either an integer, float or datetime. -func lexNumberOrDate(lx *lexer) stateFn { - r := lx.next() - if isDigit(r) { - return lexNumberOrDate - } - switch r { - case '-': - return lexDatetime - case '_': - return lexNumber - case '.', 'e', 'E': - return lexFloat - } - - lx.backup() - lx.emit(itemInteger) - return lx.pop() -} - -// lexDatetime consumes a Datetime, to a first approximation. -// The parser validates that it matches one of the accepted formats. -func lexDatetime(lx *lexer) stateFn { - r := lx.next() - if isDigit(r) { - return lexDatetime - } - switch r { - case '-', 'T', ':', '.', 'Z', '+': - return lexDatetime - } - - lx.backup() - lx.emit(itemDatetime) - return lx.pop() -} - -// lexNumberStart consumes either an integer or a float. It assumes that a sign -// has already been read, but that *no* digits have been consumed. -// lexNumberStart will move to the appropriate integer or float states. -func lexNumberStart(lx *lexer) stateFn { - // We MUST see a digit. Even floats have to start with a digit. - r := lx.next() - if !isDigit(r) { - if r == '.' { - return lx.errorf("floats must start with a digit, not '.'") - } - return lx.errorf("expected a digit but got %q", r) - } - return lexNumber -} - -// lexNumber consumes an integer or a float after seeing the first digit. -func lexNumber(lx *lexer) stateFn { - r := lx.next() - if isDigit(r) { - return lexNumber - } - switch r { - case '_': - return lexNumber - case '.', 'e', 'E': - return lexFloat - } - - lx.backup() - lx.emit(itemInteger) - return lx.pop() -} - -// lexFloat consumes the elements of a float. It allows any sequence of -// float-like characters, so floats emitted by the lexer are only a first -// approximation and must be validated by the parser. -func lexFloat(lx *lexer) stateFn { - r := lx.next() - if isDigit(r) { - return lexFloat - } - switch r { - case '_', '.', '-', '+', 'e', 'E': - return lexFloat - } - - lx.backup() - lx.emit(itemFloat) - return lx.pop() -} - -// lexBool consumes a bool string: 'true' or 'false. -func lexBool(lx *lexer) stateFn { - var rs []rune - for { - r := lx.next() - if !unicode.IsLetter(r) { - lx.backup() - break - } - rs = append(rs, r) - } - s := string(rs) - switch s { - case "true", "false": - lx.emit(itemBool) - return lx.pop() - } - return lx.errorf("expected value but found %q instead", s) -} - -// lexCommentStart begins the lexing of a comment. It will emit -// itemCommentStart and consume no characters, passing control to lexComment. -func lexCommentStart(lx *lexer) stateFn { - lx.ignore() - lx.emit(itemCommentStart) - return lexComment -} - -// lexComment lexes an entire comment. It assumes that '#' has been consumed. -// It will consume *up to* the first newline character, and pass control -// back to the last state on the stack. -func lexComment(lx *lexer) stateFn { - r := lx.peek() - if isNL(r) || r == eof { - lx.emit(itemText) - return lx.pop() - } - lx.next() - return lexComment -} - -// lexSkip ignores all slurped input and moves on to the next state. -func lexSkip(lx *lexer, nextState stateFn) stateFn { - return func(lx *lexer) stateFn { - lx.ignore() - return nextState - } -} - -// isWhitespace returns true if `r` is a whitespace character according -// to the spec. -func isWhitespace(r rune) bool { - return r == '\t' || r == ' ' -} - -func isNL(r rune) bool { - return r == '\n' || r == '\r' -} - -func isDigit(r rune) bool { - return r >= '0' && r <= '9' -} - -func isHexadecimal(r rune) bool { - return (r >= '0' && r <= '9') || - (r >= 'a' && r <= 'f') || - (r >= 'A' && r <= 'F') -} - -func isBareKeyChar(r rune) bool { - return (r >= 'A' && r <= 'Z') || - (r >= 'a' && r <= 'z') || - (r >= '0' && r <= '9') || - r == '_' || - r == '-' -} - -func (itype itemType) String() string { - switch itype { - case itemError: - return "Error" - case itemNIL: - return "NIL" - case itemEOF: - return "EOF" - case itemText: - return "Text" - case itemString, itemRawString, itemMultilineString, itemRawMultilineString: - return "String" - case itemBool: - return "Bool" - case itemInteger: - return "Integer" - case itemFloat: - return "Float" - case itemDatetime: - return "DateTime" - case itemTableStart: - return "TableStart" - case itemTableEnd: - return "TableEnd" - case itemKeyStart: - return "KeyStart" - case itemArray: - return "Array" - case itemArrayEnd: - return "ArrayEnd" - case itemCommentStart: - return "CommentStart" - } - panic(fmt.Sprintf("BUG: Unknown type '%d'.", int(itype))) -} - -func (item item) String() string { - return fmt.Sprintf("(%s, %s)", item.typ.String(), item.val) -} diff --git a/vendor/github.com/BurntSushi/toml/parse.go b/vendor/github.com/BurntSushi/toml/parse.go deleted file mode 100644 index 50869ef92..000000000 --- a/vendor/github.com/BurntSushi/toml/parse.go +++ /dev/null @@ -1,592 +0,0 @@ -package toml - -import ( - "fmt" - "strconv" - "strings" - "time" - "unicode" - "unicode/utf8" -) - -type parser struct { - mapping map[string]interface{} - types map[string]tomlType - lx *lexer - - // A list of keys in the order that they appear in the TOML data. - ordered []Key - - // the full key for the current hash in scope - context Key - - // the base key name for everything except hashes - currentKey string - - // rough approximation of line number - approxLine int - - // A map of 'key.group.names' to whether they were created implicitly. - implicits map[string]bool -} - -type parseError string - -func (pe parseError) Error() string { - return string(pe) -} - -func parse(data string) (p *parser, err error) { - defer func() { - if r := recover(); r != nil { - var ok bool - if err, ok = r.(parseError); ok { - return - } - panic(r) - } - }() - - p = &parser{ - mapping: make(map[string]interface{}), - types: make(map[string]tomlType), - lx: lex(data), - ordered: make([]Key, 0), - implicits: make(map[string]bool), - } - for { - item := p.next() - if item.typ == itemEOF { - break - } - p.topLevel(item) - } - - return p, nil -} - -func (p *parser) panicf(format string, v ...interface{}) { - msg := fmt.Sprintf("Near line %d (last key parsed '%s'): %s", - p.approxLine, p.current(), fmt.Sprintf(format, v...)) - panic(parseError(msg)) -} - -func (p *parser) next() item { - it := p.lx.nextItem() - if it.typ == itemError { - p.panicf("%s", it.val) - } - return it -} - -func (p *parser) bug(format string, v ...interface{}) { - panic(fmt.Sprintf("BUG: "+format+"\n\n", v...)) -} - -func (p *parser) expect(typ itemType) item { - it := p.next() - p.assertEqual(typ, it.typ) - return it -} - -func (p *parser) assertEqual(expected, got itemType) { - if expected != got { - p.bug("Expected '%s' but got '%s'.", expected, got) - } -} - -func (p *parser) topLevel(item item) { - switch item.typ { - case itemCommentStart: - p.approxLine = item.line - p.expect(itemText) - case itemTableStart: - kg := p.next() - p.approxLine = kg.line - - var key Key - for ; kg.typ != itemTableEnd && kg.typ != itemEOF; kg = p.next() { - key = append(key, p.keyString(kg)) - } - p.assertEqual(itemTableEnd, kg.typ) - - p.establishContext(key, false) - p.setType("", tomlHash) - p.ordered = append(p.ordered, key) - case itemArrayTableStart: - kg := p.next() - p.approxLine = kg.line - - var key Key - for ; kg.typ != itemArrayTableEnd && kg.typ != itemEOF; kg = p.next() { - key = append(key, p.keyString(kg)) - } - p.assertEqual(itemArrayTableEnd, kg.typ) - - p.establishContext(key, true) - p.setType("", tomlArrayHash) - p.ordered = append(p.ordered, key) - case itemKeyStart: - kname := p.next() - p.approxLine = kname.line - p.currentKey = p.keyString(kname) - - val, typ := p.value(p.next()) - p.setValue(p.currentKey, val) - p.setType(p.currentKey, typ) - p.ordered = append(p.ordered, p.context.add(p.currentKey)) - p.currentKey = "" - default: - p.bug("Unexpected type at top level: %s", item.typ) - } -} - -// Gets a string for a key (or part of a key in a table name). -func (p *parser) keyString(it item) string { - switch it.typ { - case itemText: - return it.val - case itemString, itemMultilineString, - itemRawString, itemRawMultilineString: - s, _ := p.value(it) - return s.(string) - default: - p.bug("Unexpected key type: %s", it.typ) - panic("unreachable") - } -} - -// value translates an expected value from the lexer into a Go value wrapped -// as an empty interface. -func (p *parser) value(it item) (interface{}, tomlType) { - switch it.typ { - case itemString: - return p.replaceEscapes(it.val), p.typeOfPrimitive(it) - case itemMultilineString: - trimmed := stripFirstNewline(stripEscapedWhitespace(it.val)) - return p.replaceEscapes(trimmed), p.typeOfPrimitive(it) - case itemRawString: - return it.val, p.typeOfPrimitive(it) - case itemRawMultilineString: - return stripFirstNewline(it.val), p.typeOfPrimitive(it) - case itemBool: - switch it.val { - case "true": - return true, p.typeOfPrimitive(it) - case "false": - return false, p.typeOfPrimitive(it) - } - p.bug("Expected boolean value, but got '%s'.", it.val) - case itemInteger: - if !numUnderscoresOK(it.val) { - p.panicf("Invalid integer %q: underscores must be surrounded by digits", - it.val) - } - val := strings.Replace(it.val, "_", "", -1) - num, err := strconv.ParseInt(val, 10, 64) - if err != nil { - // Distinguish integer values. Normally, it'd be a bug if the lexer - // provides an invalid integer, but it's possible that the number is - // out of range of valid values (which the lexer cannot determine). - // So mark the former as a bug but the latter as a legitimate user - // error. - if e, ok := err.(*strconv.NumError); ok && - e.Err == strconv.ErrRange { - - p.panicf("Integer '%s' is out of the range of 64-bit "+ - "signed integers.", it.val) - } else { - p.bug("Expected integer value, but got '%s'.", it.val) - } - } - return num, p.typeOfPrimitive(it) - case itemFloat: - parts := strings.FieldsFunc(it.val, func(r rune) bool { - switch r { - case '.', 'e', 'E': - return true - } - return false - }) - for _, part := range parts { - if !numUnderscoresOK(part) { - p.panicf("Invalid float %q: underscores must be "+ - "surrounded by digits", it.val) - } - } - if !numPeriodsOK(it.val) { - // As a special case, numbers like '123.' or '1.e2', - // which are valid as far as Go/strconv are concerned, - // must be rejected because TOML says that a fractional - // part consists of '.' followed by 1+ digits. - p.panicf("Invalid float %q: '.' must be followed "+ - "by one or more digits", it.val) - } - val := strings.Replace(it.val, "_", "", -1) - num, err := strconv.ParseFloat(val, 64) - if err != nil { - if e, ok := err.(*strconv.NumError); ok && - e.Err == strconv.ErrRange { - - p.panicf("Float '%s' is out of the range of 64-bit "+ - "IEEE-754 floating-point numbers.", it.val) - } else { - p.panicf("Invalid float value: %q", it.val) - } - } - return num, p.typeOfPrimitive(it) - case itemDatetime: - var t time.Time - var ok bool - var err error - for _, format := range []string{ - "2006-01-02T15:04:05Z07:00", - "2006-01-02T15:04:05", - "2006-01-02", - } { - t, err = time.ParseInLocation(format, it.val, time.Local) - if err == nil { - ok = true - break - } - } - if !ok { - p.panicf("Invalid TOML Datetime: %q.", it.val) - } - return t, p.typeOfPrimitive(it) - case itemArray: - array := make([]interface{}, 0) - types := make([]tomlType, 0) - - for it = p.next(); it.typ != itemArrayEnd; it = p.next() { - if it.typ == itemCommentStart { - p.expect(itemText) - continue - } - - val, typ := p.value(it) - array = append(array, val) - types = append(types, typ) - } - return array, p.typeOfArray(types) - case itemInlineTableStart: - var ( - hash = make(map[string]interface{}) - outerContext = p.context - outerKey = p.currentKey - ) - - p.context = append(p.context, p.currentKey) - p.currentKey = "" - for it := p.next(); it.typ != itemInlineTableEnd; it = p.next() { - if it.typ != itemKeyStart { - p.bug("Expected key start but instead found %q, around line %d", - it.val, p.approxLine) - } - if it.typ == itemCommentStart { - p.expect(itemText) - continue - } - - // retrieve key - k := p.next() - p.approxLine = k.line - kname := p.keyString(k) - - // retrieve value - p.currentKey = kname - val, typ := p.value(p.next()) - // make sure we keep metadata up to date - p.setType(kname, typ) - p.ordered = append(p.ordered, p.context.add(p.currentKey)) - hash[kname] = val - } - p.context = outerContext - p.currentKey = outerKey - return hash, tomlHash - } - p.bug("Unexpected value type: %s", it.typ) - panic("unreachable") -} - -// numUnderscoresOK checks whether each underscore in s is surrounded by -// characters that are not underscores. -func numUnderscoresOK(s string) bool { - accept := false - for _, r := range s { - if r == '_' { - if !accept { - return false - } - accept = false - continue - } - accept = true - } - return accept -} - -// numPeriodsOK checks whether every period in s is followed by a digit. -func numPeriodsOK(s string) bool { - period := false - for _, r := range s { - if period && !isDigit(r) { - return false - } - period = r == '.' - } - return !period -} - -// establishContext sets the current context of the parser, -// where the context is either a hash or an array of hashes. Which one is -// set depends on the value of the `array` parameter. -// -// Establishing the context also makes sure that the key isn't a duplicate, and -// will create implicit hashes automatically. -func (p *parser) establishContext(key Key, array bool) { - var ok bool - - // Always start at the top level and drill down for our context. - hashContext := p.mapping - keyContext := make(Key, 0) - - // We only need implicit hashes for key[0:-1] - for _, k := range key[0 : len(key)-1] { - _, ok = hashContext[k] - keyContext = append(keyContext, k) - - // No key? Make an implicit hash and move on. - if !ok { - p.addImplicit(keyContext) - hashContext[k] = make(map[string]interface{}) - } - - // If the hash context is actually an array of tables, then set - // the hash context to the last element in that array. - // - // Otherwise, it better be a table, since this MUST be a key group (by - // virtue of it not being the last element in a key). - switch t := hashContext[k].(type) { - case []map[string]interface{}: - hashContext = t[len(t)-1] - case map[string]interface{}: - hashContext = t - default: - p.panicf("Key '%s' was already created as a hash.", keyContext) - } - } - - p.context = keyContext - if array { - // If this is the first element for this array, then allocate a new - // list of tables for it. - k := key[len(key)-1] - if _, ok := hashContext[k]; !ok { - hashContext[k] = make([]map[string]interface{}, 0, 5) - } - - // Add a new table. But make sure the key hasn't already been used - // for something else. - if hash, ok := hashContext[k].([]map[string]interface{}); ok { - hashContext[k] = append(hash, make(map[string]interface{})) - } else { - p.panicf("Key '%s' was already created and cannot be used as "+ - "an array.", keyContext) - } - } else { - p.setValue(key[len(key)-1], make(map[string]interface{})) - } - p.context = append(p.context, key[len(key)-1]) -} - -// setValue sets the given key to the given value in the current context. -// It will make sure that the key hasn't already been defined, account for -// implicit key groups. -func (p *parser) setValue(key string, value interface{}) { - var tmpHash interface{} - var ok bool - - hash := p.mapping - keyContext := make(Key, 0) - for _, k := range p.context { - keyContext = append(keyContext, k) - if tmpHash, ok = hash[k]; !ok { - p.bug("Context for key '%s' has not been established.", keyContext) - } - switch t := tmpHash.(type) { - case []map[string]interface{}: - // The context is a table of hashes. Pick the most recent table - // defined as the current hash. - hash = t[len(t)-1] - case map[string]interface{}: - hash = t - default: - p.bug("Expected hash to have type 'map[string]interface{}', but "+ - "it has '%T' instead.", tmpHash) - } - } - keyContext = append(keyContext, key) - - if _, ok := hash[key]; ok { - // Typically, if the given key has already been set, then we have - // to raise an error since duplicate keys are disallowed. However, - // it's possible that a key was previously defined implicitly. In this - // case, it is allowed to be redefined concretely. (See the - // `tests/valid/implicit-and-explicit-after.toml` test in `toml-test`.) - // - // But we have to make sure to stop marking it as an implicit. (So that - // another redefinition provokes an error.) - // - // Note that since it has already been defined (as a hash), we don't - // want to overwrite it. So our business is done. - if p.isImplicit(keyContext) { - p.removeImplicit(keyContext) - return - } - - // Otherwise, we have a concrete key trying to override a previous - // key, which is *always* wrong. - p.panicf("Key '%s' has already been defined.", keyContext) - } - hash[key] = value -} - -// setType sets the type of a particular value at a given key. -// It should be called immediately AFTER setValue. -// -// Note that if `key` is empty, then the type given will be applied to the -// current context (which is either a table or an array of tables). -func (p *parser) setType(key string, typ tomlType) { - keyContext := make(Key, 0, len(p.context)+1) - for _, k := range p.context { - keyContext = append(keyContext, k) - } - if len(key) > 0 { // allow type setting for hashes - keyContext = append(keyContext, key) - } - p.types[keyContext.String()] = typ -} - -// addImplicit sets the given Key as having been created implicitly. -func (p *parser) addImplicit(key Key) { - p.implicits[key.String()] = true -} - -// removeImplicit stops tagging the given key as having been implicitly -// created. -func (p *parser) removeImplicit(key Key) { - p.implicits[key.String()] = false -} - -// isImplicit returns true if the key group pointed to by the key was created -// implicitly. -func (p *parser) isImplicit(key Key) bool { - return p.implicits[key.String()] -} - -// current returns the full key name of the current context. -func (p *parser) current() string { - if len(p.currentKey) == 0 { - return p.context.String() - } - if len(p.context) == 0 { - return p.currentKey - } - return fmt.Sprintf("%s.%s", p.context, p.currentKey) -} - -func stripFirstNewline(s string) string { - if len(s) == 0 || s[0] != '\n' { - return s - } - return s[1:] -} - -func stripEscapedWhitespace(s string) string { - esc := strings.Split(s, "\\\n") - if len(esc) > 1 { - for i := 1; i < len(esc); i++ { - esc[i] = strings.TrimLeftFunc(esc[i], unicode.IsSpace) - } - } - return strings.Join(esc, "") -} - -func (p *parser) replaceEscapes(str string) string { - var replaced []rune - s := []byte(str) - r := 0 - for r < len(s) { - if s[r] != '\\' { - c, size := utf8.DecodeRune(s[r:]) - r += size - replaced = append(replaced, c) - continue - } - r += 1 - if r >= len(s) { - p.bug("Escape sequence at end of string.") - return "" - } - switch s[r] { - default: - p.bug("Expected valid escape code after \\, but got %q.", s[r]) - return "" - case 'b': - replaced = append(replaced, rune(0x0008)) - r += 1 - case 't': - replaced = append(replaced, rune(0x0009)) - r += 1 - case 'n': - replaced = append(replaced, rune(0x000A)) - r += 1 - case 'f': - replaced = append(replaced, rune(0x000C)) - r += 1 - case 'r': - replaced = append(replaced, rune(0x000D)) - r += 1 - case '"': - replaced = append(replaced, rune(0x0022)) - r += 1 - case '\\': - replaced = append(replaced, rune(0x005C)) - r += 1 - case 'u': - // At this point, we know we have a Unicode escape of the form - // `uXXXX` at [r, r+5). (Because the lexer guarantees this - // for us.) - escaped := p.asciiEscapeToUnicode(s[r+1 : r+5]) - replaced = append(replaced, escaped) - r += 5 - case 'U': - // At this point, we know we have a Unicode escape of the form - // `uXXXX` at [r, r+9). (Because the lexer guarantees this - // for us.) - escaped := p.asciiEscapeToUnicode(s[r+1 : r+9]) - replaced = append(replaced, escaped) - r += 9 - } - } - return string(replaced) -} - -func (p *parser) asciiEscapeToUnicode(bs []byte) rune { - s := string(bs) - hex, err := strconv.ParseUint(strings.ToLower(s), 16, 32) - if err != nil { - p.bug("Could not parse '%s' as a hexadecimal number, but the "+ - "lexer claims it's OK: %s", s, err) - } - if !utf8.ValidRune(rune(hex)) { - p.panicf("Escaped character '\\u%s' is not valid UTF-8.", s) - } - return rune(hex) -} - -func isStringType(ty itemType) bool { - return ty == itemString || ty == itemMultilineString || - ty == itemRawString || ty == itemRawMultilineString -} diff --git a/vendor/github.com/BurntSushi/toml/session.vim b/vendor/github.com/BurntSushi/toml/session.vim deleted file mode 100644 index 562164be0..000000000 --- a/vendor/github.com/BurntSushi/toml/session.vim +++ /dev/null @@ -1 +0,0 @@ -au BufWritePost *.go silent!make tags > /dev/null 2>&1 diff --git a/vendor/github.com/BurntSushi/toml/type_check.go b/vendor/github.com/BurntSushi/toml/type_check.go deleted file mode 100644 index c73f8afc1..000000000 --- a/vendor/github.com/BurntSushi/toml/type_check.go +++ /dev/null @@ -1,91 +0,0 @@ -package toml - -// tomlType represents any Go type that corresponds to a TOML type. -// While the first draft of the TOML spec has a simplistic type system that -// probably doesn't need this level of sophistication, we seem to be militating -// toward adding real composite types. -type tomlType interface { - typeString() string -} - -// typeEqual accepts any two types and returns true if they are equal. -func typeEqual(t1, t2 tomlType) bool { - if t1 == nil || t2 == nil { - return false - } - return t1.typeString() == t2.typeString() -} - -func typeIsHash(t tomlType) bool { - return typeEqual(t, tomlHash) || typeEqual(t, tomlArrayHash) -} - -type tomlBaseType string - -func (btype tomlBaseType) typeString() string { - return string(btype) -} - -func (btype tomlBaseType) String() string { - return btype.typeString() -} - -var ( - tomlInteger tomlBaseType = "Integer" - tomlFloat tomlBaseType = "Float" - tomlDatetime tomlBaseType = "Datetime" - tomlString tomlBaseType = "String" - tomlBool tomlBaseType = "Bool" - tomlArray tomlBaseType = "Array" - tomlHash tomlBaseType = "Hash" - tomlArrayHash tomlBaseType = "ArrayHash" -) - -// typeOfPrimitive returns a tomlType of any primitive value in TOML. -// Primitive values are: Integer, Float, Datetime, String and Bool. -// -// Passing a lexer item other than the following will cause a BUG message -// to occur: itemString, itemBool, itemInteger, itemFloat, itemDatetime. -func (p *parser) typeOfPrimitive(lexItem item) tomlType { - switch lexItem.typ { - case itemInteger: - return tomlInteger - case itemFloat: - return tomlFloat - case itemDatetime: - return tomlDatetime - case itemString: - return tomlString - case itemMultilineString: - return tomlString - case itemRawString: - return tomlString - case itemRawMultilineString: - return tomlString - case itemBool: - return tomlBool - } - p.bug("Cannot infer primitive type of lex item '%s'.", lexItem) - panic("unreachable") -} - -// typeOfArray returns a tomlType for an array given a list of types of its -// values. -// -// In the current spec, if an array is homogeneous, then its type is always -// "Array". If the array is not homogeneous, an error is generated. -func (p *parser) typeOfArray(types []tomlType) tomlType { - // Empty arrays are cool. - if len(types) == 0 { - return tomlArray - } - - theType := types[0] - for _, t := range types[1:] { - if !typeEqual(theType, t) { - p.panicf("Array contains values of type '%s' and '%s', but "+ - "arrays must be homogeneous.", theType, t) - } - } - return tomlArray -} diff --git a/vendor/github.com/BurntSushi/toml/type_fields.go b/vendor/github.com/BurntSushi/toml/type_fields.go deleted file mode 100644 index 608997c22..000000000 --- a/vendor/github.com/BurntSushi/toml/type_fields.go +++ /dev/null @@ -1,242 +0,0 @@ -package toml - -// Struct field handling is adapted from code in encoding/json: -// -// Copyright 2010 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the Go distribution. - -import ( - "reflect" - "sort" - "sync" -) - -// A field represents a single field found in a struct. -type field struct { - name string // the name of the field (`toml` tag included) - tag bool // whether field has a `toml` tag - index []int // represents the depth of an anonymous field - typ reflect.Type // the type of the field -} - -// byName sorts field by name, breaking ties with depth, -// then breaking ties with "name came from toml tag", then -// breaking ties with index sequence. -type byName []field - -func (x byName) Len() int { return len(x) } - -func (x byName) Swap(i, j int) { x[i], x[j] = x[j], x[i] } - -func (x byName) Less(i, j int) bool { - if x[i].name != x[j].name { - return x[i].name < x[j].name - } - if len(x[i].index) != len(x[j].index) { - return len(x[i].index) < len(x[j].index) - } - if x[i].tag != x[j].tag { - return x[i].tag - } - return byIndex(x).Less(i, j) -} - -// byIndex sorts field by index sequence. -type byIndex []field - -func (x byIndex) Len() int { return len(x) } - -func (x byIndex) Swap(i, j int) { x[i], x[j] = x[j], x[i] } - -func (x byIndex) Less(i, j int) bool { - for k, xik := range x[i].index { - if k >= len(x[j].index) { - return false - } - if xik != x[j].index[k] { - return xik < x[j].index[k] - } - } - return len(x[i].index) < len(x[j].index) -} - -// typeFields returns a list of fields that TOML should recognize for the given -// type. The algorithm is breadth-first search over the set of structs to -// include - the top struct and then any reachable anonymous structs. -func typeFields(t reflect.Type) []field { - // Anonymous fields to explore at the current level and the next. - current := []field{} - next := []field{{typ: t}} - - // Count of queued names for current level and the next. - count := map[reflect.Type]int{} - nextCount := map[reflect.Type]int{} - - // Types already visited at an earlier level. - visited := map[reflect.Type]bool{} - - // Fields found. - var fields []field - - for len(next) > 0 { - current, next = next, current[:0] - count, nextCount = nextCount, map[reflect.Type]int{} - - for _, f := range current { - if visited[f.typ] { - continue - } - visited[f.typ] = true - - // Scan f.typ for fields to include. - for i := 0; i < f.typ.NumField(); i++ { - sf := f.typ.Field(i) - if sf.PkgPath != "" && !sf.Anonymous { // unexported - continue - } - opts := getOptions(sf.Tag) - if opts.skip { - continue - } - index := make([]int, len(f.index)+1) - copy(index, f.index) - index[len(f.index)] = i - - ft := sf.Type - if ft.Name() == "" && ft.Kind() == reflect.Ptr { - // Follow pointer. - ft = ft.Elem() - } - - // Record found field and index sequence. - if opts.name != "" || !sf.Anonymous || ft.Kind() != reflect.Struct { - tagged := opts.name != "" - name := opts.name - if name == "" { - name = sf.Name - } - fields = append(fields, field{name, tagged, index, ft}) - if count[f.typ] > 1 { - // If there were multiple instances, add a second, - // so that the annihilation code will see a duplicate. - // It only cares about the distinction between 1 or 2, - // so don't bother generating any more copies. - fields = append(fields, fields[len(fields)-1]) - } - continue - } - - // Record new anonymous struct to explore in next round. - nextCount[ft]++ - if nextCount[ft] == 1 { - f := field{name: ft.Name(), index: index, typ: ft} - next = append(next, f) - } - } - } - } - - sort.Sort(byName(fields)) - - // Delete all fields that are hidden by the Go rules for embedded fields, - // except that fields with TOML tags are promoted. - - // The fields are sorted in primary order of name, secondary order - // of field index length. Loop over names; for each name, delete - // hidden fields by choosing the one dominant field that survives. - out := fields[:0] - for advance, i := 0, 0; i < len(fields); i += advance { - // One iteration per name. - // Find the sequence of fields with the name of this first field. - fi := fields[i] - name := fi.name - for advance = 1; i+advance < len(fields); advance++ { - fj := fields[i+advance] - if fj.name != name { - break - } - } - if advance == 1 { // Only one field with this name - out = append(out, fi) - continue - } - dominant, ok := dominantField(fields[i : i+advance]) - if ok { - out = append(out, dominant) - } - } - - fields = out - sort.Sort(byIndex(fields)) - - return fields -} - -// dominantField looks through the fields, all of which are known to -// have the same name, to find the single field that dominates the -// others using Go's embedding rules, modified by the presence of -// TOML tags. If there are multiple top-level fields, the boolean -// will be false: This condition is an error in Go and we skip all -// the fields. -func dominantField(fields []field) (field, bool) { - // The fields are sorted in increasing index-length order. The winner - // must therefore be one with the shortest index length. Drop all - // longer entries, which is easy: just truncate the slice. - length := len(fields[0].index) - tagged := -1 // Index of first tagged field. - for i, f := range fields { - if len(f.index) > length { - fields = fields[:i] - break - } - if f.tag { - if tagged >= 0 { - // Multiple tagged fields at the same level: conflict. - // Return no field. - return field{}, false - } - tagged = i - } - } - if tagged >= 0 { - return fields[tagged], true - } - // All remaining fields have the same length. If there's more than one, - // we have a conflict (two fields named "X" at the same level) and we - // return no field. - if len(fields) > 1 { - return field{}, false - } - return fields[0], true -} - -var fieldCache struct { - sync.RWMutex - m map[reflect.Type][]field -} - -// cachedTypeFields is like typeFields but uses a cache to avoid repeated work. -func cachedTypeFields(t reflect.Type) []field { - fieldCache.RLock() - f := fieldCache.m[t] - fieldCache.RUnlock() - if f != nil { - return f - } - - // Compute fields without lock. - // Might duplicate effort but won't hold other computations back. - f = typeFields(t) - if f == nil { - f = []field{} - } - - fieldCache.Lock() - if fieldCache.m == nil { - fieldCache.m = map[reflect.Type][]field{} - } - fieldCache.m[t] = f - fieldCache.Unlock() - return f -} diff --git a/vendor/github.com/gobuffalo/buffalo-plugins/LICENSE b/vendor/github.com/gobuffalo/buffalo-plugins/LICENSE deleted file mode 100644 index aab0dd47a..000000000 --- a/vendor/github.com/gobuffalo/buffalo-plugins/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright © 2018 Mark Bates - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/github.com/gobuffalo/buffalo-plugins/plugins/cache.go b/vendor/github.com/gobuffalo/buffalo-plugins/plugins/cache.go deleted file mode 100644 index 0210af2eb..000000000 --- a/vendor/github.com/gobuffalo/buffalo-plugins/plugins/cache.go +++ /dev/null @@ -1,96 +0,0 @@ -package plugins - -import ( - "crypto/sha256" - "encoding/json" - "fmt" - "io" - "os" - "os/user" - "path/filepath" - "sync" - - "github.com/gobuffalo/envy" -) - -type cachedPlugin struct { - Commands Commands `json:"commands"` - CheckSum string `json:"check_sum"` -} - -type cachedPlugins map[string]cachedPlugin - -var cachePath = func() string { - home := "." - if usr, err := user.Current(); err == nil { - home = usr.HomeDir - } - return filepath.Join(home, ".buffalo", "plugin.cache") -}() - -var cacheMoot sync.RWMutex - -var cacheOn = envy.Get("BUFFALO_PLUGIN_CACHE", "on") - -var cache = func() cachedPlugins { - m := cachedPlugins{} - if cacheOn != "on" { - return m - } - f, err := os.Open(cachePath) - if err != nil { - return m - } - defer f.Close() - if err := json.NewDecoder(f).Decode(&m); err != nil { - f.Close() - os.Remove(f.Name()) - } - return m -}() - -func findInCache(path string) (cachedPlugin, bool) { - cacheMoot.RLock() - defer cacheMoot.RUnlock() - cp, ok := cache[path] - return cp, ok -} - -func saveCache() error { - if cacheOn != "on" { - return nil - } - cacheMoot.Lock() - defer cacheMoot.Unlock() - os.MkdirAll(filepath.Dir(cachePath), 0744) - f, err := os.Create(cachePath) - if err != nil { - return err - } - return json.NewEncoder(f).Encode(cache) -} - -func sum(path string) string { - f, err := os.Open(path) - if err != nil { - return "" - } - defer f.Close() - hash := sha256.New() - if _, err := io.Copy(hash, f); err != nil { - return "" - } - sum := hash.Sum(nil) - - s := fmt.Sprintf("%x", sum) - return s -} - -func addToCache(path string, cp cachedPlugin) { - if cp.CheckSum == "" { - cp.CheckSum = sum(path) - } - cacheMoot.Lock() - defer cacheMoot.Unlock() - cache[path] = cp -} diff --git a/vendor/github.com/gobuffalo/buffalo-plugins/plugins/command.go b/vendor/github.com/gobuffalo/buffalo-plugins/plugins/command.go deleted file mode 100644 index 25060dfc4..000000000 --- a/vendor/github.com/gobuffalo/buffalo-plugins/plugins/command.go +++ /dev/null @@ -1,21 +0,0 @@ -package plugins - -// Command that the plugin supplies -type Command struct { - // Name "foo" - Name string `json:"name"` - // UseCommand "bar" - UseCommand string `json:"use_command"` - // BuffaloCommand "generate" - BuffaloCommand string `json:"buffalo_command"` - // Description "generates a foo" - Description string `json:"description,omitempty"` - Aliases []string `json:"aliases,omitempty"` - Binary string `json:"-"` - Flags []string `json:"flags,omitempty"` - // Filters events to listen to ("" or "*") is all events - ListenFor string `json:"listen_for,omitempty"` -} - -// Commands is a slice of Command -type Commands []Command diff --git a/vendor/github.com/gobuffalo/buffalo-plugins/plugins/decorate.go b/vendor/github.com/gobuffalo/buffalo-plugins/plugins/decorate.go deleted file mode 100644 index 02a00088a..000000000 --- a/vendor/github.com/gobuffalo/buffalo-plugins/plugins/decorate.go +++ /dev/null @@ -1,98 +0,0 @@ -package plugins - -import ( - "fmt" - "os" - "os/exec" - "path/filepath" - "runtime" - "strings" - - "github.com/gobuffalo/envy" - "github.com/pkg/errors" - "github.com/spf13/cobra" -) - -// ErrPlugMissing ... -var ErrPlugMissing = errors.New("plugin missing") - -func Decorate(c Command) *cobra.Command { - var flags []string - if len(c.Flags) > 0 { - for _, f := range c.Flags { - flags = append(flags, f) - } - } - cc := &cobra.Command{ - Use: c.Name, - Short: fmt.Sprintf("[PLUGIN] %s", c.Description), - Aliases: c.Aliases, - RunE: func(cmd *cobra.Command, args []string) error { - plugCmd := c.Name - if c.UseCommand != "" { - plugCmd = c.UseCommand - } - - ax := []string{plugCmd} - if plugCmd == "-" { - ax = []string{} - } - - ax = append(ax, args...) - ax = append(ax, flags...) - - bin, err := LookPath(c.Binary) - if err != nil { - return errors.WithStack(err) - } - - ex := exec.Command(bin, ax...) - if runtime.GOOS != "windows" { - ex.Env = append(envy.Environ(), "BUFFALO_PLUGIN=1") - } - ex.Stdin = os.Stdin - ex.Stdout = os.Stdout - ex.Stderr = os.Stderr - return log(strings.Join(ex.Args, " "), ex.Run) - }, - } - cc.DisableFlagParsing = true - return cc -} - -// LookPath ... -func LookPath(s string) (string, error) { - if _, err := os.Stat(s); err == nil { - return s, nil - } - - if lp, err := exec.LookPath(s); err == nil { - return lp, err - } - - var bin string - pwd, err := os.Getwd() - if err != nil { - return "", errors.WithStack(err) - } - - var looks []string - if from, err := envy.MustGet("BUFFALO_PLUGIN_PATH"); err == nil { - looks = append(looks, from) - } else { - looks = []string{filepath.Join(pwd, "plugins"), filepath.Join(envy.GoPath(), "bin"), envy.Get("PATH", "")} - } - - for _, p := range looks { - lp := filepath.Join(p, s) - if lp, err = filepath.EvalSymlinks(lp); err == nil { - bin = lp - break - } - } - - if len(bin) == 0 { - return "", errors.Wrapf(ErrPlugMissing, "could not find %s in %q", s, looks) - } - return bin, nil -} diff --git a/vendor/github.com/gobuffalo/buffalo-plugins/plugins/events.go b/vendor/github.com/gobuffalo/buffalo-plugins/plugins/events.go deleted file mode 100644 index 7368220aa..000000000 --- a/vendor/github.com/gobuffalo/buffalo-plugins/plugins/events.go +++ /dev/null @@ -1,7 +0,0 @@ -package plugins - -const ( - EvtSetupStarted = "buffalo-plugins:setup:started" - EvtSetupErr = "buffalo-plugins:setup:err" - EvtSetupFinished = "buffalo-plugins:setup:finished" -) diff --git a/vendor/github.com/gobuffalo/buffalo-plugins/plugins/log.go b/vendor/github.com/gobuffalo/buffalo-plugins/plugins/log.go deleted file mode 100644 index 8a8909763..000000000 --- a/vendor/github.com/gobuffalo/buffalo-plugins/plugins/log.go +++ /dev/null @@ -1,7 +0,0 @@ -//+build !debug - -package plugins - -func log(_ string, fn func() error) error { - return fn() -} diff --git a/vendor/github.com/gobuffalo/buffalo-plugins/plugins/log_debug.go b/vendor/github.com/gobuffalo/buffalo-plugins/plugins/log_debug.go deleted file mode 100644 index 8c6fcae03..000000000 --- a/vendor/github.com/gobuffalo/buffalo-plugins/plugins/log_debug.go +++ /dev/null @@ -1,14 +0,0 @@ -//+build debug - -package plugins - -import ( - "fmt" - "time" -) - -func log(name string, fn func() error) error { - start := time.Now() - defer fmt.Println(name, time.Now().Sub(start)) - return fn() -} diff --git a/vendor/github.com/gobuffalo/buffalo-plugins/plugins/plugdeps/command.go b/vendor/github.com/gobuffalo/buffalo-plugins/plugins/plugdeps/command.go deleted file mode 100644 index 2bf810e77..000000000 --- a/vendor/github.com/gobuffalo/buffalo-plugins/plugins/plugdeps/command.go +++ /dev/null @@ -1,16 +0,0 @@ -package plugdeps - -import "encoding/json" - -// Command is the plugin command you want to control further -type Command struct { - Name string `toml:"name" json:"name"` - Flags []string `toml:"flags,omitempty" json:"flags,omitempty"` - Commands []Command `toml:"command,omitempty" json:"commands,omitempty"` -} - -// String implementation of fmt.Stringer -func (p Command) String() string { - b, _ := json.Marshal(p) - return string(b) -} diff --git a/vendor/github.com/gobuffalo/buffalo-plugins/plugins/plugdeps/plugdeps.go b/vendor/github.com/gobuffalo/buffalo-plugins/plugins/plugdeps/plugdeps.go deleted file mode 100644 index bc1cf570c..000000000 --- a/vendor/github.com/gobuffalo/buffalo-plugins/plugins/plugdeps/plugdeps.go +++ /dev/null @@ -1,88 +0,0 @@ -package plugdeps - -import ( - "os" - "path/filepath" - "strings" - - "github.com/gobuffalo/meta" - "github.com/karrick/godirwalk" - "github.com/pkg/errors" -) - -// ErrMissingConfig is if config/buffalo-plugins.toml file is not found. Use plugdeps#On(app) to test if plugdeps are being used -var ErrMissingConfig = errors.Errorf("could not find a buffalo-plugins config file at %s", ConfigPath(meta.New("."))) - -// List all of the plugins the application depeneds on. Will return ErrMissingConfig -// if the app is not using config/buffalo-plugins.toml to manage their plugins. -// Use plugdeps#On(app) to test if plugdeps are being used. -func List(app meta.App) (*Plugins, error) { - plugs := New() - if app.WithPop { - plugs.Add(pop) - } - - lp, err := listLocal(app) - if err != nil { - return plugs, errors.WithStack(err) - } - plugs.Add(lp.List()...) - - if !On(app) { - return plugs, ErrMissingConfig - } - - p := ConfigPath(app) - tf, err := os.Open(p) - if err != nil { - return plugs, errors.WithStack(err) - } - if err := plugs.Decode(tf); err != nil { - return plugs, errors.WithStack(err) - } - - return plugs, nil -} - -func listLocal(app meta.App) (*Plugins, error) { - plugs := New() - proot := filepath.Join(app.Root, "plugins") - if _, err := os.Stat(proot); err != nil { - return plugs, nil - } - err := godirwalk.Walk(proot, &godirwalk.Options{ - FollowSymbolicLinks: true, - Callback: func(path string, info *godirwalk.Dirent) error { - if info.IsDir() { - return nil - } - base := filepath.Base(path) - if strings.HasPrefix(base, "buffalo-") { - plugs.Add(Plugin{ - Binary: base, - Local: "." + strings.TrimPrefix(path, app.Root), - }) - } - return nil - }, - }) - if err != nil { - return plugs, errors.WithStack(err) - } - - return plugs, nil -} - -// ConfigPath returns the path to the config/buffalo-plugins.toml file -// relative to the app -func ConfigPath(app meta.App) string { - return filepath.Join(app.Root, "config", "buffalo-plugins.toml") -} - -// On checks for the existence of config/buffalo-plugins.toml if this -// file exists its contents will be used to list plugins. If the file is not -// found, then the BUFFALO_PLUGIN_PATH and ./plugins folders are consulted. -func On(app meta.App) bool { - _, err := os.Stat(ConfigPath(app)) - return err == nil -} diff --git a/vendor/github.com/gobuffalo/buffalo-plugins/plugins/plugdeps/plugin.go b/vendor/github.com/gobuffalo/buffalo-plugins/plugins/plugdeps/plugin.go deleted file mode 100644 index 848345fe3..000000000 --- a/vendor/github.com/gobuffalo/buffalo-plugins/plugins/plugdeps/plugin.go +++ /dev/null @@ -1,26 +0,0 @@ -package plugdeps - -import ( - "encoding/json" - - "github.com/gobuffalo/meta" -) - -// Plugin represents a Go plugin for Buffalo applications -type Plugin struct { - Binary string `toml:"binary" json:"binary"` - GoGet string `toml:"go_get,omitempty" json:"go_get,omitempty"` - Local string `toml:"local,omitempty" json:"local,omitempty"` - Commands []Command `toml:"command,omitempty" json:"commands,omitempty"` - Tags meta.BuildTags `toml:"tags,omitempty" json:"tags,omitempty"` -} - -// String implementation of fmt.Stringer -func (p Plugin) String() string { - b, _ := json.Marshal(p) - return string(b) -} - -func (p Plugin) key() string { - return p.Binary + p.GoGet + p.Local -} diff --git a/vendor/github.com/gobuffalo/buffalo-plugins/plugins/plugdeps/plugins.go b/vendor/github.com/gobuffalo/buffalo-plugins/plugins/plugdeps/plugins.go deleted file mode 100644 index 5d264534f..000000000 --- a/vendor/github.com/gobuffalo/buffalo-plugins/plugins/plugdeps/plugins.go +++ /dev/null @@ -1,98 +0,0 @@ -package plugdeps - -import ( - "io" - "sort" - "sync" - - "github.com/BurntSushi/toml" - "github.com/pkg/errors" -) - -// Plugins manages the config/buffalo-plugins.toml file -// as well as the plugins available from the file. -type Plugins struct { - plugins map[string]Plugin - moot *sync.RWMutex -} - -// Encode the list of plugins, in TOML format, to the reader -func (plugs *Plugins) Encode(w io.Writer) error { - tp := tomlPlugins{ - Plugins: plugs.List(), - } - - if err := toml.NewEncoder(w).Encode(tp); err != nil { - return errors.WithStack(err) - } - return nil -} - -// Decode the list of plugins, in TOML format, from the reader -func (plugs *Plugins) Decode(r io.Reader) error { - tp := &tomlPlugins{ - Plugins: []Plugin{}, - } - if _, err := toml.DecodeReader(r, tp); err != nil { - return errors.WithStack(err) - } - for _, p := range tp.Plugins { - plugs.Add(p) - } - return nil -} - -// List of dependent plugins listed in order of Plugin.String() -func (plugs *Plugins) List() []Plugin { - m := map[string]Plugin{} - plugs.moot.RLock() - for _, p := range plugs.plugins { - m[p.key()] = p - } - plugs.moot.RUnlock() - var pp []Plugin - for _, v := range m { - pp = append(pp, v) - } - sort.Slice(pp, func(a, b int) bool { - return pp[a].Binary < pp[b].Binary - }) - return pp -} - -// Add plugin(s) to the list of dependencies -func (plugs *Plugins) Add(pp ...Plugin) { - plugs.moot.Lock() - for _, p := range pp { - plugs.plugins[p.key()] = p - } - plugs.moot.Unlock() -} - -// Remove plugin(s) from the list of dependencies -func (plugs *Plugins) Remove(pp ...Plugin) { - plugs.moot.Lock() - for _, p := range pp { - delete(plugs.plugins, p.key()) - } - plugs.moot.Unlock() -} - -// New returns a configured *Plugins value -func New() *Plugins { - plugs := &Plugins{ - plugins: map[string]Plugin{}, - moot: &sync.RWMutex{}, - } - plugs.Add(self) - return plugs -} - -type tomlPlugins struct { - Plugins []Plugin `toml:"plugin"` -} - -var self = Plugin{ - Binary: "buffalo-plugins", - GoGet: "github.com/gobuffalo/buffalo-plugins", -} diff --git a/vendor/github.com/gobuffalo/buffalo-plugins/plugins/plugdeps/pop.go b/vendor/github.com/gobuffalo/buffalo-plugins/plugins/plugdeps/pop.go deleted file mode 100644 index 504ac7b85..000000000 --- a/vendor/github.com/gobuffalo/buffalo-plugins/plugins/plugdeps/pop.go +++ /dev/null @@ -1,6 +0,0 @@ -package plugdeps - -var pop = Plugin{ - Binary: "buffalo-pop", - GoGet: "github.com/gobuffalo/buffalo-pop", -} diff --git a/vendor/github.com/gobuffalo/buffalo-plugins/plugins/plugins.go b/vendor/github.com/gobuffalo/buffalo-plugins/plugins/plugins.go deleted file mode 100644 index 0ea945686..000000000 --- a/vendor/github.com/gobuffalo/buffalo-plugins/plugins/plugins.go +++ /dev/null @@ -1,232 +0,0 @@ -package plugins - -import ( - "bytes" - "context" - "encoding/json" - "os" - "os/exec" - "path/filepath" - "strings" - "time" - - "github.com/gobuffalo/buffalo-plugins/plugins/plugdeps" - "github.com/gobuffalo/envy" - "github.com/gobuffalo/meta" - "github.com/karrick/godirwalk" - "github.com/markbates/oncer" - "github.com/pkg/errors" - "github.com/sirupsen/logrus" -) - -const timeoutEnv = "BUFFALO_PLUGIN_TIMEOUT" - -var t = time.Second * 2 - -func timeout() time.Duration { - oncer.Do("plugins.timeout", func() { - rawTimeout, err := envy.MustGet(timeoutEnv) - if err == nil { - if parsed, err := time.ParseDuration(rawTimeout); err == nil { - t = parsed - } else { - logrus.Errorf("%q value is malformed assuming default %q: %v", timeoutEnv, t, err) - } - } else { - logrus.Debugf("%q not set, assuming default of %v", timeoutEnv, t) - } - }) - return t -} - -// List maps a Buffalo command to a slice of Command -type List map[string]Commands - -var _list List - -// Available plugins for the `buffalo` command. -// It will look in $GOPATH/bin and the `./plugins` directory. -// This can be changed by setting the $BUFFALO_PLUGIN_PATH -// environment variable. -// -// Requirements: -// * file/command must be executable -// * file/command must start with `buffalo-` -// * file/command must respond to `available` and return JSON of -// plugins.Commands{} -// -// Limit full path scan with direct plugin path -// -// If a file/command doesn't respond to being invoked with `available` -// within one second, buffalo will assume that it is unable to load. This -// can be changed by setting the $BUFFALO_PLUGIN_TIMEOUT environment -// variable. It must be set to a duration that `time.ParseDuration` can -// process. -func Available() (List, error) { - var err error - oncer.Do("plugins.Available", func() { - defer func() { - if err := saveCache(); err != nil { - logrus.Error(err) - } - }() - - app := meta.New(".") - - if plugdeps.On(app) { - _list, err = listPlugDeps(app) - return - } - - paths := []string{"plugins"} - - from, err := envy.MustGet("BUFFALO_PLUGIN_PATH") - if err != nil { - from, err = envy.MustGet("GOPATH") - if err != nil { - return - } - from = filepath.Join(from, "bin") - } - - paths = append(paths, strings.Split(from, string(os.PathListSeparator))...) - - list := List{} - for _, p := range paths { - if ignorePath(p) { - continue - } - if _, err := os.Stat(p); err != nil { - continue - } - - err := godirwalk.Walk(p, &godirwalk.Options{ - FollowSymbolicLinks: true, - Callback: func(path string, info *godirwalk.Dirent) error { - if err != nil { - // May indicate a permissions problem with the path, skip it - return nil - } - if info.IsDir() { - return nil - } - base := filepath.Base(path) - if strings.HasPrefix(base, "buffalo-") { - ctx, cancel := context.WithTimeout(context.Background(), timeout()) - commands := askBin(ctx, path) - cancel() - for _, c := range commands { - bc := c.BuffaloCommand - if _, ok := list[bc]; !ok { - list[bc] = Commands{} - } - c.Binary = path - list[bc] = append(list[bc], c) - } - } - return nil - }, - }) - - if err != nil { - return - } - } - _list = list - }) - return _list, err -} - -func askBin(ctx context.Context, path string) Commands { - start := time.Now() - defer func() { - logrus.Debugf("askBin %s=%.4f s", path, time.Since(start).Seconds()) - }() - - commands := Commands{} - defer func() { - addToCache(path, cachedPlugin{ - Commands: commands, - }) - }() - if cp, ok := findInCache(path); ok { - s := sum(path) - if s == cp.CheckSum { - logrus.Debugf("cache hit: %s", path) - commands = cp.Commands - return commands - } - } - logrus.Debugf("cache miss: %s", path) - if strings.HasPrefix(filepath.Base(path), "buffalo-no-sqlite") { - return commands - } - - cmd := exec.CommandContext(ctx, path, "available") - bb := &bytes.Buffer{} - cmd.Stdout = bb - err := cmd.Run() - if err != nil { - return commands - } - msg := bb.String() - for len(msg) > 0 { - err = json.NewDecoder(strings.NewReader(msg)).Decode(&commands) - if err == nil { - return commands - } - msg = msg[1:] - } - logrus.Errorf("[PLUGIN] error decoding plugin %s: %s\n%s\n", path, err, msg) - return commands -} - -func ignorePath(p string) bool { - p = strings.ToLower(p) - for _, x := range []string{`c:\windows`, `c:\program`} { - if strings.HasPrefix(p, x) { - return true - } - } - return false -} - -func listPlugDeps(app meta.App) (List, error) { - list := List{} - plugs, err := plugdeps.List(app) - if err != nil { - return list, err - } - for _, p := range plugs.List() { - ctx, cancel := context.WithTimeout(context.Background(), timeout()) - defer cancel() - bin := p.Binary - if len(p.Local) != 0 { - bin = p.Local - } - bin, err := LookPath(bin) - if err != nil { - if errors.Cause(err) != ErrPlugMissing { - return list, err - } - continue - } - commands := askBin(ctx, bin) - cancel() - for _, c := range commands { - bc := c.BuffaloCommand - if _, ok := list[bc]; !ok { - list[bc] = Commands{} - } - c.Binary = p.Binary - for _, pc := range p.Commands { - if c.Name == pc.Name { - c.Flags = pc.Flags - break - } - } - list[bc] = append(list[bc], c) - } - } - return list, nil -} diff --git a/vendor/github.com/gobuffalo/buffalo-plugins/plugins/version.go b/vendor/github.com/gobuffalo/buffalo-plugins/plugins/version.go deleted file mode 100644 index 6a163595b..000000000 --- a/vendor/github.com/gobuffalo/buffalo-plugins/plugins/version.go +++ /dev/null @@ -1,3 +0,0 @@ -package plugins - -const Version = "v1.12.0" diff --git a/vendor/github.com/gobuffalo/envy/.env b/vendor/github.com/gobuffalo/envy/.env deleted file mode 100644 index 33eeb3b13..000000000 --- a/vendor/github.com/gobuffalo/envy/.env +++ /dev/null @@ -1,5 +0,0 @@ -# This is a comment -# We can use equal or colon notation -DIR: root -FLAVOUR: none -INSIDE_FOLDER=false \ No newline at end of file diff --git a/vendor/github.com/gobuffalo/envy/.gometalinter.json b/vendor/github.com/gobuffalo/envy/.gometalinter.json deleted file mode 100644 index e4f65a36e..000000000 --- a/vendor/github.com/gobuffalo/envy/.gometalinter.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "Enable": ["vet", "golint", "goimports", "deadcode", "gotype", "ineffassign", "misspell", "nakedret", "unconvert", "megacheck", "varcheck"] -} diff --git a/vendor/github.com/gobuffalo/envy/.travis.yml b/vendor/github.com/gobuffalo/envy/.travis.yml deleted file mode 100644 index 1fb041a25..000000000 --- a/vendor/github.com/gobuffalo/envy/.travis.yml +++ /dev/null @@ -1,36 +0,0 @@ -language: go - -sudo: false - -matrix: - include: - - os: linux - go: "1.9.x" - - os: windows - go: "1.9.x" - - os: linux - go: "1.10.x" - - os: windows - go: "1.10.x" - - os: linux - go: "1.11.x" - env: - - GO111MODULE=off - - os: windows - go: "1.11.x" - env: - - GO111MODULE=off - - os: linux - go: "1.11.x" - env: - - GO111MODULE=on - - os: windows - go: "1.11.x" - env: - - GO111MODULE=on - -install: false - -script: - - go get -v -t ./... - - go test -v -timeout=5s -race ./... diff --git a/vendor/github.com/gobuffalo/envy/LICENSE.txt b/vendor/github.com/gobuffalo/envy/LICENSE.txt deleted file mode 100644 index 123ddc0d8..000000000 --- a/vendor/github.com/gobuffalo/envy/LICENSE.txt +++ /dev/null @@ -1,8 +0,0 @@ -The MIT License (MIT) -Copyright (c) 2018 Mark Bates - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/github.com/gobuffalo/envy/Makefile b/vendor/github.com/gobuffalo/envy/Makefile deleted file mode 100644 index 46aece8ff..000000000 --- a/vendor/github.com/gobuffalo/envy/Makefile +++ /dev/null @@ -1,46 +0,0 @@ -TAGS ?= "sqlite" -GO_BIN ?= go - -install: - packr2 - $(GO_BIN) install -v . - -deps: - $(GO_BIN) get github.com/gobuffalo/release - $(GO_BIN) get github.com/gobuffalo/packr/v2/packr2 - $(GO_BIN) get -tags ${TAGS} -t ./... -ifeq ($(GO111MODULE),on) - $(GO_BIN) mod tidy -endif - -build: - packr2 - $(GO_BIN) build -v . - -test: - packr2 - $(GO_BIN) test -tags ${TAGS} ./... - -ci-test: - $(GO_BIN) test -tags ${TAGS} -race ./... - -lint: - gometalinter --vendor ./... --deadline=1m --skip=internal - -update: - $(GO_BIN) get -u -tags ${TAGS} -ifeq ($(GO111MODULE),on) - $(GO_BIN) mod tidy -endif - packr2 - make test - make install -ifeq ($(GO111MODULE),on) - $(GO_BIN) mod tidy -endif - -release-test: - $(GO_BIN) test -tags ${TAGS} -race ./... - -release: - release -y -f version.go diff --git a/vendor/github.com/gobuffalo/envy/README.md b/vendor/github.com/gobuffalo/envy/README.md deleted file mode 100644 index f54462a77..000000000 --- a/vendor/github.com/gobuffalo/envy/README.md +++ /dev/null @@ -1,93 +0,0 @@ -# envy -[![Build Status](https://travis-ci.org/gobuffalo/envy.svg?branch=master)](https://travis-ci.org/gobuffalo/envy) - -Envy makes working with ENV variables in Go trivial. - -* Get ENV variables with default values. -* Set ENV variables safely without affecting the underlying system. -* Temporarily change ENV vars; useful for testing. -* Map all of the key/values in the ENV. -* Loads .env files (by using [godotenv](https://github.com/joho/godotenv/)) -* More! - -## Installation - -```text -$ go get -u github.com/gobuffalo/envy -``` - -## Usage - -```go -func Test_Get(t *testing.T) { - r := require.New(t) - r.NotZero(os.Getenv("GOPATH")) - r.Equal(os.Getenv("GOPATH"), envy.Get("GOPATH", "foo")) - r.Equal("bar", envy.Get("IDONTEXIST", "bar")) -} - -func Test_MustGet(t *testing.T) { - r := require.New(t) - r.NotZero(os.Getenv("GOPATH")) - v, err := envy.MustGet("GOPATH") - r.NoError(err) - r.Equal(os.Getenv("GOPATH"), v) - - _, err = envy.MustGet("IDONTEXIST") - r.Error(err) -} - -func Test_Set(t *testing.T) { - r := require.New(t) - _, err := envy.MustGet("FOO") - r.Error(err) - - envy.Set("FOO", "foo") - r.Equal("foo", envy.Get("FOO", "bar")) -} - -func Test_Temp(t *testing.T) { - r := require.New(t) - - _, err := envy.MustGet("BAR") - r.Error(err) - - envy.Temp(func() { - envy.Set("BAR", "foo") - r.Equal("foo", envy.Get("BAR", "bar")) - _, err = envy.MustGet("BAR") - r.NoError(err) - }) - - _, err = envy.MustGet("BAR") - r.Error(err) -} -``` -## .env files support - -Envy now supports loading `.env` files by using the [godotenv library](https://github.com/joho/godotenv/). -That means one can use and define multiple `.env` files which will be loaded on-demand. By default, no env files will be loaded. To load one or more, you need to call the `envy.Load` function in one of the following ways: - -```go -envy.Load() // 1 - -envy.Load("MY_ENV_FILE") // 2 - -envy.Load(".env", ".env.prod") // 3 - -envy.Load(".env", "NON_EXISTING_FILE") // 4 - -// 5 -envy.Load(".env") -envy.Load("NON_EXISTING_FILE") - -// 6 -envy.Load(".env", "NON_EXISTING_FILE", ".env.prod") -``` - -1. Will load the default `.env` file -2. Will load the file `MY_ENV_FILE`, **but not** `.env` -3. Will load the file `.env`, and after that will load the `.env.prod` file. If any variable is redefined in `. env.prod` it will be overwritten (will contain the `env.prod` value) -4. Will load the `.env` file and return an error as the second file does not exist. The values in `.env` will be loaded and available. -5. Same as 4 -6. Will load the `.env` file and return an error as the second file does not exist. The values in `.env` will be loaded and available, **but the ones in** `.env.prod` **won't**. diff --git a/vendor/github.com/gobuffalo/envy/SHOULDERS.md b/vendor/github.com/gobuffalo/envy/SHOULDERS.md deleted file mode 100644 index 6c9cd7bdf..000000000 --- a/vendor/github.com/gobuffalo/envy/SHOULDERS.md +++ /dev/null @@ -1,16 +0,0 @@ -# `github.com/gobuffalo/envy` Stands on the Shoulders of Giants - -`github.com/gobuffalo/envy` does not try to reinvent the wheel! Instead, it uses the already great wheels developed by the Go community and puts them all together in the best way possible. Without these giants this project would not be possible. Please make sure to check them out and thank them for all of their hard work. - -Thank you to the following **GIANTS**: - - -* [github.com/gobuffalo/envy](https://godoc.org/github.com/gobuffalo/envy) - -* [github.com/joho/godotenv](https://godoc.org/github.com/joho/godotenv) - -* [github.com/rogpeppe/go-internal/modfile](https://godoc.org/github.com/rogpeppe/go-internal/modfile) - -* [github.com/rogpeppe/go-internal/module](https://godoc.org/github.com/rogpeppe/go-internal/module) - -* [github.com/rogpeppe/go-internal/semver](https://godoc.org/github.com/rogpeppe/go-internal/semver) diff --git a/vendor/github.com/gobuffalo/envy/envy.go b/vendor/github.com/gobuffalo/envy/envy.go deleted file mode 100644 index d3995f455..000000000 --- a/vendor/github.com/gobuffalo/envy/envy.go +++ /dev/null @@ -1,268 +0,0 @@ -/* -package envy makes working with ENV variables in Go trivial. - -* Get ENV variables with default values. -* Set ENV variables safely without affecting the underlying system. -* Temporarily change ENV vars; useful for testing. -* Map all of the key/values in the ENV. -* Loads .env files (by using [godotenv](https://github.com/joho/godotenv/)) -* More! -*/ -package envy - -import ( - "errors" - "flag" - "fmt" - "io/ioutil" - "os" - "os/exec" - "path/filepath" - "runtime" - "strings" - "sync" - - "github.com/joho/godotenv" - "github.com/rogpeppe/go-internal/modfile" -) - -var gil = &sync.RWMutex{} -var env = map[string]string{} - -// GO111MODULE is ENV for turning mods on/off -const GO111MODULE = "GO111MODULE" - -func init() { - Load() - loadEnv() -} - -// Load the ENV variables to the env map -func loadEnv() { - gil.Lock() - defer gil.Unlock() - - if os.Getenv("GO_ENV") == "" { - // if the flag "test.v" is *defined*, we're running as a unit test. Note that we don't care - // about v.Value (verbose test mode); we just want to know if the test environment has defined - // it. It's also possible that the flags are not yet fully parsed (i.e. flag.Parsed() == false), - // so we could not depend on v.Value anyway. - // - if v := flag.Lookup("test.v"); v != nil { - env["GO_ENV"] = "test" - } - } - - // set the GOPATH if using >= 1.8 and the GOPATH isn't set - if os.Getenv("GOPATH") == "" { - out, err := exec.Command("go", "env", "GOPATH").Output() - if err == nil { - gp := strings.TrimSpace(string(out)) - os.Setenv("GOPATH", gp) - } - } - - for _, e := range os.Environ() { - pair := strings.Split(e, "=") - env[pair[0]] = os.Getenv(pair[0]) - } -} - -func Mods() bool { - return Get(GO111MODULE, "off") == "on" -} - -// Reload the ENV variables. Useful if -// an external ENV manager has been used -func Reload() { - env = map[string]string{} - loadEnv() -} - -// Load .env files. Files will be loaded in the same order that are received. -// Redefined vars will override previously existing values. -// IE: envy.Load(".env", "test_env/.env") will result in DIR=test_env -// If no arg passed, it will try to load a .env file. -func Load(files ...string) error { - - // If no files received, load the default one - if len(files) == 0 { - err := godotenv.Overload() - if err == nil { - Reload() - } - return err - } - - // We received a list of files - for _, file := range files { - - // Check if it exists or we can access - if _, err := os.Stat(file); err != nil { - // It does not exist or we can not access. - // Return and stop loading - return err - } - - // It exists and we have permission. Load it - if err := godotenv.Overload(file); err != nil { - return err - } - - // Reload the env so all new changes are noticed - Reload() - - } - return nil -} - -// Get a value from the ENV. If it doesn't exist the -// default value will be returned. -func Get(key string, value string) string { - gil.RLock() - defer gil.RUnlock() - if v, ok := env[key]; ok { - return v - } - return value -} - -// Get a value from the ENV. If it doesn't exist -// an error will be returned -func MustGet(key string) (string, error) { - gil.RLock() - defer gil.RUnlock() - if v, ok := env[key]; ok { - return v, nil - } - return "", fmt.Errorf("could not find ENV var with %s", key) -} - -// Set a value into the ENV. This is NOT permanent. It will -// only affect values accessed through envy. -func Set(key string, value string) { - gil.Lock() - defer gil.Unlock() - env[key] = value -} - -// MustSet the value into the underlying ENV, as well as envy. -// This may return an error if there is a problem setting the -// underlying ENV value. -func MustSet(key string, value string) error { - gil.Lock() - defer gil.Unlock() - err := os.Setenv(key, value) - if err != nil { - return err - } - env[key] = value - return nil -} - -// Map all of the keys/values set in envy. -func Map() map[string]string { - gil.RLock() - defer gil.RUnlock() - cp := map[string]string{} - for k, v := range env { - cp[k] = v - } - return env -} - -// Temp makes a copy of the values and allows operation on -// those values temporarily during the run of the function. -// At the end of the function run the copy is discarded and -// the original values are replaced. This is useful for testing. -// Warning: This function is NOT safe to use from a goroutine or -// from code which may access any Get or Set function from a goroutine -func Temp(f func()) { - oenv := env - env = map[string]string{} - for k, v := range oenv { - env[k] = v - } - defer func() { env = oenv }() - f() -} - -func GoPath() string { - return Get("GOPATH", "") -} - -func GoBin() string { - return Get("GO_BIN", "go") -} - -func InGoPath() bool { - pwd, _ := os.Getwd() - for _, p := range GoPaths() { - if strings.HasPrefix(pwd, p) { - return true - } - } - return false -} - -// GoPaths returns all possible GOPATHS that are set. -func GoPaths() []string { - gp := Get("GOPATH", "") - if runtime.GOOS == "windows" { - return strings.Split(gp, ";") // Windows uses a different separator - } - return strings.Split(gp, ":") -} - -func importPath(path string) string { - path = strings.TrimPrefix(path, "/private") - for _, gopath := range GoPaths() { - srcpath := filepath.Join(gopath, "src") - rel, err := filepath.Rel(srcpath, path) - if err == nil { - return filepath.ToSlash(rel) - } - } - - // fallback to trim - rel := strings.TrimPrefix(path, filepath.Join(GoPath(), "src")) - rel = strings.TrimPrefix(rel, string(filepath.Separator)) - return filepath.ToSlash(rel) -} - -// CurrentModule will attempt to return the module name from `go.mod` if -// modules are enabled. -// If modules are not enabled it will fallback to using CurrentPackage instead. -func CurrentModule() (string, error) { - if !Mods() { - return CurrentPackage(), nil - } - moddata, err := ioutil.ReadFile("go.mod") - if err != nil { - return "", errors.New("go.mod cannot be read or does not exist while go module is enabled") - } - packagePath := modfile.ModulePath(moddata) - if packagePath == "" { - return "", errors.New("go.mod is malformed") - } - return packagePath, nil -} - -// CurrentPackage attempts to figure out the current package name from the PWD -// Use CurrentModule for a more accurate package name. -func CurrentPackage() string { - if Mods() { - } - pwd, _ := os.Getwd() - return importPath(pwd) -} - -func Environ() []string { - gil.RLock() - defer gil.RUnlock() - var e []string - for k, v := range env { - e = append(e, fmt.Sprintf("%s=%s", k, v)) - } - return e -} diff --git a/vendor/github.com/gobuffalo/envy/go.mod b/vendor/github.com/gobuffalo/envy/go.mod deleted file mode 100644 index d951b7ce1..000000000 --- a/vendor/github.com/gobuffalo/envy/go.mod +++ /dev/null @@ -1,8 +0,0 @@ -module github.com/gobuffalo/envy - -require ( - github.com/davecgh/go-spew v1.1.1 // indirect - github.com/joho/godotenv v1.3.0 - github.com/rogpeppe/go-internal v1.1.0 - github.com/stretchr/testify v1.3.0 -) diff --git a/vendor/github.com/gobuffalo/envy/go.sum b/vendor/github.com/gobuffalo/envy/go.sum deleted file mode 100644 index f11ef4ce5..000000000 --- a/vendor/github.com/gobuffalo/envy/go.sum +++ /dev/null @@ -1,17 +0,0 @@ -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc= -github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/rogpeppe/go-internal v1.1.0 h1:g0fH8RicVgNl+zVZDCDfbdWxAWoAEJyI7I3TZYXFiig= -github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= diff --git a/vendor/github.com/gobuffalo/envy/version.go b/vendor/github.com/gobuffalo/envy/version.go deleted file mode 100644 index 0bff116a5..000000000 --- a/vendor/github.com/gobuffalo/envy/version.go +++ /dev/null @@ -1,3 +0,0 @@ -package envy - -const Version = "v1.6.15" diff --git a/vendor/github.com/gobuffalo/events/.gometalinter.json b/vendor/github.com/gobuffalo/events/.gometalinter.json deleted file mode 100644 index e4f65a36e..000000000 --- a/vendor/github.com/gobuffalo/events/.gometalinter.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "Enable": ["vet", "golint", "goimports", "deadcode", "gotype", "ineffassign", "misspell", "nakedret", "unconvert", "megacheck", "varcheck"] -} diff --git a/vendor/github.com/gobuffalo/events/.travis.yml b/vendor/github.com/gobuffalo/events/.travis.yml deleted file mode 100644 index 1fb041a25..000000000 --- a/vendor/github.com/gobuffalo/events/.travis.yml +++ /dev/null @@ -1,36 +0,0 @@ -language: go - -sudo: false - -matrix: - include: - - os: linux - go: "1.9.x" - - os: windows - go: "1.9.x" - - os: linux - go: "1.10.x" - - os: windows - go: "1.10.x" - - os: linux - go: "1.11.x" - env: - - GO111MODULE=off - - os: windows - go: "1.11.x" - env: - - GO111MODULE=off - - os: linux - go: "1.11.x" - env: - - GO111MODULE=on - - os: windows - go: "1.11.x" - env: - - GO111MODULE=on - -install: false - -script: - - go get -v -t ./... - - go test -v -timeout=5s -race ./... diff --git a/vendor/github.com/gobuffalo/events/LICENSE b/vendor/github.com/gobuffalo/events/LICENSE deleted file mode 100644 index a538bcbf2..000000000 --- a/vendor/github.com/gobuffalo/events/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2018 Mark Bates - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/vendor/github.com/gobuffalo/events/Makefile b/vendor/github.com/gobuffalo/events/Makefile deleted file mode 100644 index dd51e08eb..000000000 --- a/vendor/github.com/gobuffalo/events/Makefile +++ /dev/null @@ -1,55 +0,0 @@ -TAGS ?= "sqlite" -GO_BIN ?= go - -install: - packr - $(GO_BIN) install -v . - make tidy - -tidy: -ifeq ($(GO111MODULE),on) - $(GO_BIN) mod tidy -else - echo skipping go mod tidy -endif - - -deps: - $(GO_BIN) get github.com/gobuffalo/release - $(GO_BIN) get github.com/gobuffalo/packr/packr - $(GO_BIN) get -tags ${TAGS} -t ./... - make tidy - -build: - packr - $(GO_BIN) build -v . - make tidy - -test: - packr - $(GO_BIN) test -tags ${TAGS} ./... - make tidy - -ci-test: - $(GO_BIN) test -tags ${TAGS} -race ./... - make tidy - -lint: - gometalinter --vendor ./... --deadline=1m --skip=internal - make tidy - -update: - $(GO_BIN) get -u -tags ${TAGS} - make tidy - packr - make test - make install - make tidy - -release-test: - $(GO_BIN) test -tags ${TAGS} -race ./... - make tidy - -release: - release -y -f version.go - make tidy diff --git a/vendor/github.com/gobuffalo/events/README.md b/vendor/github.com/gobuffalo/events/README.md deleted file mode 100644 index 38cc50878..000000000 --- a/vendor/github.com/gobuffalo/events/README.md +++ /dev/null @@ -1,99 +0,0 @@ -

    - -

    -GoDoc -Go Report Card -

    - -# github.com/gobuffalo/events - -**Note:** This package was first introduced to Buffalo in this [PR](https://github.com/gobuffalo/buffalo/pull/1305). Assuming the PR is merged Buffalo will not start emitting events until `v0.13.0-beta.2` or greater. - -A list of known emitted events can be found at [https://godoc.org/github.com/gobuffalo/events#pkg-constants](https://godoc.org/github.com/gobuffalo/events#pkg-constants) - -## Installation - -```bash -$ go get -u -v github.com/gobuffalo/events -``` - -## Listening For Events - -To listen for events you need to register an [`events#Listener`](https://godoc.org/github.com/gobuffalo/events#Listener) function first. - -```go -func init() { - // if you want to give your listener a nice name to identify itself - events.NamedListen("my-listener", func(e events.Event) { - fmt.Println("### e ->", e) - }) - - // if you don't care about identifying your listener - events.Listen(func(e events.Event) { - fmt.Println("### e ->", e) - }) -} -``` - -## Emitting Events - -```go -events.Emit(events.Event{ - Kind: "my-event", - Message: // optional message, - Payload: // optional payload, - Error: // optional error, -}) -``` - -There is only one required field when emitting an event, `Kind`. - -The `Kind` field is key to how people will interpret your messages, and should be constructed as such: `::`. - -In the examples below from [Buffalo](https://gobuffalo.io) you can see it is using the `buffalo:` name space for its events. - -```go -// EvtAppStart is emitted when buffalo.App#Serve is called -EvtAppStart = "buffalo:app:start" -// EvtAppStartErr is emitted when an error occurs calling buffalo.App#Serve -EvtAppStartErr = "buffalo:app:start:err" -// EvtAppStop is emitted when buffalo.App#Stop is called -EvtAppStop = "buffalo:app:stop" -// EvtAppStopErr is emitted when an error occurs calling buffalo.App#Stop -EvtAppStopErr = "buffalo:app:stop:err" -``` - -## Implementing a Manager - -By default `events` implements a basic manager for you. Should you want to replace that with your own implementation, perhaps that's backed by a proper message queue, you can implement the [`events#Manager`](https://godoc.org/github.com/gobuffalo/events#Manager) interface. - -```go -var _ events.Manager = MyManager{} -events.SetManager(MyManager{}) -``` - -## Listening via Buffalo Plugins - -Once Buffalo is actively emitting events, plugins, will be able to listen those events via their CLIs. - -To do so you can set the `BuffaloCommand` to `events` when telling Buffalo which plugin in commands are available. Buffalo will create a new listener that says the JSON version of the event to that command in question. - -```go -var availableCmd = &cobra.Command{ - Use: "available", - Short: "a list of available buffalo plugins", - RunE: func(cmd *cobra.Command, args []string) error { - plugs := plugins.Commands{ - {Name: "echo", UseCommand: "echo", BuffaloCommand: "events", Description: echoCmd.Short, Aliases: echoCmd.Aliases}, - } - return json.NewEncoder(os.Stdout).Encode(plugs) - }, -} - - -events.Emit(events.Event{ - Kind: "my-event", -}) - -// buffalo-foo echo "{\"kind\": \"my-event\"}" -``` diff --git a/vendor/github.com/gobuffalo/events/event.go b/vendor/github.com/gobuffalo/events/event.go deleted file mode 100644 index 3f7b89d81..000000000 --- a/vendor/github.com/gobuffalo/events/event.go +++ /dev/null @@ -1,56 +0,0 @@ -package events - -import ( - "encoding/json" - "errors" - "strings" -) - -// Event represents different events -// in the lifecycle of a Buffalo app -type Event struct { - // Kind is the "type" of event "app:start" - Kind string `json:"kind"` - // Message is optional - Message string `json:"message"` - // Payload is optional - Payload Payload `json:"payload"` - // Error is optional - Error error `json:"-"` -} - -func (e Event) String() string { - b, _ := e.MarshalJSON() - - return string(b) -} - -// MarshalJSON implements the json marshaler for an event -func (e Event) MarshalJSON() ([]byte, error) { - m := map[string]interface{}{ - "kind": e.Kind, - } - if len(e.Message) != 0 { - m["message"] = e.Message - } - if e.Error != nil { - m["error"] = e.Error.Error() - } - if len(e.Payload) != 0 { - m["payload"] = e.Payload - } - - return json.Marshal(m) -} - -// Validate that an event is ready to be emitted -func (e Event) Validate() error { - if len(e.Kind) == 0 { - return errors.New("kind can not be blank") - } - return nil -} - -func (e Event) IsError() bool { - return strings.HasSuffix(e.Kind, ":err") -} diff --git a/vendor/github.com/gobuffalo/events/events.go b/vendor/github.com/gobuffalo/events/events.go deleted file mode 100644 index 40d86cc0b..000000000 --- a/vendor/github.com/gobuffalo/events/events.go +++ /dev/null @@ -1,44 +0,0 @@ -package events - -import ( - "strings" - - "github.com/gobuffalo/mapi" -) - -type Payload = mapi.Mapi - -const ( - // ErrGeneral is emitted for general errors - ErrGeneral = "general:err" - // ErrPanic is emitted when a panic is recovered - ErrPanic = "panic:err" -) - -// Emit an event to all listeners -func Emit(e Event) error { - return boss.Emit(e) -} - -func EmitPayload(kind string, payload interface{}) error { - return EmitError(kind, nil, payload) -} - -func EmitError(kind string, err error, payload interface{}) error { - if err != nil && !strings.HasSuffix(kind, ":err") { - kind += ":err" - } - var pl Payload - pl, ok := payload.(Payload) - if !ok { - pl = Payload{ - "data": payload, - } - } - e := Event{ - Kind: kind, - Payload: pl, - Error: err, - } - return Emit(e) -} diff --git a/vendor/github.com/gobuffalo/events/filter.go b/vendor/github.com/gobuffalo/events/filter.go deleted file mode 100644 index 1c6a01967..000000000 --- a/vendor/github.com/gobuffalo/events/filter.go +++ /dev/null @@ -1,24 +0,0 @@ -package events - -import ( - "regexp" - - "github.com/markbates/safe" -) - -// Filter compiles the string as a regex and returns -// the original listener wrapped in a new listener -// that filters incoming events by the Kind -func Filter(s string, fn Listener) Listener { - if s == "" || s == "*" { - return fn - } - rx := regexp.MustCompile(s) - return func(e Event) { - if rx.MatchString(e.Kind) { - safe.Run(func() { - fn(e) - }) - } - } -} diff --git a/vendor/github.com/gobuffalo/events/go.mod b/vendor/github.com/gobuffalo/events/go.mod deleted file mode 100644 index 2619e4c29..000000000 --- a/vendor/github.com/gobuffalo/events/go.mod +++ /dev/null @@ -1,12 +0,0 @@ -module github.com/gobuffalo/events - -require ( - github.com/gobuffalo/buffalo-plugins v1.12.0 - github.com/gobuffalo/envy v1.6.12 - github.com/gobuffalo/mapi v1.0.1 - github.com/gobuffalo/packr/v2 v2.0.0-rc.15 - github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2 - github.com/markbates/safe v1.0.1 - github.com/pkg/errors v0.8.1 - github.com/stretchr/testify v1.3.0 -) diff --git a/vendor/github.com/gobuffalo/events/go.sum b/vendor/github.com/gobuffalo/events/go.sum deleted file mode 100644 index feda9f952..000000000 --- a/vendor/github.com/gobuffalo/events/go.sum +++ /dev/null @@ -1,398 +0,0 @@ -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= -github.com/ajg/form v0.0.0-20160822230020-523a5da1a92f/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= -github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= -github.com/cockroachdb/cockroach-go v0.0.0-20181001143604-e0a95dfd547c/go.mod h1:XGLbWH/ujMcbPbhZq52Nv6UrCghb1yGn//133kEsvDk= -github.com/codegangsta/negroni v1.0.0/go.mod h1:v0y3T5G7Y1UlFfyxFn/QLRU4a2EuNau2iZY63YTKWo0= -github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= -github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dustin/go-humanize v0.0.0-20180713052910-9f541cc9db5d/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/structs v1.0.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= -github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= -github.com/gobuffalo/buffalo v0.12.8-0.20181004233540-fac9bb505aa8/go.mod h1:sLyT7/dceRXJUxSsE813JTQtA3Eb1vjxWfo/N//vXIY= -github.com/gobuffalo/buffalo v0.13.0/go.mod h1:Mjn1Ba9wpIbpbrD+lIDMy99pQ0H0LiddMIIDGse7qT4= -github.com/gobuffalo/buffalo-plugins v1.0.2/go.mod h1:pOp/uF7X3IShFHyobahTkTLZaeUXwb0GrUTb9ngJWTs= -github.com/gobuffalo/buffalo-plugins v1.0.4/go.mod h1:pWS1vjtQ6uD17MVFWf7i3zfThrEKWlI5+PYLw/NaDB4= -github.com/gobuffalo/buffalo-plugins v1.4.3/go.mod h1:uCzTY0woez4nDMdQjkcOYKanngeUVRO2HZi7ezmAjWY= -github.com/gobuffalo/buffalo-plugins v1.5.1/go.mod h1:jbmwSZK5+PiAP9cC09VQOrGMZFCa/P0UMlIS3O12r5w= -github.com/gobuffalo/buffalo-plugins v1.6.4/go.mod h1:/+N1aophkA2jZ1ifB2O3Y9yGwu6gKOVMtUmJnbg+OZI= -github.com/gobuffalo/buffalo-plugins v1.6.5/go.mod h1:0HVkbgrVs/MnPZ/FOseDMVanCTm2RNcdM0PuXcL1NNI= -github.com/gobuffalo/buffalo-plugins v1.6.7/go.mod h1:ZGZRkzz2PiKWHs0z7QsPBOTo2EpcGRArMEym6ghKYgk= -github.com/gobuffalo/buffalo-plugins v1.6.9/go.mod h1:yYlYTrPdMCz+6/+UaXg5Jm4gN3xhsvsQ2ygVatZV5vw= -github.com/gobuffalo/buffalo-plugins v1.6.11/go.mod h1:eAA6xJIL8OuynJZ8amXjRmHND6YiusVAaJdHDN1Lu8Q= -github.com/gobuffalo/buffalo-plugins v1.8.2/go.mod h1:9te6/VjEQ7pKp7lXlDIMqzxgGpjlKoAcAANdCgoR960= -github.com/gobuffalo/buffalo-plugins v1.8.3/go.mod h1:IAWq6vjZJVXebIq2qGTLOdlXzmpyTZ5iJG5b59fza5U= -github.com/gobuffalo/buffalo-plugins v1.9.4/go.mod h1:grCV6DGsQlVzQwk6XdgcL3ZPgLm9BVxlBmXPMF8oBHI= -github.com/gobuffalo/buffalo-plugins v1.10.0/go.mod h1:4osg8d9s60txLuGwXnqH+RCjPHj9K466cDFRl3PErHI= -github.com/gobuffalo/buffalo-plugins v1.11.0/go.mod h1:rtIvAYRjYibgmWhnjKmo7OadtnxuMG5ZQLr25ozAzjg= -github.com/gobuffalo/buffalo-plugins v1.12.0 h1:5rvYQ7mwfPwUW9zqcMd9ahWtPVOOouMKZjv88q45Z7c= -github.com/gobuffalo/buffalo-plugins v1.12.0/go.mod h1:kw4Mj2vQXqe4X5TI36PEQgswbL30heGQwJEeDKd1v+4= -github.com/gobuffalo/buffalo-pop v1.0.5/go.mod h1:Fw/LfFDnSmB/vvQXPvcXEjzP98Tc+AudyNWUBWKCwQ8= -github.com/gobuffalo/envy v1.6.4/go.mod h1:Abh+Jfw475/NWtYMEt+hnJWRiC8INKWibIMyNt1w2Mc= -github.com/gobuffalo/envy v1.6.5/go.mod h1:N+GkhhZ/93bGZc6ZKhJLP6+m+tCNPKwgSpH9kaifseQ= -github.com/gobuffalo/envy v1.6.6/go.mod h1:N+GkhhZ/93bGZc6ZKhJLP6+m+tCNPKwgSpH9kaifseQ= -github.com/gobuffalo/envy v1.6.7/go.mod h1:N+GkhhZ/93bGZc6ZKhJLP6+m+tCNPKwgSpH9kaifseQ= -github.com/gobuffalo/envy v1.6.8/go.mod h1:N+GkhhZ/93bGZc6ZKhJLP6+m+tCNPKwgSpH9kaifseQ= -github.com/gobuffalo/envy v1.6.9/go.mod h1:N+GkhhZ/93bGZc6ZKhJLP6+m+tCNPKwgSpH9kaifseQ= -github.com/gobuffalo/envy v1.6.10/go.mod h1:X0CFllQjTV5ogsnUrg+Oks2yTI+PU2dGYBJOEI2D1Uo= -github.com/gobuffalo/envy v1.6.11/go.mod h1:Fiq52W7nrHGDggFPhn2ZCcHw4u/rqXkqo+i7FB6EAcg= -github.com/gobuffalo/envy v1.6.12 h1:zkhss8DXz/pty2HAyA8BnvWMTYxo4gjd4+WCnYovoxY= -github.com/gobuffalo/envy v1.6.12/go.mod h1:qJNrJhKkZpEW0glh5xP2syQHH5kgdmgsKss2Kk8PTP0= -github.com/gobuffalo/events v1.0.3/go.mod h1:Txo8WmqScapa7zimEQIwgiJBvMECMe9gJjsKNPN3uZw= -github.com/gobuffalo/events v1.0.7/go.mod h1:z8txf6H9jWhQ5Scr7YPLWg/cgXBRj8Q4uYI+rsVCCSQ= -github.com/gobuffalo/events v1.0.8/go.mod h1:A5KyqT1sA+3GJiBE4QKZibse9mtOcI9nw8gGrDdqYGs= -github.com/gobuffalo/events v1.1.3/go.mod h1:9yPGWYv11GENtzrIRApwQRMYSbUgCsZ1w6R503fCfrk= -github.com/gobuffalo/events v1.1.4/go.mod h1:09/YRRgZHEOts5Isov+g9X2xajxdvOAcUuAHIX/O//A= -github.com/gobuffalo/events v1.1.5/go.mod h1:3YUSzgHfYctSjEjLCWbkXP6djH2M+MLaVRzb4ymbAK0= -github.com/gobuffalo/events v1.1.7/go.mod h1:6fGqxH2ing5XMb3EYRq9LEkVlyPGs4oO/eLzh+S8CxY= -github.com/gobuffalo/events v1.1.8/go.mod h1:UFy+W6X6VbCWS8k2iT81HYX65dMtiuVycMy04cplt/8= -github.com/gobuffalo/events v1.1.9/go.mod h1:/0nf8lMtP5TkgNbzYxR6Bl4GzBy5s5TebgNTdRfRbPM= -github.com/gobuffalo/fizz v1.0.12/go.mod h1:C0sltPxpYK8Ftvf64kbsQa2yiCZY4RZviurNxXdAKwc= -github.com/gobuffalo/flect v0.0.0-20180907193754-dc14d8acaf9f/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA= -github.com/gobuffalo/flect v0.0.0-20181002182613-4571df4b1daf/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA= -github.com/gobuffalo/flect v0.0.0-20181007231023-ae7ed6bfe683/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA= -github.com/gobuffalo/flect v0.0.0-20181018182602-fd24a256709f/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA= -github.com/gobuffalo/flect v0.0.0-20181019110701-3d6f0b585514/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA= -github.com/gobuffalo/flect v0.0.0-20181024204909-8f6be1a8c6c2/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA= -github.com/gobuffalo/flect v0.0.0-20181104133451-1f6e9779237a/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA= -github.com/gobuffalo/flect v0.0.0-20181114183036-47375f6d8328/go.mod h1:0HvNbHdfh+WOvDSIASqJOSxTOWSxCCUF++k/Y53v9rI= -github.com/gobuffalo/flect v0.0.0-20181210151238-24a2b68e0316/go.mod h1:en58vff74S9b99Eg42Dr+/9yPu437QjlNsO/hBYPuOk= -github.com/gobuffalo/flect v0.0.0-20190104192022-4af577e09bf2/go.mod h1:en58vff74S9b99Eg42Dr+/9yPu437QjlNsO/hBYPuOk= -github.com/gobuffalo/flect v0.0.0-20190117212819-a62e61d96794 h1:HZOs07hF3AmoaUj4HJQHV5RqfOuGnPZI7aFcireIrww= -github.com/gobuffalo/flect v0.0.0-20190117212819-a62e61d96794/go.mod h1:397QT6v05LkZkn07oJXXT6y9FCfwC8Pug0WA2/2mE9k= -github.com/gobuffalo/genny v0.0.0-20180924032338-7af3a40f2252/go.mod h1:tUTQOogrr7tAQnhajMSH6rv1BVev34H2sa1xNHMy94g= -github.com/gobuffalo/genny v0.0.0-20181003150629-3786a0744c5d/go.mod h1:WAd8HmjMVrnkAZbmfgH5dLBUchsZfqzp/WS5sQz+uTM= -github.com/gobuffalo/genny v0.0.0-20181005145118-318a41a134cc/go.mod h1:WAd8HmjMVrnkAZbmfgH5dLBUchsZfqzp/WS5sQz+uTM= -github.com/gobuffalo/genny v0.0.0-20181007153042-b8de7d566757/go.mod h1:+oG5Ljrw04czAHbPXREwaFojJbpUvcIy4DiOnbEJFTA= -github.com/gobuffalo/genny v0.0.0-20181012161047-33e5f43d83a6/go.mod h1:+oG5Ljrw04czAHbPXREwaFojJbpUvcIy4DiOnbEJFTA= -github.com/gobuffalo/genny v0.0.0-20181017160347-90a774534246/go.mod h1:+oG5Ljrw04czAHbPXREwaFojJbpUvcIy4DiOnbEJFTA= -github.com/gobuffalo/genny v0.0.0-20181024195656-51392254bf53/go.mod h1:o9GEH5gn5sCKLVB5rHFC4tq40rQ3VRUzmx6WwmaqISE= -github.com/gobuffalo/genny v0.0.0-20181025145300-af3f81d526b8/go.mod h1:uZ1fFYvdcP8mu0B/Ynarf6dsGvp7QFIpk/QACUuFUVI= -github.com/gobuffalo/genny v0.0.0-20181027191429-94d6cfb5c7fc/go.mod h1:x7SkrQQBx204Y+O9EwRXeszLJDTaWN0GnEasxgLrQTA= -github.com/gobuffalo/genny v0.0.0-20181027195209-3887b7171c4f/go.mod h1:JbKx8HSWICu5zyqWOa0dVV1pbbXOHusrSzQUprW6g+w= -github.com/gobuffalo/genny v0.0.0-20181106193839-7dcb0924caf1/go.mod h1:x61yHxvbDCgQ/7cOAbJCacZQuHgB0KMSzoYcw5debjU= -github.com/gobuffalo/genny v0.0.0-20181107223128-f18346459dbe/go.mod h1:utQD3aKKEsdb03oR+Vi/6ztQb1j7pO10N3OBoowRcSU= -github.com/gobuffalo/genny v0.0.0-20181114215459-0a4decd77f5d/go.mod h1:kN2KZ8VgXF9VIIOj/GM0Eo7YK+un4Q3tTreKOf0q1ng= -github.com/gobuffalo/genny v0.0.0-20181119162812-e8ff4adce8bb/go.mod h1:BA9htSe4bZwBDJLe8CUkoqkypq3hn3+CkoHqVOW718E= -github.com/gobuffalo/genny v0.0.0-20181127225641-2d959acc795b/go.mod h1:l54xLXNkteX/PdZ+HlgPk1qtcrgeOr3XUBBPDbH+7CQ= -github.com/gobuffalo/genny v0.0.0-20181128191930-77e34f71ba2a/go.mod h1:FW/D9p7cEEOqxYA71/hnrkOWm62JZ5ZNxcNIVJEaWBU= -github.com/gobuffalo/genny v0.0.0-20181203165245-fda8bcce96b1/go.mod h1:wpNSANu9UErftfiaAlz1pDZclrYzLtO5lALifODyjuM= -github.com/gobuffalo/genny v0.0.0-20181203201232-849d2c9534ea/go.mod h1:wpNSANu9UErftfiaAlz1pDZclrYzLtO5lALifODyjuM= -github.com/gobuffalo/genny v0.0.0-20181206121324-d6fb8a0dbe36/go.mod h1:wpNSANu9UErftfiaAlz1pDZclrYzLtO5lALifODyjuM= -github.com/gobuffalo/genny v0.0.0-20181207164119-84844398a37d/go.mod h1:y0ysCHGGQf2T3vOhCrGHheYN54Y/REj0ayd0Suf4C/8= -github.com/gobuffalo/genny v0.0.0-20181211165820-e26c8466f14d/go.mod h1:sHnK+ZSU4e2feXP3PA29ouij6PUEiN+RCwECjCTB3yM= -github.com/gobuffalo/genny v0.0.0-20190104222617-a71664fc38e7/go.mod h1:QPsQ1FnhEsiU8f+O0qKWXz2RE4TiDqLVChWkBuh1WaY= -github.com/gobuffalo/genny v0.0.0-20190112155932-f31a84fcacf5/go.mod h1:CIaHCrSIuJ4il6ka3Hub4DR4adDrGoXGEEt2FbBxoIo= -github.com/gobuffalo/genny v0.0.0-20190124191459-3310289fa4b4 h1:0hgER6ADOc40ws1xYtrSjYq7OQqMz/LsgaGooEz9RqY= -github.com/gobuffalo/genny v0.0.0-20190124191459-3310289fa4b4/go.mod h1:yIRqxhZV2sAzb+B3iPUMLauTRrYP8tJUlZ1zV9teKik= -github.com/gobuffalo/github_flavored_markdown v1.0.4/go.mod h1:uRowCdK+q8d/RF0Kt3/DSalaIXbb0De/dmTqMQdkQ4I= -github.com/gobuffalo/github_flavored_markdown v1.0.5/go.mod h1:U0643QShPF+OF2tJvYNiYDLDGDuQmJZXsf/bHOJPsMY= -github.com/gobuffalo/github_flavored_markdown v1.0.7/go.mod h1:w93Pd9Lz6LvyQXEG6DktTPHkOtCbr+arAD5mkwMzXLI= -github.com/gobuffalo/httptest v1.0.2/go.mod h1:7T1IbSrg60ankme0aDLVnEY0h056g9M1/ZvpVThtB7E= -github.com/gobuffalo/licenser v0.0.0-20180924033006-eae28e638a42/go.mod h1:Ubo90Np8gpsSZqNScZZkVXXAo5DGhTb+WYFIjlnog8w= -github.com/gobuffalo/licenser v0.0.0-20181025145548-437d89de4f75/go.mod h1:x3lEpYxkRG/XtGCUNkio+6RZ/dlOvLzTI9M1auIwFcw= -github.com/gobuffalo/licenser v0.0.0-20181027200154-58051a75da95/go.mod h1:BzhaaxGd1tq1+OLKObzgdCV9kqVhbTulxOpYbvMQWS0= -github.com/gobuffalo/licenser v0.0.0-20181109171355-91a2a7aac9a7/go.mod h1:m+Ygox92pi9bdg+gVaycvqE8RVSjZp7mWw75+K5NPHk= -github.com/gobuffalo/licenser v0.0.0-20181128165715-cc7305f8abed/go.mod h1:oU9F9UCE+AzI/MueCKZamsezGOOHfSirltllOVeRTAE= -github.com/gobuffalo/licenser v0.0.0-20181203160806-fe900bbede07/go.mod h1:ph6VDNvOzt1CdfaWC+9XwcBnlSTBz2j49PBwum6RFaU= -github.com/gobuffalo/licenser v0.0.0-20181211173111-f8a311c51159/go.mod h1:ve/Ue99DRuvnTaLq2zKa6F4KtHiYf7W046tDjuGYPfM= -github.com/gobuffalo/logger v0.0.0-20181022175615-46cfb361fc27/go.mod h1:8sQkgyhWipz1mIctHF4jTxmJh1Vxhp7mP8IqbljgJZo= -github.com/gobuffalo/logger v0.0.0-20181027144941-73d08d2bb969/go.mod h1:7uGg2duHKpWnN4+YmyKBdLXfhopkAdVM6H3nKbyFbz8= -github.com/gobuffalo/logger v0.0.0-20181027193913-9cf4dd0efe46/go.mod h1:7uGg2duHKpWnN4+YmyKBdLXfhopkAdVM6H3nKbyFbz8= -github.com/gobuffalo/logger v0.0.0-20181109185836-3feeab578c17/go.mod h1:oNErH0xLe+utO+OW8ptXMSA5DkiSEDW1u3zGIt8F9Ew= -github.com/gobuffalo/logger v0.0.0-20181117211126-8e9b89b7c264/go.mod h1:5etB91IE0uBlw9k756fVKZJdS+7M7ejVhmpXXiSFj0I= -github.com/gobuffalo/logger v0.0.0-20181127160119-5b956e21995c/go.mod h1:+HxKANrR9VGw9yN3aOAppJKvhO05ctDi63w4mDnKv2U= -github.com/gobuffalo/makr v1.1.5/go.mod h1:Y+o0btAH1kYAMDJW/TX3+oAXEu0bmSLLoC9mIFxtzOw= -github.com/gobuffalo/mapi v1.0.0/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= -github.com/gobuffalo/mapi v1.0.1/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= -github.com/gobuffalo/meta v0.0.0-20181018155829-df62557efcd3/go.mod h1:XTTOhwMNryif3x9LkTTBO/Llrveezd71u3quLd0u7CM= -github.com/gobuffalo/meta v0.0.0-20181018192820-8c6cef77dab3/go.mod h1:E94EPzx9NERGCY69UWlcj6Hipf2uK/vnfrF4QD0plVE= -github.com/gobuffalo/meta v0.0.0-20181025145500-3a985a084b0a/go.mod h1:YDAKBud2FP7NZdruCSlmTmDOZbVSa6bpK7LJ/A/nlKg= -github.com/gobuffalo/meta v0.0.0-20181114191255-b130ebedd2f7/go.mod h1:K6cRZ29ozr4Btvsqkjvg5nDFTLOgTqf03KA70Ks0ypE= -github.com/gobuffalo/meta v0.0.0-20181127070345-0d7e59dd540b/go.mod h1:RLO7tMvE0IAKAM8wny1aN12pvEKn7EtkBLkUZR00Qf8= -github.com/gobuffalo/meta v0.0.0-20190120163247-50bbb1fa260d/go.mod h1:KKsH44nIK2gA8p0PJmRT9GvWJUdphkDUA8AJEvFWiqM= -github.com/gobuffalo/meta v0.0.0-20190121163014-ecaa953cbfb3 h1:JzhweLavqD8ZNLOIBRvE5IPyp+sw/wYQmL9c5XwZuHI= -github.com/gobuffalo/meta v0.0.0-20190121163014-ecaa953cbfb3/go.mod h1:KLfkGnS+Tucc+iTkUcAUBtxpwOJGfhw2pHRLddPxMQY= -github.com/gobuffalo/mw-basicauth v1.0.3/go.mod h1:dg7+ilMZOKnQFHDefUzUHufNyTswVUviCBgF244C1+0= -github.com/gobuffalo/mw-contenttype v0.0.0-20180802152300-74f5a47f4d56/go.mod h1:7EvcmzBbeCvFtQm5GqF9ys6QnCxz2UM1x0moiWLq1No= -github.com/gobuffalo/mw-csrf v0.0.0-20180802151833-446ff26e108b/go.mod h1:sbGtb8DmDZuDUQoxjr8hG1ZbLtZboD9xsn6p77ppcHo= -github.com/gobuffalo/mw-forcessl v0.0.0-20180802152810-73921ae7a130/go.mod h1:JvNHRj7bYNAMUr/5XMkZaDcw3jZhUZpsmzhd//FFWmQ= -github.com/gobuffalo/mw-i18n v0.0.0-20180802152014-e3060b7e13d6/go.mod h1:91AQfukc52A6hdfIfkxzyr+kpVYDodgAeT5cjX1UIj4= -github.com/gobuffalo/mw-paramlogger v0.0.0-20181005191442-d6ee392ec72e/go.mod h1:6OJr6VwSzgJMqWMj7TYmRUqzNe2LXu/W1rRW4MAz/ME= -github.com/gobuffalo/mw-tokenauth v0.0.0-20181001105134-8545f626c189/go.mod h1:UqBF00IfKvd39ni5+yI5MLMjAf4gX7cDKN/26zDOD6c= -github.com/gobuffalo/packd v0.0.0-20181027182251-01ad393492c8/go.mod h1:SmdBdhj6uhOsg1Ui4SFAyrhuc7U4VCildosO5IDJ3lc= -github.com/gobuffalo/packd v0.0.0-20181027190505-aafc0d02c411/go.mod h1:SmdBdhj6uhOsg1Ui4SFAyrhuc7U4VCildosO5IDJ3lc= -github.com/gobuffalo/packd v0.0.0-20181027194105-7ae579e6d213/go.mod h1:SmdBdhj6uhOsg1Ui4SFAyrhuc7U4VCildosO5IDJ3lc= -github.com/gobuffalo/packd v0.0.0-20181031195726-c82734870264/go.mod h1:Yf2toFaISlyQrr5TfO3h6DB9pl9mZRmyvBGQb/aQ/pI= -github.com/gobuffalo/packd v0.0.0-20181104210303-d376b15f8e96/go.mod h1:Yf2toFaISlyQrr5TfO3h6DB9pl9mZRmyvBGQb/aQ/pI= -github.com/gobuffalo/packd v0.0.0-20181111195323-b2e760a5f0ff/go.mod h1:Yf2toFaISlyQrr5TfO3h6DB9pl9mZRmyvBGQb/aQ/pI= -github.com/gobuffalo/packd v0.0.0-20181114190715-f25c5d2471d7/go.mod h1:Yf2toFaISlyQrr5TfO3h6DB9pl9mZRmyvBGQb/aQ/pI= -github.com/gobuffalo/packd v0.0.0-20181124090624-311c6248e5fb/go.mod h1:Foenia9ZvITEvG05ab6XpiD5EfBHPL8A6hush8SJ0o8= -github.com/gobuffalo/packd v0.0.0-20181207120301-c49825f8f6f4/go.mod h1:LYc0TGKFBBFTRC9dg2pcRcMqGCTMD7T2BIMP7OBuQAA= -github.com/gobuffalo/packd v0.0.0-20181212173646-eca3b8fd6687 h1:uZ+G4JprR0UEq0aHZs+6eP7TEZuFfrIkmQWejIBV/QQ= -github.com/gobuffalo/packd v0.0.0-20181212173646-eca3b8fd6687/go.mod h1:LYc0TGKFBBFTRC9dg2pcRcMqGCTMD7T2BIMP7OBuQAA= -github.com/gobuffalo/packr v1.13.7/go.mod h1:KkinLIn/n6+3tVXMwg6KkNvWwVsrRAz4ph+jgpk3Z24= -github.com/gobuffalo/packr v1.15.0/go.mod h1:t5gXzEhIviQwVlNx/+3SfS07GS+cZ2hn76WLzPp6MGI= -github.com/gobuffalo/packr v1.15.1/go.mod h1:IeqicJ7jm8182yrVmNbM6PR4g79SjN9tZLH8KduZZwE= -github.com/gobuffalo/packr v1.19.0/go.mod h1:MstrNkfCQhd5o+Ct4IJ0skWlxN8emOq8DsoT1G98VIU= -github.com/gobuffalo/packr v1.20.0/go.mod h1:JDytk1t2gP+my1ig7iI4NcVaXr886+N0ecUga6884zw= -github.com/gobuffalo/packr v1.21.0/go.mod h1:H00jGfj1qFKxscFJSw8wcL4hpQtPe1PfU2wa6sg/SR0= -github.com/gobuffalo/packr/v2 v2.0.0-rc.8/go.mod h1:y60QCdzwuMwO2R49fdQhsjCPv7tLQFR0ayzxxla9zes= -github.com/gobuffalo/packr/v2 v2.0.0-rc.9/go.mod h1:fQqADRfZpEsgkc7c/K7aMew3n4aF1Kji7+lIZeR98Fc= -github.com/gobuffalo/packr/v2 v2.0.0-rc.10/go.mod h1:4CWWn4I5T3v4c1OsJ55HbHlUEKNWMITG5iIkdr4Px4w= -github.com/gobuffalo/packr/v2 v2.0.0-rc.11/go.mod h1:JoieH/3h3U4UmatmV93QmqyPUdf4wVM9HELaHEu+3fk= -github.com/gobuffalo/packr/v2 v2.0.0-rc.12/go.mod h1:FV1zZTsVFi1DSCboO36Xgs4pzCZBjB/tDV9Cz/lSaR8= -github.com/gobuffalo/packr/v2 v2.0.0-rc.13/go.mod h1:2Mp7GhBFMdJlOK8vGfl7SYtfMP3+5roE39ejlfjw0rA= -github.com/gobuffalo/packr/v2 v2.0.0-rc.14/go.mod h1:06otbrNvDKO1eNQ3b8hst+1010UooI2MFg+B2Ze4MV8= -github.com/gobuffalo/packr/v2 v2.0.0-rc.15 h1:vSmYcMO6CtuNQvMSbEJeIJlaeZzz2zoxGLTy8HrDh80= -github.com/gobuffalo/packr/v2 v2.0.0-rc.15/go.mod h1:IMe7H2nJvcKXSF90y4X1rjYIRlNMJYCxEhssBXNZwWs= -github.com/gobuffalo/plush v3.7.16+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= -github.com/gobuffalo/plush v3.7.20+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= -github.com/gobuffalo/plush v3.7.21+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= -github.com/gobuffalo/plush v3.7.22+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= -github.com/gobuffalo/plush v3.7.23+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= -github.com/gobuffalo/plush v3.7.30+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= -github.com/gobuffalo/plush v3.7.31+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= -github.com/gobuffalo/plush v3.7.32+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= -github.com/gobuffalo/plush v3.7.33+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= -github.com/gobuffalo/plushgen v0.0.0-20181128164830-d29dcb966cb2/go.mod h1:r9QwptTFnuvSaSRjpSp4S2/4e2D3tJhARYbvEBcKSb4= -github.com/gobuffalo/plushgen v0.0.0-20181203163832-9fc4964505c2/go.mod h1:opEdT33AA2HdrIwK1aibqnTJDVVKXC02Bar/GT1YRVs= -github.com/gobuffalo/plushgen v0.0.0-20181207152837-eedb135bd51b/go.mod h1:Lcw7HQbEVm09sAQrCLzIxuhFbB3nAgp4c55E+UlynR0= -github.com/gobuffalo/plushgen v0.0.0-20190104222512-177cd2b872b3/go.mod h1:tYxCozi8X62bpZyKXYHw1ncx2ZtT2nFvG42kuLwYjoc= -github.com/gobuffalo/pop v4.8.2+incompatible/go.mod h1:DwBz3SD5SsHpTZiTubcsFWcVDpJWGsxjVjMPnkiThWg= -github.com/gobuffalo/pop v4.8.3+incompatible/go.mod h1:DwBz3SD5SsHpTZiTubcsFWcVDpJWGsxjVjMPnkiThWg= -github.com/gobuffalo/pop v4.8.4+incompatible/go.mod h1:DwBz3SD5SsHpTZiTubcsFWcVDpJWGsxjVjMPnkiThWg= -github.com/gobuffalo/release v1.0.35/go.mod h1:VtHFAKs61vO3wboCec5xr9JPTjYyWYcvaM3lclkc4x4= -github.com/gobuffalo/release v1.0.38/go.mod h1:VtHFAKs61vO3wboCec5xr9JPTjYyWYcvaM3lclkc4x4= -github.com/gobuffalo/release v1.0.42/go.mod h1:RPs7EtafH4oylgetOJpGP0yCZZUiO4vqHfTHJjSdpug= -github.com/gobuffalo/release v1.0.52/go.mod h1:RPs7EtafH4oylgetOJpGP0yCZZUiO4vqHfTHJjSdpug= -github.com/gobuffalo/release v1.0.53/go.mod h1:FdF257nd8rqhNaqtDWFGhxdJ/Ig4J7VcS3KL7n/a+aA= -github.com/gobuffalo/release v1.0.54/go.mod h1:Pe5/RxRa/BE8whDpGfRqSI7D1a0evGK1T4JDm339tJc= -github.com/gobuffalo/release v1.0.61/go.mod h1:mfIO38ujUNVDlBziIYqXquYfBF+8FDHUjKZgYC1Hj24= -github.com/gobuffalo/release v1.0.72/go.mod h1:NP5NXgg/IX3M5XmHmWR99D687/3Dt9qZtTK/Lbwc1hU= -github.com/gobuffalo/release v1.1.1/go.mod h1:Sluak1Xd6kcp6snkluR1jeXAogdJZpFFRzTYRs/2uwg= -github.com/gobuffalo/release v1.1.3/go.mod h1:CuXc5/m+4zuq8idoDt1l4va0AXAn/OSs08uHOfMVr8E= -github.com/gobuffalo/release v1.1.6/go.mod h1:18naWa3kBsqO0cItXZNJuefCKOENpbbUIqRL1g+p6z0= -github.com/gobuffalo/shoulders v1.0.1/go.mod h1:V33CcVmaQ4gRUmHKwq1fiTXuf8Gp/qjQBUL5tHPmvbA= -github.com/gobuffalo/syncx v0.0.0-20181120191700-98333ab04150/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw= -github.com/gobuffalo/syncx v0.0.0-20181120194010-558ac7de985f/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw= -github.com/gobuffalo/tags v2.0.11+incompatible/go.mod h1:9XmhOkyaB7UzvuY4UoZO4s67q8/xRMVJEaakauVQYeY= -github.com/gobuffalo/tags v2.0.14+incompatible/go.mod h1:9XmhOkyaB7UzvuY4UoZO4s67q8/xRMVJEaakauVQYeY= -github.com/gobuffalo/tags v2.0.15+incompatible/go.mod h1:9XmhOkyaB7UzvuY4UoZO4s67q8/xRMVJEaakauVQYeY= -github.com/gobuffalo/uuid v2.0.3+incompatible/go.mod h1:ErhIzkRhm0FtRuiE/PeORqcw4cVi1RtSpnwYrxuvkfE= -github.com/gobuffalo/uuid v2.0.4+incompatible/go.mod h1:ErhIzkRhm0FtRuiE/PeORqcw4cVi1RtSpnwYrxuvkfE= -github.com/gobuffalo/uuid v2.0.5+incompatible/go.mod h1:ErhIzkRhm0FtRuiE/PeORqcw4cVi1RtSpnwYrxuvkfE= -github.com/gobuffalo/validate v2.0.3+incompatible/go.mod h1:N+EtDe0J8252BgfzQUChBgfd6L93m9weay53EWFVsMM= -github.com/gobuffalo/x v0.0.0-20181003152136-452098b06085/go.mod h1:WevpGD+5YOreDJznWevcn8NTmQEW5STSBgIkpkjzqXc= -github.com/gobuffalo/x v0.0.0-20181007152206-913e47c59ca7/go.mod h1:9rDPXaB3kXdKWzMc4odGQQdG2e2DIEmANy5aSJ9yesY= -github.com/gofrs/uuid v3.1.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= -github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/pat v0.0.0-20180118222023-199c85a7f6d1/go.mod h1:YeAe0gNeiNT5hoiZRI4yiOky6jVdNvfO2N6Kav/HmxY= -github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= -github.com/gorilla/sessions v1.1.2/go.mod h1:8KCfur6+4Mqcc6S0FEfKuN15Vl5MgXW92AE8ovaJD0w= -github.com/gorilla/sessions v1.1.3/go.mod h1:8KCfur6+4Mqcc6S0FEfKuN15Vl5MgXW92AE8ovaJD0w= -github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/jackc/fake v0.0.0-20150926172116-812a484cc733/go.mod h1:WrMFNQdiFJ80sQsxDoMokWK1W5TQtxBFNpzWTD84ibQ= -github.com/jackc/pgx v3.2.0+incompatible/go.mod h1:0ZGrqGqkRlliWnWB4zKnWtjbSWbGkVEFm4TeybAXq+I= -github.com/jmoiron/sqlx v0.0.0-20180614180643-0dae4fefe7c0/go.mod h1:IiEW3SEiiErVyFdH8NTuWjSifiEQKUoyK3LNqr2kCHU= -github.com/joho/godotenv v1.2.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= -github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= -github.com/karrick/godirwalk v1.7.5/go.mod h1:2c9FRhkDxdIbgkOnCEvnSWs71Bhugbl46shStcFDJ34= -github.com/karrick/godirwalk v1.7.7/go.mod h1:2c9FRhkDxdIbgkOnCEvnSWs71Bhugbl46shStcFDJ34= -github.com/karrick/godirwalk v1.7.8 h1:VfG72pyIxgtC7+3X9CMHI0AOl4LwyRAg98WAgsvffi8= -github.com/karrick/godirwalk v1.7.8/go.mod h1:2c9FRhkDxdIbgkOnCEvnSWs71Bhugbl46shStcFDJ34= -github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= -github.com/konsorten/go-windows-terminal-sequences v0.0.0-20180402223658-b729f2633dfe/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/pty v1.1.3/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/markbates/deplist v1.0.4/go.mod h1:gRRbPbbuA8TmMiRvaOzUlRfzfjeCCBqX2A6arxN01MM= -github.com/markbates/deplist v1.0.5/go.mod h1:gRRbPbbuA8TmMiRvaOzUlRfzfjeCCBqX2A6arxN01MM= -github.com/markbates/going v1.0.2/go.mod h1:UWCk3zm0UKefHZ7l8BNqi26UyiEMniznk8naLdTcy6c= -github.com/markbates/going v1.0.3/go.mod h1:fQiT6v6yQar9UD6bd/D4Z5Afbk9J6BBVBtLiyY4gp2o= -github.com/markbates/grift v1.0.4/go.mod h1:wbmtW74veyx+cgfwFhlnnMWqhoz55rnHR47oMXzsyVs= -github.com/markbates/hmax v1.0.0/go.mod h1:cOkR9dktiESxIMu+65oc/r/bdY4bE8zZw3OLhLx0X2c= -github.com/markbates/inflect v1.0.0/go.mod h1:oTeZL2KHA7CUX6X+fovmK9OvIOFuqu0TwdQrZjLTh88= -github.com/markbates/inflect v1.0.1/go.mod h1:uv3UVNBe5qBIfCm8O8Q+DW+S1EopeyINj+Ikhc7rnCk= -github.com/markbates/inflect v1.0.3/go.mod h1:1fR9+pO2KHEO9ZRtto13gDwwZaAKstQzferVeWqbgNs= -github.com/markbates/inflect v1.0.4/go.mod h1:1fR9+pO2KHEO9ZRtto13gDwwZaAKstQzferVeWqbgNs= -github.com/markbates/oncer v0.0.0-20180924031910-e862a676800b/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= -github.com/markbates/oncer v0.0.0-20180924034138-723ad0170a46/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= -github.com/markbates/oncer v0.0.0-20181014194634-05fccaae8fc4/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= -github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= -github.com/markbates/refresh v1.4.10/go.mod h1:NDPHvotuZmTmesXxr95C9bjlw1/0frJwtME2dzcVKhc= -github.com/markbates/safe v1.0.0/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= -github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= -github.com/markbates/sigtx v1.0.0/go.mod h1:QF1Hv6Ic6Ca6W+T+DL0Y/ypborFKyvUY9HmuCD4VeTc= -github.com/markbates/willie v1.0.9/go.mod h1:fsrFVWl91+gXpx/6dv715j7i11fYPfZ9ZGfH0DQzY7w= -github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= -github.com/microcosm-cc/bluemonday v1.0.1/go.mod h1:hsXNsILzKxV+sX77C5b8FSuKF00vh2OMYv+xgHpAMF4= -github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc= -github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/mapstructure v1.0.0/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/monoculum/formam v0.0.0-20180901015400-4e68be1d79ba/go.mod h1:RKgILGEJq24YyJ2ban8EO0RUVSJlF1pGsEvoLEACr/Q= -github.com/nicksnyder/go-i18n v1.10.0/go.mod h1:HrK7VCrbOvQoUAQ7Vpy7i87N7JZZZ7R2xBGjv0j365Q= -github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= -github.com/onsi/gomega v1.4.2/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/rogpeppe/go-internal v1.0.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.1.0 h1:g0fH8RicVgNl+zVZDCDfbdWxAWoAEJyI7I3TZYXFiig= -github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= -github.com/serenize/snaker v0.0.0-20171204205717-a683aaf2d516/go.mod h1:Yow6lPLSAXx2ifx470yD/nUe22Dv5vBvxK/UK9UUTVs= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= -github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= -github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= -github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ= -github.com/shurcooL/highlight_diff v0.0.0-20170515013008-09bb4053de1b/go.mod h1:ZpfEhSmds4ytuByIcDnOLkTHGUI6KNqRNPDLHDk+mUU= -github.com/shurcooL/highlight_go v0.0.0-20170515013102-78fb10f4a5f8/go.mod h1:UDKB5a1T23gOMUJrI+uSuH0VRDStOiUVSjBTRDVBVag= -github.com/shurcooL/octicon v0.0.0-20180602230221-c42b0e3b24d9/go.mod h1:eWdoE5JD4R5UVWDucdOPg1g2fqQRq78IQa9zlOV1vpQ= -github.com/shurcooL/sanitized_anchor_name v0.0.0-20170918181015-86672fcb3f95/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= -github.com/sirupsen/logrus v1.1.0/go.mod h1:zrgwTnHtNr00buQ1vSptGe8m1f/BbgsPukg8qsT7A+A= -github.com/sirupsen/logrus v1.1.1/go.mod h1:zrgwTnHtNr00buQ1vSptGe8m1f/BbgsPukg8qsT7A+A= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.3.0 h1:hI/7Q+DtNZ2kINb6qt/lS+IyXnHQe9e90POfeewL/ME= -github.com/sirupsen/logrus v1.3.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d/go.mod h1:UdhH50NIW0fCiwBSr0co2m7BnFLdv4fQTgdqdJTHFeE= -github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e/go.mod h1:HuIsMU8RRBOtsCgI77wP899iHVBQpCmg4ErYMZB+2IA= -github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.2.0/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= -github.com/spf13/cast v1.2.0/go.mod h1:r2rcYCSwa1IExKTDiTfzaxqT2FNHs8hODu4LnUfgKEg= -github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/pflag v1.0.2/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/viper v1.2.1/go.mod h1:P4AexN0a+C9tGAnUFNwDMYYZv3pjFuvmeiMyKRaNVlI= -github.com/spf13/viper v1.3.1/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/unrolled/secure v0.0.0-20180918153822-f340ee86eb8b/go.mod h1:mnPT77IAdsi/kV7+Es7y+pXALeV3h7G6dQF6mNYjcLA= -github.com/unrolled/secure v0.0.0-20181005190816-ff9db2ff917f/go.mod h1:mnPT77IAdsi/kV7+Es7y+pXALeV3h7G6dQF6mNYjcLA= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20180910181607-0e37d006457b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181001203147-e3636079e1a4/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181009213950-7c1a557ab941/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181015023909-0c41d7ab0a0e/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181024171144-74cb1d3d52f4/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181025113841-85e1b3f9139a/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181025213731-e84da0312774/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181106171534-e4dc69e5b2fd/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181112202954-3d3f9f413869/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181127143415-eb0de9b17e85/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190102171810-8d7daa0c54b3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190103213133-ff983b9c42bc h1:F5tKCVGp+MUAHhKp5MZtGqAlGX3+oCsiL1Q629FL90M= -golang.org/x/crypto v0.0.0-20190103213133-ff983b9c42bc/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180816102801-aaf60122140d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180921000356-2f5d2388922f/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180926154720-4dfa2610cdf3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181011144130-49bb7cea24b1/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181017193950-04a2e542c03f/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181102091132-c10e9556a7bc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181106065722-10aee1819953/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181207154023-610586996380/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180816055513-1c9583448a9c/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180906133057-8cf3aee42992/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180921163948-d47a0f339242/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180927150500-dad3d9fb7b6e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181005133103-4497e2df6f9e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181011152604-fa43e7bc11ba/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181022134430-8a28ead16f52/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181024145615-5cd93ef61a7c/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181025063200-d989b31c8746/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181026064943-731415f00dce/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181106135930-3a76605856fd/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181206074257-70b957f3b65e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190102155601-82a175fd1598/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190116161447-11f53e031339 h1:g/Jesu8+QLnA0CPzF3E1pURg0Byr7i6jLoX5sqjcAh0= -golang.org/x/sys v0.0.0-20190116161447-11f53e031339/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181003024731-2f84ea8ef872/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181006002542-f60d9635b16a/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181008205924-a2b3f7f249e9/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181013182035-5e66757b835f/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181017214349-06f26fdaaa28/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181024171208-a2dc47679d30/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181026183834-f60e5f99f081/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181105230042-78dc5bac0cac/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181107215632-34b416bd17b3/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181114190951-94339b83286c/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181119130350-139d099f6620/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181127195227-b4e97c0ed882/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181127232545-e782529d0ddd/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181203210056-e5f3ab76ea4b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181205224935-3576414c54a4/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181206194817-bcd4e47d0288/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181207183836-8bc39b988060/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181212172921-837e80568c09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190102213336-ca9055ed7d04/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190104182027-498d95493402/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190111214448-fc1d57b08d7b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190118193359-16909d206f00/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190124004107-78ee07aa9465 h1:z1zWb2F6a0UkU9Kyl0B4+xIt/1oatpNlk9B9wWku/mY= -golang.org/x/tools v0.0.0-20190124004107-78ee07aa9465/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= -gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc/go.mod h1:m7x9LTH6d71AHyAX77c9yqWCCa3UKHcVEj9y7hAtKDk= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= -gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df/go.mod h1:LRQQ+SO6ZHR7tOkpBDuZnXENFzX8qRjMDMyPD6BRkCw= -gopkg.in/mail.v2 v2.0.0-20180731213649-a0242b2233b4/go.mod h1:htwXN1Qh09vZJ1NVKxQqHPBaCBbzKhp5GzuJEA4VJWw= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/vendor/github.com/gobuffalo/events/listener.go b/vendor/github.com/gobuffalo/events/listener.go deleted file mode 100644 index 1f293e228..000000000 --- a/vendor/github.com/gobuffalo/events/listener.go +++ /dev/null @@ -1,36 +0,0 @@ -package events - -import ( - "fmt" - "runtime" - - "github.com/pkg/errors" -) - -// Listener is a function capable of handling events -type Listener func(e Event) - -// NamedListen for events. Name is the name of the -// listener NOT the events you want to listen for, -// so something like "my-listener", "kafka-listener", etc... -func NamedListen(name string, l Listener) (DeleteFn, error) { - return boss.Listen(name, l) -} - -// Listen for events. -func Listen(l Listener) (DeleteFn, error) { - _, file, line, _ := runtime.Caller(1) - return NamedListen(fmt.Sprintf("%s:%d", file, line), l) -} - -type listable interface { - List() ([]string, error) -} - -// List all listeners -func List() ([]string, error) { - if l, ok := boss.(listable); ok { - return l.List() - } - return []string{}, errors.Errorf("manager %T does not implemented listable", boss) -} diff --git a/vendor/github.com/gobuffalo/events/listener_map.go b/vendor/github.com/gobuffalo/events/listener_map.go deleted file mode 100644 index a6e727646..000000000 --- a/vendor/github.com/gobuffalo/events/listener_map.go +++ /dev/null @@ -1,73 +0,0 @@ -//go:generate mapgen -name "listener" -zero "nil" -go-type "Listener" -pkg "" -a "func(e) {}" -b "nil" -c "nil" -bb "nil" -destination "events" -// Code generated by github.com/gobuffalo/mapgen. DO NOT EDIT. - -package events - -import ( - "sort" - "sync" -) - -// listenerMap wraps sync.Map and uses the following types: -// key: string -// value: Listener -type listenerMap struct { - data sync.Map -} - -// Delete the key from the map -func (m *listenerMap) Delete(key string) { - m.data.Delete(key) -} - -// Load the key from the map. -// Returns Listener or bool. -// A false return indicates either the key was not found -// or the value is not of type Listener -func (m *listenerMap) Load(key string) (Listener, bool) { - i, ok := m.data.Load(key) - if !ok { - return nil, false - } - s, ok := i.(Listener) - return s, ok -} - -// LoadOrStore will return an existing key or -// store the value if not already in the map -func (m *listenerMap) LoadOrStore(key string, value Listener) (Listener, bool) { - i, _ := m.data.LoadOrStore(key, value) - s, ok := i.(Listener) - return s, ok -} - -// Range over the Listener values in the map -func (m *listenerMap) Range(f func(key string, value Listener) bool) { - m.data.Range(func(k, v interface{}) bool { - key, ok := k.(string) - if !ok { - return false - } - value, ok := v.(Listener) - if !ok { - return false - } - return f(key, value) - }) -} - -// Store a Listener in the map -func (m *listenerMap) Store(key string, value Listener) { - m.data.Store(key, value) -} - -// Keys returns a list of keys in the map -func (m *listenerMap) Keys() []string { - var keys []string - m.Range(func(key string, value Listener) bool { - keys = append(keys, key) - return true - }) - sort.Strings(keys) - return keys -} diff --git a/vendor/github.com/gobuffalo/events/manager.go b/vendor/github.com/gobuffalo/events/manager.go deleted file mode 100644 index 5dd879cfd..000000000 --- a/vendor/github.com/gobuffalo/events/manager.go +++ /dev/null @@ -1,86 +0,0 @@ -package events - -import ( - "strings" - - "github.com/markbates/safe" - "github.com/pkg/errors" -) - -type DeleteFn func() - -// Manager can be implemented to replace the default -// events manager -type Manager interface { - Listen(string, Listener) (DeleteFn, error) - Emit(Event) error -} - -// DefaultManager implements a map backed Manager -func DefaultManager() Manager { - return &manager{ - listeners: listenerMap{}, - } -} - -// SetManager allows you to replace the default -// event manager with a custom one -func SetManager(m Manager) { - boss = m -} - -var boss Manager = DefaultManager() -var _ listable = &manager{} - -type manager struct { - listeners listenerMap -} - -func (m *manager) Listen(name string, l Listener) (DeleteFn, error) { - _, ok := m.listeners.Load(name) - if ok { - return nil, errors.Errorf("listener named %s is already listening", name) - } - - m.listeners.Store(name, l) - - df := func() { - m.listeners.Delete(name) - } - - return df, nil -} - -func (m *manager) Emit(e Event) error { - if err := e.Validate(); err != nil { - return errors.WithStack(err) - } - e.Kind = strings.ToLower(e.Kind) - if e.IsError() && e.Error == nil { - e.Error = errors.New(e.Kind) - } - go func(e Event) { - m.listeners.Range(func(key string, l Listener) bool { - ex := Event{ - Kind: e.Kind, - Error: e.Error, - Message: e.Message, - Payload: Payload{}, - } - for k, v := range e.Payload { - ex.Payload[k] = v - } - go func(e Event, l Listener) { - safe.Run(func() { - l(e) - }) - }(ex, l) - return true - }) - }(e) - return nil -} - -func (m *manager) List() ([]string, error) { - return m.listeners.Keys(), nil -} diff --git a/vendor/github.com/gobuffalo/events/plugins.go b/vendor/github.com/gobuffalo/events/plugins.go deleted file mode 100644 index 0ba1f97fe..000000000 --- a/vendor/github.com/gobuffalo/events/plugins.go +++ /dev/null @@ -1,68 +0,0 @@ -package events - -import ( - "encoding/json" - "fmt" - "os" - "os/exec" - "strings" - - "github.com/gobuffalo/buffalo-plugins/plugins" - "github.com/gobuffalo/envy" - "github.com/markbates/oncer" - "github.com/markbates/safe" - "github.com/pkg/errors" -) - -// LoadPlugins will add listeners for any plugins that support "events" -func LoadPlugins() error { - var err error - oncer.Do("events.LoadPlugins", func() { - // don't send plugins events during testing - if envy.Get("GO_ENV", "development") == "test" { - return - } - plugs, err := plugins.Available() - if err != nil { - err = errors.WithStack(err) - return - } - for _, cmds := range plugs { - for _, c := range cmds { - if c.BuffaloCommand != "events" { - continue - } - err := func(c plugins.Command) error { - return safe.RunE(func() error { - n := fmt.Sprintf("[PLUGIN] %s %s", c.Binary, c.Name) - fn := func(e Event) { - b, err := json.Marshal(e) - if err != nil { - fmt.Println("error trying to marshal event", e, err) - return - } - cmd := exec.Command(c.Binary, c.UseCommand, string(b)) - cmd.Stderr = os.Stderr - cmd.Stdout = os.Stdout - cmd.Stdin = os.Stdin - if err := cmd.Run(); err != nil { - fmt.Println("error trying to send event", strings.Join(cmd.Args, " "), err) - } - } - _, err := NamedListen(n, Filter(c.ListenFor, fn)) - if err != nil { - return errors.WithStack(err) - } - return nil - }) - }(c) - if err != nil { - err = errors.WithStack(err) - return - } - } - - } - }) - return err -} diff --git a/vendor/github.com/gobuffalo/events/shoulders.md b/vendor/github.com/gobuffalo/events/shoulders.md deleted file mode 100644 index fe2aefb41..000000000 --- a/vendor/github.com/gobuffalo/events/shoulders.md +++ /dev/null @@ -1,50 +0,0 @@ -# github.com/gobuffalo/events Stands on the Shoulders of Giants - -github.com/gobuffalo/events does not try to reinvent the wheel! Instead, it uses the already great wheels developed by the Go community and puts them all together in the best way possible. Without these giants this project would not be possible. Please make sure to check them out and thank them for all of their hard work. - -Thank you to the following **GIANTS**: - - -* [github.com/BurntSushi/toml](https://godoc.org/github.com/BurntSushi/toml) - -* [github.com/gobuffalo/buffalo-plugins/plugins](https://godoc.org/github.com/gobuffalo/buffalo-plugins/plugins) - -* [github.com/gobuffalo/buffalo-plugins/plugins/plugdeps](https://godoc.org/github.com/gobuffalo/buffalo-plugins/plugins/plugdeps) - -* [github.com/gobuffalo/envy](https://godoc.org/github.com/gobuffalo/envy) - -* [github.com/gobuffalo/events](https://godoc.org/github.com/gobuffalo/events) - -* [github.com/gobuffalo/flect](https://godoc.org/github.com/gobuffalo/flect) - -* [github.com/gobuffalo/flect/name](https://godoc.org/github.com/gobuffalo/flect/name) - -* [github.com/gobuffalo/mapi](https://godoc.org/github.com/gobuffalo/mapi) - -* [github.com/gobuffalo/meta](https://godoc.org/github.com/gobuffalo/meta) - -* [github.com/joho/godotenv](https://godoc.org/github.com/joho/godotenv) - -* [github.com/karrick/godirwalk](https://godoc.org/github.com/karrick/godirwalk) - -* [github.com/markbates/oncer](https://godoc.org/github.com/markbates/oncer) - -* [github.com/markbates/safe](https://godoc.org/github.com/markbates/safe) - -* [github.com/pkg/errors](https://godoc.org/github.com/pkg/errors) - -* [github.com/rogpeppe/go-internal/modfile](https://godoc.org/github.com/rogpeppe/go-internal/modfile) - -* [github.com/rogpeppe/go-internal/module](https://godoc.org/github.com/rogpeppe/go-internal/module) - -* [github.com/rogpeppe/go-internal/semver](https://godoc.org/github.com/rogpeppe/go-internal/semver) - -* [github.com/sirupsen/logrus](https://godoc.org/github.com/sirupsen/logrus) - -* [github.com/spf13/cobra](https://godoc.org/github.com/spf13/cobra) - -* [github.com/spf13/pflag](https://godoc.org/github.com/spf13/pflag) - -* [golang.org/x/crypto/ssh/terminal](https://godoc.org/golang.org/x/crypto/ssh/terminal) - -* [golang.org/x/sys/unix](https://godoc.org/golang.org/x/sys/unix) diff --git a/vendor/github.com/gobuffalo/events/version.go b/vendor/github.com/gobuffalo/events/version.go deleted file mode 100644 index c99cc4dfa..000000000 --- a/vendor/github.com/gobuffalo/events/version.go +++ /dev/null @@ -1,3 +0,0 @@ -package events - -const Version = "v1.2.0" diff --git a/vendor/github.com/gobuffalo/flect/.gitignore b/vendor/github.com/gobuffalo/flect/.gitignore deleted file mode 100644 index 368971859..000000000 --- a/vendor/github.com/gobuffalo/flect/.gitignore +++ /dev/null @@ -1,29 +0,0 @@ -*.log -.DS_Store -doc -tmp -pkg -*.gem -*.pid -coverage -coverage.data -build/* -*.pbxuser -*.mode1v3 -.svn -profile -.console_history -.sass-cache/* -.rake_tasks~ -*.log.lck -solr/ -.jhw-cache/ -jhw.* -*.sublime* -node_modules/ -dist/ -generated/ -.vendor/ -bin/* -gin-bin -.idea/ diff --git a/vendor/github.com/gobuffalo/flect/.gometalinter.json b/vendor/github.com/gobuffalo/flect/.gometalinter.json deleted file mode 100644 index e4f65a36e..000000000 --- a/vendor/github.com/gobuffalo/flect/.gometalinter.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "Enable": ["vet", "golint", "goimports", "deadcode", "gotype", "ineffassign", "misspell", "nakedret", "unconvert", "megacheck", "varcheck"] -} diff --git a/vendor/github.com/gobuffalo/flect/.travis.yml b/vendor/github.com/gobuffalo/flect/.travis.yml deleted file mode 100644 index 1fb041a25..000000000 --- a/vendor/github.com/gobuffalo/flect/.travis.yml +++ /dev/null @@ -1,36 +0,0 @@ -language: go - -sudo: false - -matrix: - include: - - os: linux - go: "1.9.x" - - os: windows - go: "1.9.x" - - os: linux - go: "1.10.x" - - os: windows - go: "1.10.x" - - os: linux - go: "1.11.x" - env: - - GO111MODULE=off - - os: windows - go: "1.11.x" - env: - - GO111MODULE=off - - os: linux - go: "1.11.x" - env: - - GO111MODULE=on - - os: windows - go: "1.11.x" - env: - - GO111MODULE=on - -install: false - -script: - - go get -v -t ./... - - go test -v -timeout=5s -race ./... diff --git a/vendor/github.com/gobuffalo/flect/LICENSE.txt b/vendor/github.com/gobuffalo/flect/LICENSE.txt deleted file mode 100644 index 123ddc0d8..000000000 --- a/vendor/github.com/gobuffalo/flect/LICENSE.txt +++ /dev/null @@ -1,8 +0,0 @@ -The MIT License (MIT) -Copyright (c) 2018 Mark Bates - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/github.com/gobuffalo/flect/Makefile b/vendor/github.com/gobuffalo/flect/Makefile deleted file mode 100644 index b0db1c4f8..000000000 --- a/vendor/github.com/gobuffalo/flect/Makefile +++ /dev/null @@ -1,46 +0,0 @@ -TAGS ?= "sqlite" -GO_BIN ?= go - -install: - packr - $(GO_BIN) install -v . - -deps: - $(GO_BIN) get github.com/gobuffalo/release - $(GO_BIN) get github.com/gobuffalo/packr/packr - $(GO_BIN) get -tags ${TAGS} -t ./... -ifeq ($(GO111MODULE),on) - $(GO_BIN) mod tidy -endif - -build: - packr - $(GO_BIN) build -v . - -test: - packr - $(GO_BIN) test -tags ${TAGS} ./... - -ci-test: - $(GO_BIN) test -tags ${TAGS} -race ./... - -lint: - gometalinter --vendor ./... --deadline=1m --skip=internal - -update: - $(GO_BIN) get -u -tags ${TAGS} -ifeq ($(GO111MODULE),on) - $(GO_BIN) mod tidy -endif - packr - make test - make install -ifeq ($(GO111MODULE),on) - $(GO_BIN) mod tidy -endif - -release-test: - $(GO_BIN) test -tags ${TAGS} -race ./... - -release: - release -y -f version.go diff --git a/vendor/github.com/gobuffalo/flect/README.md b/vendor/github.com/gobuffalo/flect/README.md deleted file mode 100644 index af0afbda9..000000000 --- a/vendor/github.com/gobuffalo/flect/README.md +++ /dev/null @@ -1,36 +0,0 @@ -# Flect - -

    -GoDoc -Build Status -Go Report Card -

    - -This is a new inflection engine to replace [https://github.com/markbates/inflect](https://github.com/markbates/inflect) designed to be more modular, more readable, and easier to fix issues on than the original. - -## Installation - -```bash -$ go get -u -v github.com/gobuffalo/flect -``` - -## `github.com/gobuffalo/flect` -GoDoc - -The `github.com/gobuffalo/flect` package contains "basic" inflection tools, like pluralization, singularization, etc... - -### The `Ident` Type - -In addition to helpful methods that take in a `string` and return a `string`, there is an `Ident` type that can be used to create new, custom, inflection rules. - -The `Ident` type contains two fields. - -* `Original` - This is the original `string` that was used to create the `Ident` -* `Parts` - This is a `[]string` that represents all of the "parts" of the string, that have been split apart, making the segments easier to work with - -Examples of creating new inflection rules using `Ident` can be found in the `github.com/gobuffalo/flect/name` package. - -## `github.com/gobuffalo/flect/name` -GoDoc - -The `github.com/gobuffalo/flect/name` package contains more "business" inflection rules like creating proper names, table names, etc... diff --git a/vendor/github.com/gobuffalo/flect/acronyms.go b/vendor/github.com/gobuffalo/flect/acronyms.go deleted file mode 100644 index b169724a4..000000000 --- a/vendor/github.com/gobuffalo/flect/acronyms.go +++ /dev/null @@ -1,152 +0,0 @@ -package flect - -import "sync" - -var acronymsMoot = &sync.RWMutex{} - -var baseAcronyms = map[string]bool{ - "OK": true, - "UTF8": true, - "HTML": true, - "JSON": true, - "JWT": true, - "ID": true, - "UUID": true, - "SQL": true, - "ACK": true, - "ACL": true, - "ADSL": true, - "AES": true, - "ANSI": true, - "API": true, - "ARP": true, - "ATM": true, - "BGP": true, - "BSS": true, - "CCITT": true, - "CHAP": true, - "CIDR": true, - "CIR": true, - "CLI": true, - "CPE": true, - "CPU": true, - "CRC": true, - "CRT": true, - "CSMA": true, - "CMOS": true, - "DCE": true, - "DEC": true, - "DES": true, - "DHCP": true, - "DNS": true, - "DRAM": true, - "DSL": true, - "DSLAM": true, - "DTE": true, - "DMI": true, - "EHA": true, - "EIA": true, - "EIGRP": true, - "EOF": true, - "ESS": true, - "FCC": true, - "FCS": true, - "FDDI": true, - "FTP": true, - "GBIC": true, - "gbps": true, - "GEPOF": true, - "HDLC": true, - "HTTP": true, - "HTTPS": true, - "IANA": true, - "ICMP": true, - "IDF": true, - "IDS": true, - "IEEE": true, - "IETF": true, - "IMAP": true, - "IP": true, - "IPS": true, - "ISDN": true, - "ISP": true, - "kbps": true, - "LACP": true, - "LAN": true, - "LAPB": true, - "LAPF": true, - "LLC": true, - "MAC": true, - "Mbps": true, - "MC": true, - "MDF": true, - "MIB": true, - "MoCA": true, - "MPLS": true, - "MTU": true, - "NAC": true, - "NAT": true, - "NBMA": true, - "NIC": true, - "NRZ": true, - "NRZI": true, - "NVRAM": true, - "OSI": true, - "OSPF": true, - "OUI": true, - "PAP": true, - "PAT": true, - "PC": true, - "PIM": true, - "PCM": true, - "PDU": true, - "POP3": true, - "POTS": true, - "PPP": true, - "PPTP": true, - "PTT": true, - "PVST": true, - "RAM": true, - "RARP": true, - "RFC": true, - "RIP": true, - "RLL": true, - "ROM": true, - "RSTP": true, - "RTP": true, - "RCP": true, - "SDLC": true, - "SFD": true, - "SFP": true, - "SLARP": true, - "SLIP": true, - "SMTP": true, - "SNA": true, - "SNAP": true, - "SNMP": true, - "SOF": true, - "SRAM": true, - "SSH": true, - "SSID": true, - "STP": true, - "SYN": true, - "TDM": true, - "TFTP": true, - "TIA": true, - "TOFU": true, - "UDP": true, - "URL": true, - "URI": true, - "USB": true, - "UTP": true, - "VC": true, - "VLAN": true, - "VLSM": true, - "VPN": true, - "W3C": true, - "WAN": true, - "WEP": true, - "WiFi": true, - "WPA": true, - "WWW": true, -} diff --git a/vendor/github.com/gobuffalo/flect/camelize.go b/vendor/github.com/gobuffalo/flect/camelize.go deleted file mode 100644 index 8a9928e8b..000000000 --- a/vendor/github.com/gobuffalo/flect/camelize.go +++ /dev/null @@ -1,48 +0,0 @@ -package flect - -import ( - "strings" - "unicode" -) - -// Camelize returns a camelize version of a string -// bob dylan = bobDylan -// widget_id = widgetID -// WidgetID = widgetID -func Camelize(s string) string { - return New(s).Camelize().String() -} - -// Camelize returns a camelize version of a string -// bob dylan = bobDylan -// widget_id = widgetID -// WidgetID = widgetID -func (i Ident) Camelize() Ident { - var out []string - for i, part := range i.Parts { - var x string - var capped bool - if strings.ToLower(part) == "id" { - out = append(out, "ID") - continue - } - for _, c := range part { - if unicode.IsLetter(c) || unicode.IsDigit(c) { - if i == 0 { - x += string(unicode.ToLower(c)) - continue - } - if !capped { - capped = true - x += string(unicode.ToUpper(c)) - continue - } - x += string(c) - } - } - if x != "" { - out = append(out, x) - } - } - return New(strings.Join(out, "")) -} diff --git a/vendor/github.com/gobuffalo/flect/capitalize.go b/vendor/github.com/gobuffalo/flect/capitalize.go deleted file mode 100644 index 42ecc166c..000000000 --- a/vendor/github.com/gobuffalo/flect/capitalize.go +++ /dev/null @@ -1,27 +0,0 @@ -package flect - -import "unicode" - -// Capitalize will cap the first letter of string -// user = User -// bob dylan = Bob dylan -// widget_id = Widget_id -func Capitalize(s string) string { - return New(s).Capitalize().String() -} - -// Capitalize will cap the first letter of string -// user = User -// bob dylan = Bob dylan -// widget_id = Widget_id -func (i Ident) Capitalize() Ident { - var x string - if len(i.Parts) == 0 { - return New("") - } - x = string(unicode.ToTitle(rune(i.Original[0]))) - if len(i.Original) > 1 { - x += i.Original[1:] - } - return New(x) -} diff --git a/vendor/github.com/gobuffalo/flect/custom_data.go b/vendor/github.com/gobuffalo/flect/custom_data.go deleted file mode 100644 index 9a2dfc74a..000000000 --- a/vendor/github.com/gobuffalo/flect/custom_data.go +++ /dev/null @@ -1,83 +0,0 @@ -package flect - -import ( - "bytes" - "encoding/json" - "fmt" - "io" - "io/ioutil" - "os" - "path/filepath" -) - -func init() { - loadCustomData("inflections.json", "INFLECT_PATH", "could not read inflection file", LoadInflections) - loadCustomData("acronyms.json", "ACRONYMS_PATH", "could not read acronyms file", LoadAcronyms) -} - -//CustomDataParser are functions that parse data like acronyms or -//plurals in the shape of a io.Reader it receives. -type CustomDataParser func(io.Reader) error - -func loadCustomData(defaultFile, env, readErrorMessage string, parser CustomDataParser) { - pwd, _ := os.Getwd() - path, found := os.LookupEnv(env) - if !found { - path = filepath.Join(pwd, defaultFile) - } - - if _, err := os.Stat(path); err != nil { - return - } - - b, err := ioutil.ReadFile(path) - if err != nil { - fmt.Printf("%s %s (%s)\n", readErrorMessage, path, err) - return - } - - if err = parser(bytes.NewReader(b)); err != nil { - fmt.Println(err) - } -} - -//LoadAcronyms loads rules from io.Reader param -func LoadAcronyms(r io.Reader) error { - m := []string{} - err := json.NewDecoder(r).Decode(&m) - - if err != nil { - return fmt.Errorf("could not decode acronyms JSON from reader: %s", err) - } - - acronymsMoot.Lock() - defer acronymsMoot.Unlock() - - for _, acronym := range m { - baseAcronyms[acronym] = true - } - - return nil -} - -//LoadInflections loads rules from io.Reader param -func LoadInflections(r io.Reader) error { - m := map[string]string{} - - err := json.NewDecoder(r).Decode(&m) - if err != nil { - return fmt.Errorf("could not decode inflection JSON from reader: %s", err) - } - - pluralMoot.Lock() - defer pluralMoot.Unlock() - singularMoot.Lock() - defer singularMoot.Unlock() - - for s, p := range m { - singleToPlural[s] = p - pluralToSingle[p] = s - } - - return nil -} diff --git a/vendor/github.com/gobuffalo/flect/dasherize.go b/vendor/github.com/gobuffalo/flect/dasherize.go deleted file mode 100644 index c7a8a33e3..000000000 --- a/vendor/github.com/gobuffalo/flect/dasherize.go +++ /dev/null @@ -1,34 +0,0 @@ -package flect - -import ( - "strings" - "unicode" -) - -// Dasherize returns an alphanumeric, lowercased, dashed string -// Donald E. Knuth = donald-e-knuth -// Test with + sign = test-with-sign -// admin/WidgetID = admin-widget-id -func Dasherize(s string) string { - return New(s).Dasherize().String() -} - -// Dasherize returns an alphanumeric, lowercased, dashed string -// Donald E. Knuth = donald-e-knuth -// Test with + sign = test-with-sign -// admin/WidgetID = admin-widget-id -func (i Ident) Dasherize() Ident { - var parts []string - - for _, part := range i.Parts { - var x string - for _, c := range part { - if unicode.IsLetter(c) || unicode.IsDigit(c) { - x += string(c) - } - } - parts = xappend(parts, x) - } - - return New(strings.ToLower(strings.Join(parts, "-"))) -} diff --git a/vendor/github.com/gobuffalo/flect/flect.go b/vendor/github.com/gobuffalo/flect/flect.go deleted file mode 100644 index ee81b6f2b..000000000 --- a/vendor/github.com/gobuffalo/flect/flect.go +++ /dev/null @@ -1,43 +0,0 @@ -/* -Package flect is a new inflection engine to replace [https://github.com/markbates/inflect](https://github.com/markbates/inflect) designed to be more modular, more readable, and easier to fix issues on than the original. -*/ -package flect - -import ( - "strings" - "unicode" -) - -var spaces = []rune{'_', ' ', ':', '-', '/'} - -func isSpace(c rune) bool { - for _, r := range spaces { - if r == c { - return true - } - } - return unicode.IsSpace(c) -} - -func xappend(a []string, ss ...string) []string { - for _, s := range ss { - s = strings.TrimSpace(s) - for _, x := range spaces { - s = strings.Trim(s, string(x)) - } - if _, ok := baseAcronyms[strings.ToUpper(s)]; ok { - s = strings.ToUpper(s) - } - if s != "" { - a = append(a, s) - } - } - return a -} - -func abs(x int) int { - if x < 0 { - return -x - } - return x -} diff --git a/vendor/github.com/gobuffalo/flect/go.mod b/vendor/github.com/gobuffalo/flect/go.mod deleted file mode 100644 index a9a9eab05..000000000 --- a/vendor/github.com/gobuffalo/flect/go.mod +++ /dev/null @@ -1,6 +0,0 @@ -module github.com/gobuffalo/flect - -require ( - github.com/davecgh/go-spew v1.1.1 // indirect - github.com/stretchr/testify v1.3.0 -) diff --git a/vendor/github.com/gobuffalo/flect/go.sum b/vendor/github.com/gobuffalo/flect/go.sum deleted file mode 100644 index 4f8984150..000000000 --- a/vendor/github.com/gobuffalo/flect/go.sum +++ /dev/null @@ -1,8 +0,0 @@ -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= diff --git a/vendor/github.com/gobuffalo/flect/ident.go b/vendor/github.com/gobuffalo/flect/ident.go deleted file mode 100644 index 78b51d457..000000000 --- a/vendor/github.com/gobuffalo/flect/ident.go +++ /dev/null @@ -1,106 +0,0 @@ -package flect - -import ( - "encoding" - "strings" - "unicode" - "unicode/utf8" -) - -// Ident represents the string and it's parts -type Ident struct { - Original string - Parts []string -} - -// String implements fmt.Stringer and returns the original string -func (i Ident) String() string { - return i.Original -} - -// New creates a new Ident from the string -func New(s string) Ident { - i := Ident{ - Original: s, - Parts: toParts(s), - } - - return i -} - -func toParts(s string) []string { - parts := []string{} - s = strings.TrimSpace(s) - if len(s) == 0 { - return parts - } - if _, ok := baseAcronyms[strings.ToUpper(s)]; ok { - return []string{strings.ToUpper(s)} - } - var prev rune - var x string - for _, c := range s { - cs := string(c) - // fmt.Println("### cs ->", cs) - // fmt.Println("### unicode.IsControl(c) ->", unicode.IsControl(c)) - // fmt.Println("### unicode.IsDigit(c) ->", unicode.IsDigit(c)) - // fmt.Println("### unicode.IsGraphic(c) ->", unicode.IsGraphic(c)) - // fmt.Println("### unicode.IsLetter(c) ->", unicode.IsLetter(c)) - // fmt.Println("### unicode.IsLower(c) ->", unicode.IsLower(c)) - // fmt.Println("### unicode.IsMark(c) ->", unicode.IsMark(c)) - // fmt.Println("### unicode.IsPrint(c) ->", unicode.IsPrint(c)) - // fmt.Println("### unicode.IsPunct(c) ->", unicode.IsPunct(c)) - // fmt.Println("### unicode.IsSpace(c) ->", unicode.IsSpace(c)) - // fmt.Println("### unicode.IsTitle(c) ->", unicode.IsTitle(c)) - // fmt.Println("### unicode.IsUpper(c) ->", unicode.IsUpper(c)) - if !utf8.ValidRune(c) { - continue - } - - if isSpace(c) { - parts = xappend(parts, x) - x = cs - prev = c - continue - } - - if unicode.IsUpper(c) && !unicode.IsUpper(prev) { - parts = xappend(parts, x) - x = cs - prev = c - continue - } - if unicode.IsUpper(c) && baseAcronyms[strings.ToUpper(x)] { - parts = xappend(parts, x) - x = cs - prev = c - continue - } - if unicode.IsLetter(c) || unicode.IsDigit(c) || unicode.IsPunct(c) || c == '`' { - prev = c - x += cs - continue - } - - parts = xappend(parts, x) - x = "" - prev = c - } - parts = xappend(parts, x) - - return parts -} - -var _ encoding.TextUnmarshaler = &Ident{} -var _ encoding.TextMarshaler = &Ident{} - -//UnmarshalText unmarshalls byte array into the Ident -func (i *Ident) UnmarshalText(data []byte) error { - (*i) = New(string(data)) - return nil -} - -//MarshalText marshals Ident into byte array -func (i Ident) MarshalText() ([]byte, error) { - return []byte(i.Original), nil -} diff --git a/vendor/github.com/gobuffalo/flect/lower_upper.go b/vendor/github.com/gobuffalo/flect/lower_upper.go deleted file mode 100644 index 930da58d8..000000000 --- a/vendor/github.com/gobuffalo/flect/lower_upper.go +++ /dev/null @@ -1,13 +0,0 @@ -package flect - -import "strings" - -// ToUpper is a convience wrapper for strings.ToUpper -func (i Ident) ToUpper() Ident { - return New(strings.ToUpper(i.Original)) -} - -// ToLower is a convience wrapper for strings.ToLower -func (i Ident) ToLower() Ident { - return New(strings.ToLower(i.Original)) -} diff --git a/vendor/github.com/gobuffalo/flect/name/char.go b/vendor/github.com/gobuffalo/flect/name/char.go deleted file mode 100644 index 64b2cb8d0..000000000 --- a/vendor/github.com/gobuffalo/flect/name/char.go +++ /dev/null @@ -1,24 +0,0 @@ -package name - -import "unicode" - -// Char returns the first letter, lowered -// "" = "x" -// "foo" = "f" -// "123d456" = "d" -func Char(s string) string { - return New(s).Char().String() -} - -// Char returns the first letter, lowered -// "" = "x" -// "foo" = "f" -// "123d456" = "d" -func (i Ident) Char() Ident { - for _, c := range i.Original { - if unicode.IsLetter(c) { - return New(string(unicode.ToLower(c))) - } - } - return New("x") -} diff --git a/vendor/github.com/gobuffalo/flect/name/file.go b/vendor/github.com/gobuffalo/flect/name/file.go deleted file mode 100644 index ec5cdae79..000000000 --- a/vendor/github.com/gobuffalo/flect/name/file.go +++ /dev/null @@ -1,28 +0,0 @@ -package name - -import ( - "strings" - - "github.com/gobuffalo/flect" -) - -// File creates a suitable file name -// admin/widget = admin/widget -// foo_bar = foo_bar -// U$ser = u_ser -func File(s string, exts ...string) string { - return New(s).File(exts...).String() -} - -// File creates a suitable file name -// admin/widget = admin/widget -// foo_bar = foo_bar -// U$ser = u_ser -func (i Ident) File(exts ...string) Ident { - var parts []string - - for _, part := range strings.Split(i.Original, "/") { - parts = append(parts, flect.Underscore(part)) - } - return New(strings.Join(parts, "/") + strings.Join(exts, "")) -} diff --git a/vendor/github.com/gobuffalo/flect/name/folder.go b/vendor/github.com/gobuffalo/flect/name/folder.go deleted file mode 100644 index 0f1e5eed1..000000000 --- a/vendor/github.com/gobuffalo/flect/name/folder.go +++ /dev/null @@ -1,36 +0,0 @@ -package name - -import ( - "regexp" - "strings" -) - -var alphanum = regexp.MustCompile(`[^a-zA-Z0-9_\-\/]+`) - -// Folder creates a suitable folder name -// admin/widget = admin/widget -// foo_bar = foo_bar -// U$ser = u_ser -func Folder(s string, exts ...string) string { - return New(s).Folder(exts...).String() -} - -// Folder creates a suitable folder name -// admin/widget = admin/widget -// foo_bar = foo/bar -// U$ser = u/ser -func (i Ident) Folder(exts ...string) Ident { - var parts []string - - s := i.Original - if i.Pascalize().String() == s { - s = i.Underscore().String() - s = strings.Replace(s, "_", "/", -1) - } - for _, part := range strings.Split(s, "/") { - part = strings.ToLower(part) - part = alphanum.ReplaceAllString(part, "") - parts = append(parts, part) - } - return New(strings.Join(parts, "/") + strings.Join(exts, "")) -} diff --git a/vendor/github.com/gobuffalo/flect/name/ident.go b/vendor/github.com/gobuffalo/flect/name/ident.go deleted file mode 100644 index 91f5d8bf8..000000000 --- a/vendor/github.com/gobuffalo/flect/name/ident.go +++ /dev/null @@ -1,13 +0,0 @@ -package name - -import "github.com/gobuffalo/flect" - -// Ident represents the string and it's parts -type Ident struct { - flect.Ident -} - -// New creates a new Ident from the string -func New(s string) Ident { - return Ident{flect.New(s)} -} diff --git a/vendor/github.com/gobuffalo/flect/name/join.go b/vendor/github.com/gobuffalo/flect/name/join.go deleted file mode 100644 index de8488318..000000000 --- a/vendor/github.com/gobuffalo/flect/name/join.go +++ /dev/null @@ -1,20 +0,0 @@ -package name - -import "path/filepath" - -func FilePathJoin(names ...string) string { - var ni = make([]Ident, len(names)) - for i, n := range names { - ni[i] = New(n) - } - base := New("") - return base.FilePathJoin(ni...).String() -} - -func (i Ident) FilePathJoin(ni ...Ident) Ident { - var s = make([]string, len(ni)) - for i, n := range ni { - s[i] = n.OsPath().String() - } - return New(filepath.Join(s...)) -} diff --git a/vendor/github.com/gobuffalo/flect/name/key.go b/vendor/github.com/gobuffalo/flect/name/key.go deleted file mode 100644 index 5fbf9ada2..000000000 --- a/vendor/github.com/gobuffalo/flect/name/key.go +++ /dev/null @@ -1,14 +0,0 @@ -package name - -import ( - "strings" -) - -func Key(s string) string { - return New(s).Key().String() -} - -func (i Ident) Key() Ident { - s := strings.Replace(i.String(), "\\", "/", -1) - return New(strings.ToLower(s)) -} diff --git a/vendor/github.com/gobuffalo/flect/name/name.go b/vendor/github.com/gobuffalo/flect/name/name.go deleted file mode 100644 index c90cfb271..000000000 --- a/vendor/github.com/gobuffalo/flect/name/name.go +++ /dev/null @@ -1,62 +0,0 @@ -package name - -import ( - "encoding" - "strings" - - "github.com/gobuffalo/flect" -) - -// Proper pascalizes and singularizes the string -// person = Person -// foo_bar = FooBar -// admin/widgets = AdminWidget -func Proper(s string) string { - return New(s).Proper().String() -} - -// Proper pascalizes and singularizes the string -// person = Person -// foo_bar = FooBar -// admin/widgets = AdminWidget -func (i Ident) Proper() Ident { - return Ident{i.Singularize().Pascalize()} -} - -// Group pascalizes and pluralizes the string -// person = People -// foo_bar = FooBars -// admin/widget = AdminWidgets -func Group(s string) string { - return New(s).Group().String() -} - -// Group pascalizes and pluralizes the string -// person = People -// foo_bar = FooBars -// admin/widget = AdminWidgets -func (i Ident) Group() Ident { - var parts []string - if len(i.Original) == 0 { - return i - } - last := i.Parts[len(i.Parts)-1] - for _, part := range i.Parts[:len(i.Parts)-1] { - parts = append(parts, flect.Pascalize(part)) - } - last = New(last).Pluralize().Pascalize().String() - parts = append(parts, last) - return New(strings.Join(parts, "")) -} - -var _ encoding.TextUnmarshaler = &Ident{} -var _ encoding.TextMarshaler = &Ident{} - -func (i *Ident) UnmarshalText(data []byte) error { - (*i) = New(string(data)) - return nil -} - -func (i Ident) MarshalText() ([]byte, error) { - return []byte(i.Original), nil -} diff --git a/vendor/github.com/gobuffalo/flect/name/os_path.go b/vendor/github.com/gobuffalo/flect/name/os_path.go deleted file mode 100644 index 2a85723b4..000000000 --- a/vendor/github.com/gobuffalo/flect/name/os_path.go +++ /dev/null @@ -1,21 +0,0 @@ -package name - -import ( - "path/filepath" - "runtime" - "strings" -) - -func OsPath(s string) string { - return New(s).OsPath().String() -} - -func (i Ident) OsPath() Ident { - s := i.String() - if runtime.GOOS == "windows" { - s = strings.Replace(s, "/", string(filepath.Separator), -1) - } else { - s = strings.Replace(s, "\\", string(filepath.Separator), -1) - } - return New(s) -} diff --git a/vendor/github.com/gobuffalo/flect/name/package.go b/vendor/github.com/gobuffalo/flect/name/package.go deleted file mode 100644 index 28f3d18c8..000000000 --- a/vendor/github.com/gobuffalo/flect/name/package.go +++ /dev/null @@ -1,35 +0,0 @@ -package name - -import ( - "go/build" - "path/filepath" - "strings" -) - -// Package will attempt to return a package version of the name -// $GOPATH/src/foo/bar = foo/bar -// $GOPATH\src\foo\bar = foo/bar -// foo/bar = foo/bar -func Package(s string) string { - return New(s).Package().String() -} - -// Package will attempt to return a package version of the name -// $GOPATH/src/foo/bar = foo/bar -// $GOPATH\src\foo\bar = foo/bar -// foo/bar = foo/bar -func (i Ident) Package() Ident { - c := build.Default - - s := i.Original - - for _, src := range c.SrcDirs() { - s = strings.TrimPrefix(s, src) - s = strings.TrimPrefix(s, filepath.Dir(src)) // encase there's no /src prefix - } - - s = strings.TrimPrefix(s, string(filepath.Separator)) - s = strings.Replace(s, "\\", "/", -1) - s = strings.Replace(s, "_", "", -1) - return Ident{New(s).ToLower()} -} diff --git a/vendor/github.com/gobuffalo/flect/name/param_id.go b/vendor/github.com/gobuffalo/flect/name/param_id.go deleted file mode 100644 index 926e42265..000000000 --- a/vendor/github.com/gobuffalo/flect/name/param_id.go +++ /dev/null @@ -1,24 +0,0 @@ -package name - -import "strings" - -// ParamID returns the string as parameter with _id added -// user = user_id -// UserID = user_id -// admin/widgets = admin_widgets_id -func ParamID(s string) string { - return New(s).ParamID().String() -} - -// ParamID returns the string as parameter with _id added -// user = user_id -// UserID = user_id -// admin/widgets = admin_widget_id -func (i Ident) ParamID() Ident { - s := i.Singularize().Underscore().String() - s = strings.ToLower(s) - if strings.HasSuffix(s, "_id") { - return New(s) - } - return New(s + "_id") -} diff --git a/vendor/github.com/gobuffalo/flect/name/resource.go b/vendor/github.com/gobuffalo/flect/name/resource.go deleted file mode 100644 index c79480953..000000000 --- a/vendor/github.com/gobuffalo/flect/name/resource.go +++ /dev/null @@ -1,24 +0,0 @@ -package name - -import ( - "strings" -) - -// Resource version of a name -func (n Ident) Resource() Ident { - name := n.Underscore().String() - x := strings.FieldsFunc(name, func(r rune) bool { - return r == '_' || r == '/' - }) - - for i, w := range x { - if i == len(x)-1 { - x[i] = New(w).Pluralize().Pascalize().String() - continue - } - - x[i] = New(w).Pascalize().String() - } - - return New(strings.Join(x, "")) -} diff --git a/vendor/github.com/gobuffalo/flect/name/tablize.go b/vendor/github.com/gobuffalo/flect/name/tablize.go deleted file mode 100644 index e03fe2109..000000000 --- a/vendor/github.com/gobuffalo/flect/name/tablize.go +++ /dev/null @@ -1,17 +0,0 @@ -package name - -// Tableize returns an underscore, pluralized string -// User = users -// Person = persons -// Admin/Widget = admin_widgets -func Tableize(s string) string { - return New(s).Tableize().String() -} - -// Tableize returns an underscore, pluralized string -// User = users -// Person = persons -// Admin/Widget = admin_widgets -func (i Ident) Tableize() Ident { - return Ident{i.Pluralize().Underscore()} -} diff --git a/vendor/github.com/gobuffalo/flect/name/url.go b/vendor/github.com/gobuffalo/flect/name/url.go deleted file mode 100644 index 1acfcf7c2..000000000 --- a/vendor/github.com/gobuffalo/flect/name/url.go +++ /dev/null @@ -1,5 +0,0 @@ -package name - -func (n Ident) URL() Ident { - return Ident{n.File().Pluralize()} -} diff --git a/vendor/github.com/gobuffalo/flect/name/var_case.go b/vendor/github.com/gobuffalo/flect/name/var_case.go deleted file mode 100644 index 734f4087b..000000000 --- a/vendor/github.com/gobuffalo/flect/name/var_case.go +++ /dev/null @@ -1,49 +0,0 @@ -package name - -// VarCaseSingle version of a name. -// foo_bar = fooBar -// admin/widget = adminWidget -// User = users -func VarCaseSingle(s string) string { - return New(s).VarCaseSingle().String() -} - -// VarCaseSingle version of a name. -// foo_bar = fooBar -// admin/widget = adminWidget -// User = users -func (i Ident) VarCaseSingle() Ident { - return Ident{i.Group().Singularize().Camelize()} -} - -// VarCasePlural version of a name. -// foo_bar = fooBars -// admin/widget = adminWidgets -// User = users -func VarCasePlural(s string) string { - return New(s).VarCasePlural().String() -} - -// VarCasePlural version of a name. -// foo_bar = fooBars -// admin/widget = adminWidgets -// User = users -func (i Ident) VarCasePlural() Ident { - return Ident{i.Group().Pluralize().Camelize()} -} - -// VarCase version of a name. -// foo_bar = fooBar -// admin/widget = adminWidget -// Users = users -func (i Ident) VarCase() Ident { - return Ident{i.Camelize()} -} - -// VarCase version of a name. -// foo_bar = fooBar -// admin/widget = adminWidget -// Users = users -func VarCase(s string) string { - return New(s).VarCase().String() -} diff --git a/vendor/github.com/gobuffalo/flect/ordinalize.go b/vendor/github.com/gobuffalo/flect/ordinalize.go deleted file mode 100644 index 1ce27b3a0..000000000 --- a/vendor/github.com/gobuffalo/flect/ordinalize.go +++ /dev/null @@ -1,43 +0,0 @@ -package flect - -import ( - "fmt" - "strconv" -) - -// Ordinalize converts a number to an ordinal version -// 42 = 42nd -// 45 = 45th -// 1 = 1st -func Ordinalize(s string) string { - return New(s).Ordinalize().String() -} - -// Ordinalize converts a number to an ordinal version -// 42 = 42nd -// 45 = 45th -// 1 = 1st -func (i Ident) Ordinalize() Ident { - number, err := strconv.Atoi(i.Original) - if err != nil { - return i - } - var s string - switch abs(number) % 100 { - case 11, 12, 13: - s = fmt.Sprintf("%dth", number) - default: - switch abs(number) % 10 { - case 1: - s = fmt.Sprintf("%dst", number) - case 2: - s = fmt.Sprintf("%dnd", number) - case 3: - s = fmt.Sprintf("%drd", number) - } - } - if s != "" { - return New(s) - } - return New(fmt.Sprintf("%dth", number)) -} diff --git a/vendor/github.com/gobuffalo/flect/pascalize.go b/vendor/github.com/gobuffalo/flect/pascalize.go deleted file mode 100644 index 76f0c6a70..000000000 --- a/vendor/github.com/gobuffalo/flect/pascalize.go +++ /dev/null @@ -1,25 +0,0 @@ -package flect - -import ( - "unicode" -) - -// Pascalize returns a string with each segment capitalized -// user = User -// bob dylan = BobDylan -// widget_id = WidgetID -func Pascalize(s string) string { - return New(s).Pascalize().String() -} - -// Pascalize returns a string with each segment capitalized -// user = User -// bob dylan = BobDylan -// widget_id = WidgetID -func (i Ident) Pascalize() Ident { - c := i.Camelize() - if len(c.String()) == 0 { - return c - } - return New(string(unicode.ToUpper(rune(c.Original[0]))) + c.Original[1:]) -} diff --git a/vendor/github.com/gobuffalo/flect/plural_rules.go b/vendor/github.com/gobuffalo/flect/plural_rules.go deleted file mode 100644 index 1ebee22ab..000000000 --- a/vendor/github.com/gobuffalo/flect/plural_rules.go +++ /dev/null @@ -1,240 +0,0 @@ -package flect - -var pluralRules = []rule{} - -// AddPlural adds a rule that will replace the given suffix with the replacement suffix. -func AddPlural(suffix string, repl string) { - pluralMoot.Lock() - defer pluralMoot.Unlock() - pluralRules = append(pluralRules, rule{ - suffix: suffix, - fn: func(s string) string { - s = s[:len(s)-len(suffix)] - return s + repl - }, - }) - - pluralRules = append(pluralRules, rule{ - suffix: repl, - fn: noop, - }) -} - -var singleToPlural = map[string]string{ - "human": "humans", - "matrix": "matrices", - "vertix": "vertices", - "index": "indices", - "mouse": "mice", - "louse": "lice", - "ress": "resses", - "ox": "oxen", - "quiz": "quizzes", - "series": "series", - "octopus": "octopi", - "equipment": "equipment", - "information": "information", - "rice": "rice", - "money": "money", - "species": "species", - "fish": "fish", - "sheep": "sheep", - "jeans": "jeans", - "police": "police", - "dear": "dear", - "goose": "geese", - "tooth": "teeth", - "foot": "feet", - "bus": "buses", - "fez": "fezzes", - "piano": "pianos", - "halo": "halos", - "photo": "photos", - "aircraft": "aircraft", - "alumna": "alumnae", - "alumnus": "alumni", - "analysis": "analyses", - "antenna": "antennas", - "antithesis": "antitheses", - "apex": "apexes", - "appendix": "appendices", - "axis": "axes", - "bacillus": "bacilli", - "bacterium": "bacteria", - "basis": "bases", - "beau": "beaus", - "bison": "bison", - "bureau": "bureaus", - "campus": "campuses", - "château": "châteaux", - "codex": "codices", - "concerto": "concertos", - "corpus": "corpora", - "crisis": "crises", - "curriculum": "curriculums", - "deer": "deer", - "diagnosis": "diagnoses", - "die": "dice", - "dwarf": "dwarves", - "ellipsis": "ellipses", - "erratum": "errata", - "faux pas": "faux pas", - "focus": "foci", - "formula": "formulas", - "fungus": "fungi", - "genus": "genera", - "graffito": "graffiti", - "grouse": "grouse", - "half": "halves", - "hoof": "hooves", - "hypothesis": "hypotheses", - "larva": "larvae", - "libretto": "librettos", - "loaf": "loaves", - "locus": "loci", - "minutia": "minutiae", - "moose": "moose", - "nebula": "nebulae", - "nucleus": "nuclei", - "oasis": "oases", - "offspring": "offspring", - "opus": "opera", - "parenthesis": "parentheses", - "phenomenon": "phenomena", - "phylum": "phyla", - "prognosis": "prognoses", - "radius": "radiuses", - "referendum": "referendums", - "salmon": "salmon", - "shrimp": "shrimp", - "stimulus": "stimuli", - "stratum": "strata", - "swine": "swine", - "syllabus": "syllabi", - "symposium": "symposiums", - "synopsis": "synopses", - "tableau": "tableaus", - "thesis": "theses", - "thief": "thieves", - "trout": "trout", - "tuna": "tuna", - "vertebra": "vertebrae", - "vita": "vitae", - "vortex": "vortices", - "wharf": "wharves", - "wife": "wives", - "wolf": "wolves", - "datum": "data", - "testis": "testes", - "alias": "aliases", - "house": "houses", - "shoe": "shoes", - "news": "news", - "ovum": "ova", - "foo": "foos", -} - -var pluralToSingle = map[string]string{} - -func init() { - for k, v := range singleToPlural { - pluralToSingle[v] = k - } -} -func init() { - AddPlural("campus", "campuses") - AddPlural("man", "men") - AddPlural("tz", "tzes") - AddPlural("alias", "aliases") - AddPlural("oasis", "oasis") - AddPlural("wife", "wives") - AddPlural("basis", "basis") - AddPlural("atum", "ata") - AddPlural("adium", "adia") - AddPlural("actus", "acti") - AddPlural("irus", "iri") - AddPlural("iterion", "iteria") - AddPlural("dium", "diums") - AddPlural("ovum", "ova") - AddPlural("ize", "izes") - AddPlural("dge", "dges") - AddPlural("focus", "foci") - AddPlural("child", "children") - AddPlural("oaf", "oaves") - AddPlural("randum", "randa") - AddPlural("base", "bases") - AddPlural("atus", "atuses") - AddPlural("ode", "odes") - AddPlural("person", "people") - AddPlural("va", "vae") - AddPlural("leus", "li") - AddPlural("oot", "eet") - AddPlural("oose", "eese") - AddPlural("box", "boxes") - AddPlural("ium", "ia") - AddPlural("sis", "ses") - AddPlural("nna", "nnas") - AddPlural("eses", "esis") - AddPlural("stis", "stes") - AddPlural("ex", "ices") - AddPlural("ula", "ulae") - AddPlural("isis", "ises") - AddPlural("ouses", "ouse") - AddPlural("olves", "olf") - AddPlural("lf", "lves") - AddPlural("rf", "rves") - AddPlural("afe", "aves") - AddPlural("bfe", "bves") - AddPlural("cfe", "cves") - AddPlural("dfe", "dves") - AddPlural("efe", "eves") - AddPlural("gfe", "gves") - AddPlural("hfe", "hves") - AddPlural("ife", "ives") - AddPlural("jfe", "jves") - AddPlural("kfe", "kves") - AddPlural("lfe", "lves") - AddPlural("mfe", "mves") - AddPlural("nfe", "nves") - AddPlural("ofe", "oves") - AddPlural("pfe", "pves") - AddPlural("qfe", "qves") - AddPlural("rfe", "rves") - AddPlural("sfe", "sves") - AddPlural("tfe", "tves") - AddPlural("ufe", "uves") - AddPlural("vfe", "vves") - AddPlural("wfe", "wves") - AddPlural("xfe", "xves") - AddPlural("yfe", "yves") - AddPlural("zfe", "zves") - AddPlural("hive", "hives") - AddPlural("quy", "quies") - AddPlural("by", "bies") - AddPlural("cy", "cies") - AddPlural("dy", "dies") - AddPlural("fy", "fies") - AddPlural("gy", "gies") - AddPlural("hy", "hies") - AddPlural("jy", "jies") - AddPlural("ky", "kies") - AddPlural("ly", "lies") - AddPlural("my", "mies") - AddPlural("ny", "nies") - AddPlural("py", "pies") - AddPlural("qy", "qies") - AddPlural("ry", "ries") - AddPlural("sy", "sies") - AddPlural("ty", "ties") - AddPlural("vy", "vies") - AddPlural("wy", "wies") - AddPlural("xy", "xies") - AddPlural("zy", "zies") - AddPlural("x", "xes") - AddPlural("ch", "ches") - AddPlural("ss", "sses") - AddPlural("sh", "shes") - AddPlural("oe", "oes") - AddPlural("io", "ios") - AddPlural("o", "oes") -} diff --git a/vendor/github.com/gobuffalo/flect/pluralize.go b/vendor/github.com/gobuffalo/flect/pluralize.go deleted file mode 100644 index 1b9d43e46..000000000 --- a/vendor/github.com/gobuffalo/flect/pluralize.go +++ /dev/null @@ -1,49 +0,0 @@ -package flect - -import ( - "strings" - "sync" -) - -var pluralMoot = &sync.RWMutex{} - -// Pluralize returns a plural version of the string -// user = users -// person = people -// datum = data -func Pluralize(s string) string { - return New(s).Pluralize().String() -} - -// Pluralize returns a plural version of the string -// user = users -// person = people -// datum = data -func (i Ident) Pluralize() Ident { - s := i.Original - if len(s) == 0 { - return New("") - } - - pluralMoot.RLock() - defer pluralMoot.RUnlock() - - ls := strings.ToLower(s) - if _, ok := pluralToSingle[ls]; ok { - return i - } - if p, ok := singleToPlural[ls]; ok { - return New(p) - } - for _, r := range pluralRules { - if strings.HasSuffix(ls, r.suffix) { - return New(r.fn(s)) - } - } - - if strings.HasSuffix(ls, "s") { - return i - } - - return New(i.String() + "s") -} diff --git a/vendor/github.com/gobuffalo/flect/rule.go b/vendor/github.com/gobuffalo/flect/rule.go deleted file mode 100644 index dc616b337..000000000 --- a/vendor/github.com/gobuffalo/flect/rule.go +++ /dev/null @@ -1,10 +0,0 @@ -package flect - -type ruleFn func(string) string - -type rule struct { - suffix string - fn ruleFn -} - -func noop(s string) string { return s } diff --git a/vendor/github.com/gobuffalo/flect/singular_rules.go b/vendor/github.com/gobuffalo/flect/singular_rules.go deleted file mode 100644 index 14b471cd0..000000000 --- a/vendor/github.com/gobuffalo/flect/singular_rules.go +++ /dev/null @@ -1,122 +0,0 @@ -package flect - -var singularRules = []rule{} - -// AddSingular adds a rule that will replace the given suffix with the replacement suffix. -func AddSingular(ext string, repl string) { - singularMoot.Lock() - defer singularMoot.Unlock() - singularRules = append(singularRules, rule{ - suffix: ext, - fn: func(s string) string { - s = s[:len(s)-len(ext)] - return s + repl - }, - }) - - singularRules = append(singularRules, rule{ - suffix: repl, - fn: func(s string) string { - return s - }, - }) -} - -func init() { - AddSingular("ria", "rion") - AddSingular("news", "news") - AddSingular("halves", "half") - AddSingular("appendix", "appendix") - AddSingular("zzes", "zz") - AddSingular("ulas", "ula") - AddSingular("psis", "pse") - AddSingular("genus", "genera") - AddSingular("phyla", "phylum") - AddSingular("odice", "odex") - AddSingular("oxen", "ox") - AddSingular("ianos", "iano") - AddSingular("ulus", "uli") - AddSingular("mice", "mouse") - AddSingular("ouses", "ouse") - AddSingular("mni", "mnus") - AddSingular("ocus", "oci") - AddSingular("shoes", "shoe") - AddSingular("oasis", "oasis") - AddSingular("lice", "louse") - AddSingular("men", "man") - AddSingular("ta", "tum") - AddSingular("ia", "ium") - AddSingular("tives", "tive") - AddSingular("ldren", "ld") - AddSingular("people", "person") - AddSingular("aves", "afe") - AddSingular("uses", "us") - AddSingular("bves", "bfe") - AddSingular("cves", "cfe") - AddSingular("dves", "dfe") - AddSingular("eves", "efe") - AddSingular("gves", "gfe") - AddSingular("hves", "hfe") - AddSingular("chives", "chive") - AddSingular("ives", "ife") - AddSingular("movies", "movie") - AddSingular("jeans", "jeans") - AddSingular("cesses", "cess") - AddSingular("cess", "cess") - AddSingular("acti", "actus") - AddSingular("itzes", "itz") - AddSingular("usses", "uss") - AddSingular("uss", "uss") - AddSingular("jves", "jfe") - AddSingular("kves", "kfe") - AddSingular("mves", "mfe") - AddSingular("nves", "nfe") - AddSingular("moves", "move") - AddSingular("oves", "ofe") - AddSingular("pves", "pfe") - AddSingular("qves", "qfe") - AddSingular("sves", "sfe") - AddSingular("tves", "tfe") - AddSingular("uves", "ufe") - AddSingular("vves", "vfe") - AddSingular("wves", "wfe") - AddSingular("xves", "xfe") - AddSingular("yves", "yfe") - AddSingular("zves", "zfe") - AddSingular("hives", "hive") - AddSingular("lves", "lf") - AddSingular("rves", "rf") - AddSingular("quies", "quy") - AddSingular("bies", "by") - AddSingular("cies", "cy") - AddSingular("dies", "dy") - AddSingular("fies", "fy") - AddSingular("gies", "gy") - AddSingular("hies", "hy") - AddSingular("jies", "jy") - AddSingular("kies", "ky") - AddSingular("lies", "ly") - AddSingular("mies", "my") - AddSingular("nies", "ny") - AddSingular("pies", "py") - AddSingular("qies", "qy") - AddSingular("ries", "ry") - AddSingular("sies", "sy") - AddSingular("ties", "ty") - AddSingular("vies", "vy") - AddSingular("wies", "wy") - AddSingular("xies", "xy") - AddSingular("zies", "zy") - AddSingular("xes", "x") - AddSingular("ches", "ch") - AddSingular("sses", "ss") - AddSingular("shes", "sh") - AddSingular("oes", "o") - AddSingular("ress", "ress") - AddSingular("iri", "irus") - AddSingular("irus", "irus") - AddSingular("tuses", "tus") - AddSingular("tus", "tus") - AddSingular("s", "") - AddSingular("ss", "ss") -} diff --git a/vendor/github.com/gobuffalo/flect/singularize.go b/vendor/github.com/gobuffalo/flect/singularize.go deleted file mode 100644 index a08cbd586..000000000 --- a/vendor/github.com/gobuffalo/flect/singularize.go +++ /dev/null @@ -1,44 +0,0 @@ -package flect - -import ( - "strings" - "sync" -) - -var singularMoot = &sync.RWMutex{} - -// Singularize returns a singular version of the string -// users = user -// data = datum -// people = person -func Singularize(s string) string { - return New(s).Singularize().String() -} - -// Singularize returns a singular version of the string -// users = user -// data = datum -// people = person -func (i Ident) Singularize() Ident { - s := i.Original - if len(s) == 0 { - return i - } - - singularMoot.RLock() - defer singularMoot.RUnlock() - ls := strings.ToLower(s) - if p, ok := pluralToSingle[ls]; ok { - return New(p) - } - if _, ok := singleToPlural[ls]; ok { - return i - } - for _, r := range singularRules { - if strings.HasSuffix(ls, r.suffix) { - return New(r.fn(s)) - } - } - - return i -} diff --git a/vendor/github.com/gobuffalo/flect/titleize.go b/vendor/github.com/gobuffalo/flect/titleize.go deleted file mode 100644 index cbbf08a5a..000000000 --- a/vendor/github.com/gobuffalo/flect/titleize.go +++ /dev/null @@ -1,30 +0,0 @@ -package flect - -import ( - "strings" - "unicode" -) - -// Titleize will capitalize the start of each part -// "Nice to see you!" = "Nice To See You!" -// "i've read a book! have you?" = "I've Read A Book! Have You?" -// "This is `code` ok" = "This Is `code` OK" -func Titleize(s string) string { - return New(s).Titleize().String() -} - -// Titleize will capitalize the start of each part -// "Nice to see you!" = "Nice To See You!" -// "i've read a book! have you?" = "I've Read A Book! Have You?" -// "This is `code` ok" = "This Is `code` OK" -func (i Ident) Titleize() Ident { - var parts []string - for _, part := range i.Parts { - x := string(unicode.ToTitle(rune(part[0]))) - if len(part) > 1 { - x += part[1:] - } - parts = append(parts, x) - } - return New(strings.Join(parts, " ")) -} diff --git a/vendor/github.com/gobuffalo/flect/underscore.go b/vendor/github.com/gobuffalo/flect/underscore.go deleted file mode 100644 index b92488aa0..000000000 --- a/vendor/github.com/gobuffalo/flect/underscore.go +++ /dev/null @@ -1,34 +0,0 @@ -package flect - -import ( - "strings" - "unicode" -) - -// Underscore a string -// bob dylan = bob_dylan -// Nice to see you! = nice_to_see_you -// widgetID = widget_id -func Underscore(s string) string { - return New(s).Underscore().String() -} - -// Underscore a string -// bob dylan = bob_dylan -// Nice to see you! = nice_to_see_you -// widgetID = widget_id -func (i Ident) Underscore() Ident { - var out []string - for _, part := range i.Parts { - var x string - for _, c := range part { - if unicode.IsLetter(c) || unicode.IsDigit(c) { - x += string(c) - } - } - if x != "" { - out = append(out, x) - } - } - return New(strings.ToLower(strings.Join(out, "_"))) -} diff --git a/vendor/github.com/gobuffalo/flect/version.go b/vendor/github.com/gobuffalo/flect/version.go deleted file mode 100644 index b5f62170d..000000000 --- a/vendor/github.com/gobuffalo/flect/version.go +++ /dev/null @@ -1,4 +0,0 @@ -package flect - -//Version holds Flect version number -const Version = "v0.0.1" diff --git a/vendor/github.com/gobuffalo/genny/.codeclimate.yml b/vendor/github.com/gobuffalo/genny/.codeclimate.yml deleted file mode 100644 index 3d77930c2..000000000 --- a/vendor/github.com/gobuffalo/genny/.codeclimate.yml +++ /dev/null @@ -1,14 +0,0 @@ ---- -version: "2" -plugins: - golint: - enabled: true - checks: - GoLint/Naming/MixedCaps: - enabled: false - govet: - enabled: true - gofmt: - enabled: true - fixme: - enabled: true diff --git a/vendor/github.com/gobuffalo/genny/.gitignore b/vendor/github.com/gobuffalo/genny/.gitignore deleted file mode 100644 index 368971859..000000000 --- a/vendor/github.com/gobuffalo/genny/.gitignore +++ /dev/null @@ -1,29 +0,0 @@ -*.log -.DS_Store -doc -tmp -pkg -*.gem -*.pid -coverage -coverage.data -build/* -*.pbxuser -*.mode1v3 -.svn -profile -.console_history -.sass-cache/* -.rake_tasks~ -*.log.lck -solr/ -.jhw-cache/ -jhw.* -*.sublime* -node_modules/ -dist/ -generated/ -.vendor/ -bin/* -gin-bin -.idea/ diff --git a/vendor/github.com/gobuffalo/genny/.gometalinter.json b/vendor/github.com/gobuffalo/genny/.gometalinter.json deleted file mode 100644 index e4f65a36e..000000000 --- a/vendor/github.com/gobuffalo/genny/.gometalinter.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "Enable": ["vet", "golint", "goimports", "deadcode", "gotype", "ineffassign", "misspell", "nakedret", "unconvert", "megacheck", "varcheck"] -} diff --git a/vendor/github.com/gobuffalo/genny/.goreleaser.yml b/vendor/github.com/gobuffalo/genny/.goreleaser.yml deleted file mode 100644 index ba2dc82ce..000000000 --- a/vendor/github.com/gobuffalo/genny/.goreleaser.yml +++ /dev/null @@ -1,28 +0,0 @@ -builds: -- - goos: - - darwin - - linux - - windows - env: - - CGO_ENABLED=0 - # main: ./genny/main.go - # binary: {{.Binary}} - # hooks: - # pre: packr - # post: packr clean - -checksum: - name_template: 'checksums.txt' -snapshot: - name_template: "{{ .Tag }}-next" -changelog: - sort: asc - filters: - exclude: - - '^docs:' - - '^test:' -brew: - github: - owner: markbates - name: homebrew-tap diff --git a/vendor/github.com/gobuffalo/genny/.travis.yml b/vendor/github.com/gobuffalo/genny/.travis.yml deleted file mode 100644 index 1fb041a25..000000000 --- a/vendor/github.com/gobuffalo/genny/.travis.yml +++ /dev/null @@ -1,36 +0,0 @@ -language: go - -sudo: false - -matrix: - include: - - os: linux - go: "1.9.x" - - os: windows - go: "1.9.x" - - os: linux - go: "1.10.x" - - os: windows - go: "1.10.x" - - os: linux - go: "1.11.x" - env: - - GO111MODULE=off - - os: windows - go: "1.11.x" - env: - - GO111MODULE=off - - os: linux - go: "1.11.x" - env: - - GO111MODULE=on - - os: windows - go: "1.11.x" - env: - - GO111MODULE=on - -install: false - -script: - - go get -v -t ./... - - go test -v -timeout=5s -race ./... diff --git a/vendor/github.com/gobuffalo/genny/LICENSE.txt b/vendor/github.com/gobuffalo/genny/LICENSE.txt deleted file mode 100644 index 123ddc0d8..000000000 --- a/vendor/github.com/gobuffalo/genny/LICENSE.txt +++ /dev/null @@ -1,8 +0,0 @@ -The MIT License (MIT) -Copyright (c) 2018 Mark Bates - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/github.com/gobuffalo/genny/Makefile b/vendor/github.com/gobuffalo/genny/Makefile deleted file mode 100644 index 2eb0cd95c..000000000 --- a/vendor/github.com/gobuffalo/genny/Makefile +++ /dev/null @@ -1,53 +0,0 @@ -TAGS ?= "sqlite" -GO_BIN ?= go - -install: - packr2 - $(GO_BIN) install -v ./genny - -tidy: -ifeq ($(GO111MODULE),on) - $(GO_BIN) mod tidy -else - echo skipping go mod tidy -endif - -deps: - $(GO_BIN) get github.com/gobuffalo/release - $(GO_BIN) get github.com/gobuffalo/packr/v2/packr2 - $(GO_BIN) get -tags ${TAGS} -t ./... - make tidy - -build: - packr2 - $(GO_BIN) build -v . - make tidy - -test: - packr2 - $(GO_BIN) test -tags ${TAGS} ./... - make tidy - -ci-test: - $(GO_BIN) test -tags ${TAGS} -race ./... - make tidy - -lint: - gometalinter --vendor ./... --deadline=1m --skip=internal - -update: - packr2 clean - $(GO_BIN) get -u -tags ${TAGS} - make tidy - packr2 - make test - make install - make tidy - -release-test: - $(GO_BIN) test -tags ${TAGS} -race ./... - -release: - make tidy - release -y -f version.go - make tidy diff --git a/vendor/github.com/gobuffalo/genny/README.md b/vendor/github.com/gobuffalo/genny/README.md deleted file mode 100644 index f1e4f2aae..000000000 --- a/vendor/github.com/gobuffalo/genny/README.md +++ /dev/null @@ -1,497 +0,0 @@ -

    - -

    -GoDoc -Build Status -Go Report Card -

    - -# Genny - -## What Is Genny? - -Genny is a _framework_ for writing modular generators, it however, doesn't actually generate anything. It just makes it easier for you to. :) - -## Core Concepts - -### Generators - -A [`github.com/gobuffalo/genny#Generator`](https://godoc.org/github.com/gobuffalo/genny#Generator) is used to build a blue print of what you want to generate. - -A few of things that can be added to a `Generator` are: - -* [`github.com/gobuffalo/genny#File`](https://godoc.org/github.com/gobuffalo/genny#File) -* [`os/exec#Cmd`](https://godoc.org/os/exec#Cmd) -* [`github.com/gobuffalo/packd#Box`](https://godoc.org/github.com/gobuffalo/packd#Box) -* [`net/http#Request`](https://godoc.org/net/http#Request) -* and more - -A [`github.com/gobuffalo/genny#Generator`](https://godoc.org/github.com/gobuffalo/genny#Generator) does *not* actually generate anything; a [`github.com/gobuffalo/genny#Runner`](https://godoc.org/github.com/gobuffalo/genny#Runner) is needed to run the generator. - -```go -g := genny.New() - -// add a file -g.File(genny.NewFileS("index.html", "Hello\n")) - -// execute a command -g.Command(exec.Command("go", "env")) - -// run a function at run time -g.RunFn(func(r *genny.Runner) error { - // look for the `genny` executable - if _, err := r.LookPath("genny"); err != nil { - // it wasn't found, so install it - c := gogen.Get("github.com/gobuffalo/genny/genny") - if err := r.Exec(c); err != nil { - return err - } - } - // call the `genny` executable with the `-h` flag. - return r.Exec(exec.Command("genny", "-h")) -}) -``` - -When a [`github.com/gobuffalo/genny#Generator`](https://godoc.org/github.com/gobuffalo/genny#Generator) is run each item that was added to it will be run in FIFO order. In the above example this means the following will happen: - -1. Create a new file `r.Root/index.html` -1. Run the command `go env` -1. Run a function that installs `genny` - -#### Runtime Checks - -Genny has two different components; the "generator" (or blueprint) and the "runner" which executes the generator. Often it is necessary to only run certain code when the generator is run, not built. For example, checking the existing of an executable and installing it if missing. - -In these situations you will want to use a [`github.com/gobuffalo/genny#RunFn`](https://godoc.org/github.com/gobuffalo/genny#RunFn) function. - -In this example at runtime the `RunFn` will be called given the `*Runner` that is calling it. When called the function will ask the [`github.com/gobuffalo/genny#Runner.LookPath`](https://godoc.org/github.com/gobuffalo/genny#Runner.LookPath) function to ask the location of the `genny` executable. - -In [`github.com/gobuffalo/genny#DryRunner`](https://godoc.org/github.com/gobuffalo/genny#DryRunner) this will simply echo back the name of the executable that has been asked for, in this case `return "genny", nil`. - -In [`github.com/gobuffalo/genny#WetRunner`](https://godoc.org/github.com/gobuffalo/genny#WetRunner) this will call the [`os/exec#LookPath`](https://godoc.org/os/exec#LookPath) and return its results. - -If the `genny` binary is not found, it will attempt to install it. Should that succeed the method returns the execution of a call to `genny -h`. - -```go -g.RunFn(func(r *genny.Runner) error { - // look for the `genny` executable - if _, err := r.LookPath("genny"); err != nil { - // it wasn't found, so install it - c := gogen.Get("github.com/gobuffalo/genny/genny") - if err := r.Exec(c); err != nil { - return err - } - } - // call the `genny` executable with the `-h` flag. - return r.Exec(exec.Command("genny", "-h")) -}) -``` - -The flexibility of the `*Fn` functions, combined with [`github.com/gobuffalo/genny#RunFn`](https://godoc.org/github.com/gobuffalo/genny#RunFn) make for a powerful testing combination. - -### Runners - -A [`github.com/gobuffalo/genny#Runner`](https://godoc.org/github.com/gobuffalo/genny#Runner) is used to run generators and control the environment in which those generators are run. - -Genny ships with three implementations of `Runner` that cover _most_ situations. They can also provide good starting points for customized implementations of `Runner`. - -* [`github.com/gobuffalo/genny#DryRunner`](https://godoc.org/github.com/gobuffalo/genny#DryRunner) -* [`github.com/gobuffalo/genny#WetRunner`](https://godoc.org/github.com/gobuffalo/genny#WetRunner) -* [`github.com/gobuffalo/genny/gentest#NewRunner`](https://godoc.org/github.com/gobuffalo/genny/gentest#NewRunner) - -#### Adding Generators - -To add a [`github.com/gobuffalo/genny#Generator`](https://godoc.org/github.com/gobuffalo/genny#Generator) to a [`github.com/gobuffalo/genny#Runner`](https://godoc.org/github.com/gobuffalo/genny#Runner) the [`github.com/gobuffalo/genny#Runner.With`](https://godoc.org/github.com/gobuffalo/genny#Runner.With) function can be used. - -```go -run := genny.DryRunner(context.Background()) - -// add a generator from the `simple` package -g := simple.New() -run.With(g) - -// add a generator from the `notsimple` package -g := notsimple.New() -run.With(g) -``` - -Each [`github.com/gobuffalo/genny#Generator`](https://godoc.org/github.com/gobuffalo/genny#Generator) is run in FIFO order in which it was added to the [`github.com/gobuffalo/genny#Runner`](https://godoc.org/github.com/gobuffalo/genny#Runner). - -It is common to have a function that builds a new [`github.com/gobuffalo/genny#Generator`](https://godoc.org/github.com/gobuffalo/genny#Generator) or returns an `error` if there was a problem. - -```go -func New() (*genny.Generator, error) { - g := simple.New() - // do work which might error - return g, nil -} -``` - -The [`github.com/gobuffalo/genny#Runner.WithNew`](https://godoc.org/github.com/gobuffalo/genny#Runner.WithNew) function was designed to make adding a [`github.com/gobuffalo/genny#Generator`](https://godoc.org/github.com/gobuffalo/genny#Generator) with this return argument signature easier. - -```go -if err := run.WithNew(New()); err != nil { - log.Fatal(err) -} -``` - -#### Dry Running (**NON-DESTRUCTIVE**) - -The idea of "dry" running means that no commands are executed, no files are written to disk, no HTTP requests are made, etc... Instead these steps are run "dry", which in the case of [`github.com/gobuffalo/genny#DryRunner`](https://godoc.org/github.com/gobuffalo/genny#DryRunner) is the case. - -```go -func main() { - run := genny.DryRunner(context.Background()) - - g := simple.New() - run.With(g) - - if err := run.Run(); err != nil { - log.Fatal(err) - } -} -``` - -```plain -// output -DEBU[2018-12-06T15:13:47-05:00] Step: 4eac628c -DEBU[2018-12-06T15:13:47-05:00] Chdir: /go/src/github.com/gobuffalo/genny/internal/_examples/dry -DEBU[2018-12-06T15:13:47-05:00] File: /go/src/github.com/gobuffalo/genny/internal/_examples/dry/index.html -DEBU[2018-12-06T15:13:47-05:00] Exec: go env -DEBU[2018-12-06T15:13:47-05:00] LookPath: genny -DEBU[2018-12-06T15:13:47-05:00] Exec: genny -h -``` - -```bash -// file list -. -└── main.go - -0 directories, 1 file -``` - -Using a "dry" runner can make testing easier when you don't have to worry about commands running, files being written, etc... It can also make it easy to provide a "dry-run" flag to your generators to let people see what will be generated when the generator is run for real. - -#### Wet Running (**DESTRUCTIVE**) - -While "dry" means to not execute commands or write files, "wet" running means the exact opposite; it will write files and execute commands. - -Use the [`github.com/gobuffalo/genny#WetRunner`](https://godoc.org/github.com/gobuffalo/genny#WetRunner) when "wet" running is the desired outcome. - -```go -func main() { - run := genny.WetRunner(context.Background()) - - g := simple.New() - run.With(g) - - if err := run.Run(); err != nil { - log.Fatal(err) - } -} -``` - -```plain -GOARCH="amd64" -GOBIN="" -// ... -A brief description of your application - -Usage: - genny [command] - -Available Commands: - help Help about any command - new generates a new genny stub - -Flags: - -h, --help help for genny - -Use "genny [command] --help" for more information about a command. -``` - -```bash -// file list -. -├── index.html -└── main.go - -0 directories, 2 files -``` - -```bash -$ cat index.html - -Hello -``` - -#### Changing Runner Behavior - -The change the way [`github.com/gobuffalo/genny#DryRunner`](https://godoc.org/github.com/gobuffalo/genny#DryRunner) or [`github.com/gobuffalo/genny#WetRunner`](https://godoc.org/github.com/gobuffalo/genny#WetRunner) work, or to build your own [`github.com/gobuffalo/genny#Runner`](https://godoc.org/github.com/gobuffalo/genny#Runner) you need to implement the `*Fn` attributes on the [`github.com/gobuffalo/genny#Runner`](https://godoc.org/github.com/gobuffalo/genny#Runner). - -```go -type Runner struct { - // ... - ExecFn func(*exec.Cmd) error // function to use when executing files - FileFn func(File) (File, error) // function to use when writing files - ChdirFn func(string, func() error) error // function to use when changing directories - DeleteFn func(string) error // function used to delete files/folders - RequestFn func(*http.Request, *http.Client) (*http.Response, error) // function used to make http requests - LookPathFn func(string) (string, error) // function used to make exec.LookPath lookups - // ... -} -``` - -These `*Fn` functions represent the **FINAL** end-point for the that is trying to be run. - -Here are two implementations of the [`github.com/gobuffalo/genny#Runner.FileFn`](https://godoc.org/github.com/gobuffalo/genny#Runner.FileFn) function. - -The first will result in the file being printed to the screen. The second implementation writes the file to disk. - -```go -run.FileFn = func(f packd.SimpleFile) (packd.SimpleFile, error) { - io.Copy(os.Stdout, f) - return f, nil -} - -run.FileFn = func(f genny.File) (genny.File, error) { - if d, ok := f.(genny.Dir); ok { - if err := os.MkdirAll(d.Name(), d.Perm); err != nil { - return f, err - } - return d, nil - } - - name := f.Name() - if !filepath.IsAbs(name) { - name = filepath.Join(run.Root, name) - } - dir := filepath.Dir(name) - if err := os.MkdirAll(dir, 0755); err != nil { - return f, err - } - ff, err := os.Create(name) - if err != nil { - return f, err - } - defer ff.Close() - if _, err := io.Copy(ff, f); err != nil { - return f, err - } - return f, nil -} -``` - -### Files - -Working with files, both creating new ones as well as, existing ones, is a core component of writing a generator. Genny understands this and offers several ways of working with files that is flexible and helps to make writing and testing your generators easier. - -The [`github.com/gobuffalo/genny#File`](https://godoc.org/github.com/gobuffalo/genny#File) interface is the heart of working with files in Genny. - -Genny ships with several convenience method for creating a [`github.com/gobuffalo/genny#File`](https://godoc.org/github.com/gobuffalo/genny#File). - -* [`github.com/gobuffalo/genny#NewFile`](https://godoc.org/github.com/gobuffalo/genny#NewFile) -* [`github.com/gobuffalo/genny#NewFileS`](https://godoc.org/github.com/gobuffalo/genny#NewFileS) -* [`github.com/gobuffalo/genny#NewFileB`](https://godoc.org/github.com/gobuffalo/genny#NewFileB) -* [`github.com/gobuffalo/genny#NewDir`](https://godoc.org/github.com/gobuffalo/genny#NewDir) - -#### Writing Files - -To write a file you can add a [`github.com/gobuffalo/genny#File`](https://godoc.org/github.com/gobuffalo/genny#File) to your [`github.com/gobuffalo/genny#Generator.File`](https://godoc.org/github.com/gobuffalo/genny#Generator.File) and your file will then be handled by your `*Runner` when your generator is run. - -```go -g.File(genny.NewFile("index.html", strings.NewReader("Hello\n"))) -g.File(genny.NewFileS("strings/string.html", "Hello\n")) -g.File(genny.NewFileB("bytes/byte.html", []byte("Hello\n"))) -``` - -In the case of [`github.com/gobuffalo/genny#WetRunner`](https://godoc.org/github.com/gobuffalo/genny#WetRunner) will attemp to create any directories your files require. - -#### Reading Files - -When writing generators you may need to read an existing file, perhaps to modify it, or perhaps read it's contents. This presents a problem in generators. - -The first problem is that anytime we have to read files from disk, we make testing more difficult. - -The bigger problems, however, present themselves more with "dry" runners (for example testing), than they do with "wet" runners. - -If generator `A` creates a new file and generator `B` wants to modify that file in testing and "dry" runners this is a problem as the file may not present on disk for generator `B` to access. - -To work around this issue Genny has the concept of a [`github.com/gobuffalo/genny#Disk`](https://godoc.org/github.com/gobuffalo/genny#Disk). - -Now, instead of asking for the file directly from the file system, we can ask for it from the [`github.com/gobuffalo/genny#Runner.Disk`](https://godoc.org/github.com/gobuffalo/genny#Runner.Disk) instead. - -```go -g.RunFn(func(r *genny.Runner) error { - // try to find main.go either in the virtual "disk" - // or the physical one - f, err := r.Disk.Find("main.go") - if err != nil { - return err - } - // print the contents of the file - fmt.Println(f.String()) - return nil -}) -``` - -When asking for files from [`github.com/gobuffalo/genny#Runner.Disk`](https://godoc.org/github.com/gobuffalo/genny#Runner.Disk) it will first check its internal cache for the file, returning it if found. If the file is not in the cache, then it try to read it from disk at `filepath.Join(r.Root, name)`. - -#### Transforming Files - -There are times that you may need to transform either certain files, or all files. This could be as simple as replacing a variable in a template's name to match some user input, or something more complex, such as running any templates with a given extension through a certain template engine. - -The [`github.com/gobuffalo/genny#Transformer`](https://godoc.org/github.com/gobuffalo/genny#Transformer) type can be used to implement these types of file transformations. - -To create a new [`github.com/gobuffalo/genny#Transformer`](https://godoc.org/github.com/gobuffalo/genny#Transformer) you can use the [`github.com/gobuffalo/genny#NewTransformer`](https://godoc.org/github.com/gobuffalo/genny#NewTransformer) function. - -The example below is taken from the [`github.com/gobuffalo/plushgen`](https://godoc.org/github.com/gobuffalo/plushgen) package. - -```go -// Transformer will plushify any file that has a ".plush" extension -func Transformer(ctx *plush.Context) genny.Transformer { - t := genny.NewTransformer(".plush", func(f genny.File) (genny.File, error) { - s, err := plush.RenderR(f, ctx) - if err != nil { - return f, errors.Wrap(err, f.Name()) - } - return genny.NewFileS(f.Name(), s), nil - }) - t.StripExt = true - return t -} -``` - -The [`github.com/gobuffalo/genny#Transformer`](https://godoc.org/github.com/gobuffalo/genny#Transformer) that is returned in the example will only be run on files that have a `.plush` extension in their name. - -Should a file have a `.plush` extension, it will be sent to [`github.com/gobuffalo/plush`](https://godoc.org/github.com/gobuffalo/plush) to be rendered. The result of that rendering is returned as a new [`github.com/gobuffalo/genny#File`](https://godoc.org/github.com/gobuffalo/genny#File). Finally, the extension `.plush` will be stripped from the file name. - -```go -g := genny.New() - -// add a file -g.File(genny.NewFileS("index.html.plush", "Hello <%= name %>\n")) - -// add the plush transformer -ctx := plush.NewContext() -ctx.Set("name", "World") -g.Transformer(plushgen.Transformer(ctx)) -``` - -```plain -// output -DEBU[2018-12-07T10:35:56-05:00] Step: 09c9663e -DEBU[2018-12-07T10:35:56-05:00] Chdir: /go/src/github.com/gobuffalo/genny/internal/_examples/dry -DEBU[2018-12-07T10:35:56-05:00] File: /go/src/github.com/gobuffalo/genny/internal/_examples/dry/index.html -Hello World -``` - -### Testing - -Testing a generator can be difficult because creating, deleting, and modifying files can be painful to handle during testing. The same can be said of running functions and HTTP requests. - -The `*Fn` attributes on [`github.com/gobuffalo/genny#Runner`](https://godoc.org/github.com/gobuffalo/genny#Runner) make it simplier to mock out different test cases. - -Most of the time the out of the box defaults are "good enough" for testing. The [`github.com/gobuffalo/genny/gentest`](https://godoc.org/github.com/gobuffalo/genny/gentest) package offers several helpers to simplify testing further. - -In this example we test the "happy" path of a [`github.com/gobuffalo/genny#Generator`](https://godoc.org/github.com/gobuffalo/genny#Generator). - -```go -func Test_Happy(t *testing.T) { - r := require.New(t) - - run := gentest.NewRunner() - run.Disk.Add(genny.NewFileS("main.go", "my main.go file")) - - g := New() - run.With(g) - - r.NoError(run.Run()) - res := run.Results() - - cmds := []string{"go env", "genny -h"} - r.NoError(gentest.CompareCommands(cmds, res.Commands)) - - files := []string{"index.html", "main.go"} - r.NoError(gentest.CompareFiles(files, res.Files)) -} -``` - -Notice how in the above example we had to add `main.go` to the [`github.com/gobuffalo/genny#Runner.Disk`](https://godoc.org/github.com/gobuffalo/genny#Runner.Disk). That is because the file doesn't exist in our testing directory. - -In the following example we test what happens when the `genny` executable can not be found when running the [`github.com/gobuffalo/genny#Generator`](https://godoc.org/github.com/gobuffalo/genny#Generator). - -We can simulate this experience by using the [`github.com/gobuffalo/genny#Runner.LookPathFn`](https://godoc.org/github.com/gobuffalo/genny#Runner.LookPathFn) to return an error if it is asked about that particular executable. - -```go -func Test_Missing_Genny(t *testing.T) { - r := require.New(t) - - run := gentest.NewRunner() - run.Disk.Add(genny.NewFileS("main.go", "my main.go file")) - - g := New() - run.With(g) - - // pretend we can't find genny - run.LookPathFn = func(s string) (string, error) { - if s == "genny" { - return "", errors.New("can't find genny") - } - return s, nil - } - - r.NoError(run.Run()) - res := run.Results() - - cmds := []string{"go env", "go get github.com/gobuffalo/genny/genny", "genny -h"} - r.NoError(gentest.CompareCommands(cmds, res.Commands)) - - files := []string{"index.html", "main.go"} - r.NoError(gentest.CompareFiles(files, res.Files)) -} -``` - -## The `genny` Executable - -Genny ships with an executable that helps to generate new generators. - -### Installation - -```bash -$ go get -u github.com/gobuffalo/genny/genny -``` - -### Usage - -```bash -$ genny -h - -tools for working with genny - -Usage: - genny [command] - -Available Commands: - help Help about any command - new generates a new genny stub - -Flags: - -h, --help help for genny - -Use "genny [command] --help" for more information about a command. -``` - -### Generating a New Generator - -```bash -$ genny new coke -h - -DEBU[2018-12-07T11:07:01-05:00] Step: a1d8eb2f -DEBU[2018-12-07T11:07:01-05:00] Chdir: /go/src/github.com/gobuffalo -DEBU[2018-12-07T11:07:01-05:00] File: /go/src/github.com/gobuffalo/coke/coke.go -DEBU[2018-12-07T11:07:01-05:00] File: /go/src/github.com/gobuffalo/coke/coke_test.go -DEBU[2018-12-07T11:07:01-05:00] File: /go/src/github.com/gobuffalo/coke/options.go -DEBU[2018-12-07T11:07:01-05:00] File: /go/src/github.com/gobuffalo/coke/options_test.go -DEBU[2018-12-07T11:07:01-05:00] File: /go/src/github.com/gobuffalo/coke/templates/example.txt -``` diff --git a/vendor/github.com/gobuffalo/genny/SHOULDERS.md b/vendor/github.com/gobuffalo/genny/SHOULDERS.md deleted file mode 100644 index 42b36ba91..000000000 --- a/vendor/github.com/gobuffalo/genny/SHOULDERS.md +++ /dev/null @@ -1,108 +0,0 @@ -# `github.com/gobuffalo/genny` Stands on the Shoulders of Giants - -`github.com/gobuffalo/genny` does not try to reinvent the wheel! Instead, it uses the already great wheels developed by the Go community and puts them altogether in the best way possible. Without these giants this project would not be possible. Please make sure to check them out and thank them for all of their hard work. - -Thank you to the following **GIANTS**: - - -* [github.com/fatih/structs](https://godoc.org/github.com/fatih/structs) - -* [github.com/gobuffalo/envy](https://godoc.org/github.com/gobuffalo/envy) - -* [github.com/gobuffalo/flect](https://godoc.org/github.com/gobuffalo/flect) - -* [github.com/gobuffalo/flect/name](https://godoc.org/github.com/gobuffalo/flect/name) - -* [github.com/gobuffalo/github_flavored_markdown](https://godoc.org/github.com/gobuffalo/github_flavored_markdown) - -* [github.com/gobuffalo/packr](https://godoc.org/github.com/gobuffalo/packr) - -* [github.com/gobuffalo/plush](https://godoc.org/github.com/gobuffalo/plush) - -* [github.com/gobuffalo/plush/ast](https://godoc.org/github.com/gobuffalo/plush/ast) - -* [github.com/gobuffalo/plush/lexer](https://godoc.org/github.com/gobuffalo/plush/lexer) - -* [github.com/gobuffalo/plush/parser](https://godoc.org/github.com/gobuffalo/plush/parser) - -* [github.com/gobuffalo/plush/token](https://godoc.org/github.com/gobuffalo/plush/token) - -* [github.com/gobuffalo/tags](https://godoc.org/github.com/gobuffalo/tags) - -* [github.com/gobuffalo/tags/form](https://godoc.org/github.com/gobuffalo/tags/form) - -* [github.com/gobuffalo/tags/form/bootstrap](https://godoc.org/github.com/gobuffalo/tags/form/bootstrap) - -* [github.com/gobuffalo/uuid](https://godoc.org/github.com/gobuffalo/uuid) - -* [github.com/gobuffalo/validate](https://godoc.org/github.com/gobuffalo/validate) - -* [github.com/gobuffalo/validate/validators](https://godoc.org/github.com/gobuffalo/validate/validators) - -* [github.com/joho/godotenv](https://godoc.org/github.com/joho/godotenv) - -* [github.com/kr/pretty](https://godoc.org/github.com/kr/pretty) - -* [github.com/markbates/going/defaults](https://godoc.org/github.com/markbates/going/defaults) - -* [github.com/markbates/going/randx](https://godoc.org/github.com/markbates/going/randx) - -* [github.com/markbates/going/wait](https://godoc.org/github.com/markbates/going/wait) - -* [github.com/markbates/inflect](https://godoc.org/github.com/markbates/inflect) - -* [github.com/microcosm-cc/bluemonday](https://godoc.org/github.com/microcosm-cc/bluemonday) - -* [github.com/onsi/ginkgo](https://godoc.org/github.com/onsi/ginkgo) - -* [github.com/onsi/gomega](https://godoc.org/github.com/onsi/gomega) - -* [github.com/pkg/errors](https://godoc.org/github.com/pkg/errors) - -* [github.com/serenize/snaker](https://godoc.org/github.com/serenize/snaker) - -* [github.com/sergi/go-diff/diffmatchpatch](https://godoc.org/github.com/sergi/go-diff/diffmatchpatch) - -* [github.com/shurcooL/highlight_diff](https://godoc.org/github.com/shurcooL/highlight_diff) - -* [github.com/shurcooL/highlight_go](https://godoc.org/github.com/shurcooL/highlight_go) - -* [github.com/shurcooL/octicon](https://godoc.org/github.com/shurcooL/octicon) - -* [github.com/shurcooL/sanitized_anchor_name](https://godoc.org/github.com/shurcooL/sanitized_anchor_name) - -* [github.com/sirupsen/logrus](https://godoc.org/github.com/sirupsen/logrus) - -* [github.com/sourcegraph/annotate](https://godoc.org/github.com/sourcegraph/annotate) - -* [github.com/sourcegraph/syntaxhighlight](https://godoc.org/github.com/sourcegraph/syntaxhighlight) - -* [github.com/stretchr/testify/assert](https://godoc.org/github.com/stretchr/testify/assert) - -* [github.com/stretchr/testify/require](https://godoc.org/github.com/stretchr/testify/require) - -* [github.com/stretchr/testify/vendor/github.com/davecgh/go-spew/spew](https://godoc.org/github.com/stretchr/testify/vendor/github.com/davecgh/go-spew/spew) - -* [github.com/stretchr/testify/vendor/github.com/pmezard/go-difflib/difflib](https://godoc.org/github.com/stretchr/testify/vendor/github.com/pmezard/go-difflib/difflib) - -* [golang.org/x/crypto/ssh/terminal](https://godoc.org/golang.org/x/crypto/ssh/terminal) - -* [golang.org/x/net/context](https://godoc.org/golang.org/x/net/context) - -* [golang.org/x/net/html](https://godoc.org/golang.org/x/net/html) - -* [golang.org/x/net/html/atom](https://godoc.org/golang.org/x/net/html/atom) - -* [golang.org/x/sync/errgroup](https://godoc.org/golang.org/x/sync/errgroup) - -* [golang.org/x/sys/unix](https://godoc.org/golang.org/x/sys/unix) - -* [golang.org/x/tools/go/ast/astutil](https://godoc.org/golang.org/x/tools/go/ast/astutil) - -* [golang.org/x/tools/imports](https://godoc.org/golang.org/x/tools/imports) - -* [golang.org/x/tools/internal/fastwalk](https://godoc.org/golang.org/x/tools/internal/fastwalk) - -* [gopkg.in/check.v1](https://godoc.org/gopkg.in/check.v1) - -* [gopkg.in/russross/blackfriday.v1](https://godoc.org/gopkg.in/russross/blackfriday.v1) diff --git a/vendor/github.com/gobuffalo/genny/confirm.go b/vendor/github.com/gobuffalo/genny/confirm.go deleted file mode 100644 index 1316cccda..000000000 --- a/vendor/github.com/gobuffalo/genny/confirm.go +++ /dev/null @@ -1,15 +0,0 @@ -package genny - -import ( - "bufio" - "fmt" - "os" -) - -func Confirm(msg string) bool { - reader := bufio.NewReader(os.Stdin) - fmt.Print(msg) - text, _ := reader.ReadString('\n') - - return (text == "y\n" || text == "Y\n") -} diff --git a/vendor/github.com/gobuffalo/genny/dir.go b/vendor/github.com/gobuffalo/genny/dir.go deleted file mode 100644 index 4f5ea5838..000000000 --- a/vendor/github.com/gobuffalo/genny/dir.go +++ /dev/null @@ -1,18 +0,0 @@ -package genny - -import "os" - -var _ File = Dir{} - -type Dir struct { - File - Perm os.FileMode -} - -func NewDir(path string, perm os.FileMode) File { - f := NewFileS(path, path) - return Dir{ - File: f, - Perm: perm, - } -} diff --git a/vendor/github.com/gobuffalo/genny/disk.go b/vendor/github.com/gobuffalo/genny/disk.go deleted file mode 100644 index d9fa04d89..000000000 --- a/vendor/github.com/gobuffalo/genny/disk.go +++ /dev/null @@ -1,112 +0,0 @@ -package genny - -import ( - "bytes" - "io" - "os" - "runtime" - "sort" - "strings" - "sync" - - "github.com/gobuffalo/packd" - "github.com/pkg/errors" -) - -// Disk is a virtual file system that works -// with both dry and wet runners. Perfect for seeding -// Files or non-destructively deleting files -type Disk struct { - Runner *Runner - files map[string]File - moot *sync.RWMutex -} - -func (d *Disk) AddBox(box packd.Walker) error { - return box.Walk(func(path string, file packd.File) error { - d.Add(NewFile(path, file)) - return nil - }) -} - -// Files returns a sorted list of all the files in the disk -func (d *Disk) Files() []File { - var files []File - for _, f := range d.files { - if s, ok := f.(io.Seeker); ok { - s.Seek(0, 0) - } - files = append(files, f) - } - sort.Slice(files, func(i, j int) bool { - return files[i].Name() < files[j].Name() - }) - return files -} - -func newDisk(r *Runner) *Disk { - return &Disk{ - Runner: r, - files: map[string]File{}, - moot: &sync.RWMutex{}, - } -} - -// Remove a file(s) from the virtual disk. -func (d *Disk) Remove(name string) { - d.moot.Lock() - defer d.moot.Unlock() - for f, _ := range d.files { - if strings.HasPrefix(f, name) { - delete(d.files, f) - } - } -} - -// Delete calls the Runner#Delete function -func (d *Disk) Delete(name string) error { - return d.Runner.Delete(name) -} - -// Add file to the virtual disk -func (d *Disk) Add(f File) { - d.moot.Lock() - defer d.moot.Unlock() - d.files[f.Name()] = f -} - -// Find a file from the virtual disk. If the file doesn't -// exist it will try to read the file from the physical disk. -func (d *Disk) Find(name string) (File, error) { - - d.moot.RLock() - if f, ok := d.files[name]; ok { - if seek, ok := f.(io.Seeker); ok { - seek.Seek(0, 0) - } - d.moot.RUnlock() - return f, nil - } - d.moot.RUnlock() - - gf := NewFile(name, bytes.NewReader([]byte(""))) - - osname := name - if runtime.GOOS == "windows" { - osname = strings.Replace(osname, "/", "\\", -1) - } - f, err := os.Open(osname) - if err != nil { - return gf, errors.WithStack(err) - } - defer f.Close() - - bb := &bytes.Buffer{} - - if _, err := io.Copy(bb, f); err != nil { - return gf, errors.WithStack(err) - } - gf = NewFile(name, bb) - d.Add(gf) - return gf, nil -} diff --git a/vendor/github.com/gobuffalo/genny/dry_runner.go b/vendor/github.com/gobuffalo/genny/dry_runner.go deleted file mode 100644 index 4f4eee768..000000000 --- a/vendor/github.com/gobuffalo/genny/dry_runner.go +++ /dev/null @@ -1,15 +0,0 @@ -package genny - -import ( - "context" - - "github.com/gobuffalo/logger" -) - -// DryRunner will NOT execute commands and write files -// it is NOT destructive -func DryRunner(ctx context.Context) *Runner { - r := NewRunner(ctx) - r.Logger = logger.New(logger.DebugLevel) - return r -} diff --git a/vendor/github.com/gobuffalo/genny/events.go b/vendor/github.com/gobuffalo/genny/events.go deleted file mode 100644 index 3bc313eb6..000000000 --- a/vendor/github.com/gobuffalo/genny/events.go +++ /dev/null @@ -1,8 +0,0 @@ -package genny - -const ( - EvtStarted = "genny:runner:started" - EvtFinished = "genny:runner:finished" - EvtFinishedErr = "genny:runner:finished:err" - EvtStepPrefix = "genny:step" -) diff --git a/vendor/github.com/gobuffalo/genny/file.go b/vendor/github.com/gobuffalo/genny/file.go deleted file mode 100644 index 30c33d717..000000000 --- a/vendor/github.com/gobuffalo/genny/file.go +++ /dev/null @@ -1,32 +0,0 @@ -package genny - -import ( - "bytes" - "io" - "runtime" - "strings" - - "github.com/gobuffalo/packd" -) - -// File interface for working with files -type File = packd.SimpleFile - -// NewFile takes the name of the file you want to -// write to and a reader to reader from -func NewFile(name string, r io.Reader) File { - osname := name - if runtime.GOOS == "windows" { - osname = strings.Replace(osname, "\\", "/", -1) - } - f, _ := packd.NewFile(osname, r) - return f -} - -func NewFileS(name string, s string) File { - return NewFile(name, strings.NewReader(s)) -} - -func NewFileB(name string, s []byte) File { - return NewFile(name, bytes.NewReader(s)) -} diff --git a/vendor/github.com/gobuffalo/genny/force.go b/vendor/github.com/gobuffalo/genny/force.go deleted file mode 100644 index 4078c8418..000000000 --- a/vendor/github.com/gobuffalo/genny/force.go +++ /dev/null @@ -1,84 +0,0 @@ -package genny - -import ( - "io/ioutil" - "os" - "path/filepath" - - "github.com/gobuffalo/packd" - "github.com/pkg/errors" -) - -// ForceBox will mount each file in the box and wrap it with ForceFile -func ForceBox(g *Generator, box packd.Walker, force bool) error { - return box.Walk(func(path string, bf packd.File) error { - f := NewFile(path, bf) - ff := ForceFile(f, force) - f, err := ff(f) - if err != nil { - return errors.WithStack(err) - } - g.File(f) - return nil - }) -} - -// ForceFile is a TransformerFn that will return an error if the path exists if `force` is false. If `force` is true it will delete the path. -func ForceFile(f File, force bool) TransformerFn { - return func(f File) (File, error) { - path := f.Name() - path, err := filepath.Abs(path) - if err != nil { - return f, errors.WithStack(err) - } - _, err = os.Stat(path) - if err != nil { - // path doesn't exist. move on. - return f, nil - } - if !force { - return f, errors.Errorf("path %s already exists", path) - } - if err := os.RemoveAll(path); err != nil { - return f, errors.WithStack(err) - } - return f, nil - } -} - -// Force is a RunFn that will return an error if the path exists if `force` is false. If `force` is true it will delete the path. -// Is is recommended to use ForceFile when you can. -func Force(path string, force bool) RunFn { - if path == "." || path == "" { - pwd, _ := os.Getwd() - path = pwd - } - return func(r *Runner) error { - path, err := filepath.Abs(path) - if err != nil { - return errors.WithStack(err) - } - fi, err := os.Stat(path) - if err != nil { - // path doesn't exist. move on. - return nil - } - if !force { - if !fi.IsDir() { - return errors.Errorf("path %s already exists", path) - } - files, err := ioutil.ReadDir(path) - if err != nil { - return errors.WithStack(err) - } - if len(files) > 0 { - return errors.Errorf("path %s already exists", path) - } - return nil - } - if err := os.RemoveAll(path); err != nil { - return errors.WithStack(err) - } - return nil - } -} diff --git a/vendor/github.com/gobuffalo/genny/generator.go b/vendor/github.com/gobuffalo/genny/generator.go deleted file mode 100644 index 8baf53049..000000000 --- a/vendor/github.com/gobuffalo/genny/generator.go +++ /dev/null @@ -1,104 +0,0 @@ -package genny - -import ( - "math/rand" - "os/exec" - "sync" - "time" - - "github.com/gobuffalo/events" - "github.com/gobuffalo/packd" - "github.com/pkg/errors" -) - -func init() { - rand.Seed(time.Now().UnixNano()) -} - -// Generator is the basic type for generators to use -type Generator struct { - StepName string - Should func(*Runner) bool - Root string - ErrorFn func(error) - runners []RunFn - transformers []Transformer - moot *sync.RWMutex -} - -// New, well-formed, generator -func New() *Generator { - g := &Generator{ - StepName: stepName(), - runners: []RunFn{}, - moot: &sync.RWMutex{}, - transformers: []Transformer{}, - } - return g -} - -func (g *Generator) Event(kind string, payload events.Payload) { - g.RunFn(func(r *Runner) error { - return events.EmitPayload(kind, payload) - }) -} - -// File adds a file to be run when the generator is run -func (g *Generator) File(f File) { - g.RunFn(func(r *Runner) error { - return r.File(f) - }) -} - -func (g *Generator) Transform(f File) (File, error) { - g.moot.RLock() - defer g.moot.RUnlock() - var err error - for _, t := range g.transformers { - f, err = t.Transform(f) - if err != nil { - return f, errors.WithStack(err) - } - } - - return f, nil -} - -// Transformer adds a file transform to the generator -func (g *Generator) Transformer(t Transformer) { - g.moot.Lock() - defer g.moot.Unlock() - g.transformers = append(g.transformers, t) -} - -// Command adds a command to be run when the generator is run -func (g *Generator) Command(cmd *exec.Cmd) { - g.RunFn(func(r *Runner) error { - return r.Exec(cmd) - }) -} - -// Box walks through a packr.Box and adds Files for each entry -// in the box. -func (g *Generator) Box(box packd.Walker) error { - return box.Walk(func(path string, f packd.File) error { - g.File(NewFile(path, f)) - return nil - }) -} - -// RunFn adds a generic "runner" function to the generator. -func (g *Generator) RunFn(fn RunFn) { - g.moot.Lock() - defer g.moot.Unlock() - g.runners = append(g.runners, fn) -} - -func (g1 *Generator) Merge(g2 *Generator) { - g2.moot.Lock() - g1.moot.Lock() - g1.runners = append(g1.runners, g2.runners...) - g1.transformers = append(g1.transformers, g2.transformers...) - g1.moot.Unlock() - g2.moot.Unlock() -} diff --git a/vendor/github.com/gobuffalo/genny/genny.go b/vendor/github.com/gobuffalo/genny/genny.go deleted file mode 100644 index 85962ca97..000000000 --- a/vendor/github.com/gobuffalo/genny/genny.go +++ /dev/null @@ -1,4 +0,0 @@ -/* -Package genny is a _framework_ for writing modular generators, it however, doesn't actually generate anything. It just makes it easier for you to. :) -*/ -package genny diff --git a/vendor/github.com/gobuffalo/genny/go.mod b/vendor/github.com/gobuffalo/genny/go.mod deleted file mode 100644 index 52287cae0..000000000 --- a/vendor/github.com/gobuffalo/genny/go.mod +++ /dev/null @@ -1,20 +0,0 @@ -module github.com/gobuffalo/genny - -require ( - github.com/gobuffalo/attrs v0.0.0-20190219185331-f338c9388485 - github.com/gobuffalo/depgen v0.0.0-20190219190223-ba8c93fa0c2c - github.com/gobuffalo/envy v1.6.15 - github.com/gobuffalo/events v1.2.0 - github.com/gobuffalo/flect v0.1.0 - github.com/gobuffalo/gitgen v0.0.0-20190219185555-91c2c5f0aad5 - github.com/gobuffalo/gogen v0.0.0-20190219194924-d32a17ad9761 - github.com/gobuffalo/logger v0.0.0-20181127160119-5b956e21995c - github.com/gobuffalo/packd v0.0.0-20181212173646-eca3b8fd6687 - github.com/gobuffalo/packr/v2 v2.0.1 - github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2 - github.com/markbates/safe v1.0.1 - github.com/pkg/errors v0.8.1 - github.com/sirupsen/logrus v1.3.0 - github.com/spf13/cobra v0.0.3 - github.com/stretchr/testify v1.3.0 -) diff --git a/vendor/github.com/gobuffalo/genny/go.sum b/vendor/github.com/gobuffalo/genny/go.sum deleted file mode 100644 index 5f97a9bb2..000000000 --- a/vendor/github.com/gobuffalo/genny/go.sum +++ /dev/null @@ -1,535 +0,0 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.31.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.36.0/go.mod h1:RUoy9p/M4ge0HzT8L+SDZ8jg+Q6fth0CiBuhFJpSV40= -dmitri.shuralyov.com/app/changes v0.0.0-20180602232624-0a106ad413e3/go.mod h1:Yl+fi1br7+Rr3LqpNJf1/uxUdtRUV+Tnj0o93V2B9MU= -dmitri.shuralyov.com/html/belt v0.0.0-20180602232347-f7d459c86be0/go.mod h1:JLBrvjyP0v+ecvNYvCpyZgu5/xkfAUhi6wJj28eUfSU= -dmitri.shuralyov.com/service/change v0.0.0-20181023043359-a85b471d5412/go.mod h1:a1inKt/atXimZ4Mv927x+r7UpyzRUf4emIoiiSC2TN4= -dmitri.shuralyov.com/state v0.0.0-20180228185332-28bcc343414c/go.mod h1:0PRwlb0D6DFvNNtx+9ybjezNCa8XF0xaYcETyp6rHWU= -git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg= -github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= -github.com/ajg/form v0.0.0-20160822230020-523a5da1a92f/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= -github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= -github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625/go.mod h1:HYsPBTaaSFSlLx/70C2HPIMNZpVV8+vt/A+FMnYP11g= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= -github.com/cockroachdb/cockroach-go v0.0.0-20181001143604-e0a95dfd547c/go.mod h1:XGLbWH/ujMcbPbhZq52Nv6UrCghb1yGn//133kEsvDk= -github.com/codegangsta/negroni v1.0.0/go.mod h1:v0y3T5G7Y1UlFfyxFn/QLRU4a2EuNau2iZY63YTKWo0= -github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= -github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dustin/go-humanize v0.0.0-20180713052910-9f541cc9db5d/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/structs v1.0.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= -github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= -github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= -github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= -github.com/gobuffalo/attrs v0.0.0-20190219185331-f338c9388485 h1:ACL96KMyz/8vuQ9cFCrJWEinPAlrI+1YgW3FfeURk2A= -github.com/gobuffalo/attrs v0.0.0-20190219185331-f338c9388485/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0= -github.com/gobuffalo/buffalo v0.12.8-0.20181004233540-fac9bb505aa8/go.mod h1:sLyT7/dceRXJUxSsE813JTQtA3Eb1vjxWfo/N//vXIY= -github.com/gobuffalo/buffalo v0.13.0/go.mod h1:Mjn1Ba9wpIbpbrD+lIDMy99pQ0H0LiddMIIDGse7qT4= -github.com/gobuffalo/buffalo-plugins v1.0.2/go.mod h1:pOp/uF7X3IShFHyobahTkTLZaeUXwb0GrUTb9ngJWTs= -github.com/gobuffalo/buffalo-plugins v1.0.4/go.mod h1:pWS1vjtQ6uD17MVFWf7i3zfThrEKWlI5+PYLw/NaDB4= -github.com/gobuffalo/buffalo-plugins v1.4.3/go.mod h1:uCzTY0woez4nDMdQjkcOYKanngeUVRO2HZi7ezmAjWY= -github.com/gobuffalo/buffalo-plugins v1.5.1/go.mod h1:jbmwSZK5+PiAP9cC09VQOrGMZFCa/P0UMlIS3O12r5w= -github.com/gobuffalo/buffalo-plugins v1.6.4/go.mod h1:/+N1aophkA2jZ1ifB2O3Y9yGwu6gKOVMtUmJnbg+OZI= -github.com/gobuffalo/buffalo-plugins v1.6.5/go.mod h1:0HVkbgrVs/MnPZ/FOseDMVanCTm2RNcdM0PuXcL1NNI= -github.com/gobuffalo/buffalo-plugins v1.6.7/go.mod h1:ZGZRkzz2PiKWHs0z7QsPBOTo2EpcGRArMEym6ghKYgk= -github.com/gobuffalo/buffalo-plugins v1.6.9/go.mod h1:yYlYTrPdMCz+6/+UaXg5Jm4gN3xhsvsQ2ygVatZV5vw= -github.com/gobuffalo/buffalo-plugins v1.6.11/go.mod h1:eAA6xJIL8OuynJZ8amXjRmHND6YiusVAaJdHDN1Lu8Q= -github.com/gobuffalo/buffalo-plugins v1.8.2/go.mod h1:9te6/VjEQ7pKp7lXlDIMqzxgGpjlKoAcAANdCgoR960= -github.com/gobuffalo/buffalo-plugins v1.8.3/go.mod h1:IAWq6vjZJVXebIq2qGTLOdlXzmpyTZ5iJG5b59fza5U= -github.com/gobuffalo/buffalo-plugins v1.9.4/go.mod h1:grCV6DGsQlVzQwk6XdgcL3ZPgLm9BVxlBmXPMF8oBHI= -github.com/gobuffalo/buffalo-plugins v1.10.0/go.mod h1:4osg8d9s60txLuGwXnqH+RCjPHj9K466cDFRl3PErHI= -github.com/gobuffalo/buffalo-plugins v1.11.0/go.mod h1:rtIvAYRjYibgmWhnjKmo7OadtnxuMG5ZQLr25ozAzjg= -github.com/gobuffalo/buffalo-plugins v1.12.0 h1:5rvYQ7mwfPwUW9zqcMd9ahWtPVOOouMKZjv88q45Z7c= -github.com/gobuffalo/buffalo-plugins v1.12.0/go.mod h1:kw4Mj2vQXqe4X5TI36PEQgswbL30heGQwJEeDKd1v+4= -github.com/gobuffalo/buffalo-pop v1.0.5/go.mod h1:Fw/LfFDnSmB/vvQXPvcXEjzP98Tc+AudyNWUBWKCwQ8= -github.com/gobuffalo/depgen v0.0.0-20190219190223-ba8c93fa0c2c h1:YtzXXqLq7rG/Q0yo/IN2AYbwuLDk65l7PX11TjG+EzU= -github.com/gobuffalo/depgen v0.0.0-20190219190223-ba8c93fa0c2c/go.mod h1:CE/HUV4vDCXtJayRf6WoMWgezb1yH4QHg8GNK8FL0JI= -github.com/gobuffalo/envy v1.6.4/go.mod h1:Abh+Jfw475/NWtYMEt+hnJWRiC8INKWibIMyNt1w2Mc= -github.com/gobuffalo/envy v1.6.5/go.mod h1:N+GkhhZ/93bGZc6ZKhJLP6+m+tCNPKwgSpH9kaifseQ= -github.com/gobuffalo/envy v1.6.6/go.mod h1:N+GkhhZ/93bGZc6ZKhJLP6+m+tCNPKwgSpH9kaifseQ= -github.com/gobuffalo/envy v1.6.7/go.mod h1:N+GkhhZ/93bGZc6ZKhJLP6+m+tCNPKwgSpH9kaifseQ= -github.com/gobuffalo/envy v1.6.8/go.mod h1:N+GkhhZ/93bGZc6ZKhJLP6+m+tCNPKwgSpH9kaifseQ= -github.com/gobuffalo/envy v1.6.9/go.mod h1:N+GkhhZ/93bGZc6ZKhJLP6+m+tCNPKwgSpH9kaifseQ= -github.com/gobuffalo/envy v1.6.10/go.mod h1:X0CFllQjTV5ogsnUrg+Oks2yTI+PU2dGYBJOEI2D1Uo= -github.com/gobuffalo/envy v1.6.11/go.mod h1:Fiq52W7nrHGDggFPhn2ZCcHw4u/rqXkqo+i7FB6EAcg= -github.com/gobuffalo/envy v1.6.12/go.mod h1:qJNrJhKkZpEW0glh5xP2syQHH5kgdmgsKss2Kk8PTP0= -github.com/gobuffalo/envy v1.6.13/go.mod h1:w9DJppgl51JwUFWWd/M/6/otrPtWV3WYMa+NNLunqKA= -github.com/gobuffalo/envy v1.6.15 h1:OsV5vOpHYUpP7ZLS6sem1y40/lNX1BZj+ynMiRi21lQ= -github.com/gobuffalo/envy v1.6.15/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= -github.com/gobuffalo/events v1.0.3/go.mod h1:Txo8WmqScapa7zimEQIwgiJBvMECMe9gJjsKNPN3uZw= -github.com/gobuffalo/events v1.0.7/go.mod h1:z8txf6H9jWhQ5Scr7YPLWg/cgXBRj8Q4uYI+rsVCCSQ= -github.com/gobuffalo/events v1.0.8/go.mod h1:A5KyqT1sA+3GJiBE4QKZibse9mtOcI9nw8gGrDdqYGs= -github.com/gobuffalo/events v1.1.3/go.mod h1:9yPGWYv11GENtzrIRApwQRMYSbUgCsZ1w6R503fCfrk= -github.com/gobuffalo/events v1.1.4/go.mod h1:09/YRRgZHEOts5Isov+g9X2xajxdvOAcUuAHIX/O//A= -github.com/gobuffalo/events v1.1.5/go.mod h1:3YUSzgHfYctSjEjLCWbkXP6djH2M+MLaVRzb4ymbAK0= -github.com/gobuffalo/events v1.1.7/go.mod h1:6fGqxH2ing5XMb3EYRq9LEkVlyPGs4oO/eLzh+S8CxY= -github.com/gobuffalo/events v1.1.8/go.mod h1:UFy+W6X6VbCWS8k2iT81HYX65dMtiuVycMy04cplt/8= -github.com/gobuffalo/events v1.1.9/go.mod h1:/0nf8lMtP5TkgNbzYxR6Bl4GzBy5s5TebgNTdRfRbPM= -github.com/gobuffalo/events v1.2.0 h1:YovlMNcwNTfIm/3OdB+KemDOm8yUz4XIH+4kbMhGXWw= -github.com/gobuffalo/events v1.2.0/go.mod h1:pxvpvsKXKZNPtHuIxUV3K+g+KP5o4forzaeFj++bh68= -github.com/gobuffalo/fizz v1.0.12/go.mod h1:C0sltPxpYK8Ftvf64kbsQa2yiCZY4RZviurNxXdAKwc= -github.com/gobuffalo/flect v0.0.0-20180907193754-dc14d8acaf9f/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA= -github.com/gobuffalo/flect v0.0.0-20181002182613-4571df4b1daf/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA= -github.com/gobuffalo/flect v0.0.0-20181007231023-ae7ed6bfe683/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA= -github.com/gobuffalo/flect v0.0.0-20181018182602-fd24a256709f/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA= -github.com/gobuffalo/flect v0.0.0-20181019110701-3d6f0b585514/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA= -github.com/gobuffalo/flect v0.0.0-20181024204909-8f6be1a8c6c2/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA= -github.com/gobuffalo/flect v0.0.0-20181104133451-1f6e9779237a/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA= -github.com/gobuffalo/flect v0.0.0-20181114183036-47375f6d8328/go.mod h1:0HvNbHdfh+WOvDSIASqJOSxTOWSxCCUF++k/Y53v9rI= -github.com/gobuffalo/flect v0.0.0-20181210151238-24a2b68e0316/go.mod h1:en58vff74S9b99Eg42Dr+/9yPu437QjlNsO/hBYPuOk= -github.com/gobuffalo/flect v0.0.0-20190104192022-4af577e09bf2/go.mod h1:en58vff74S9b99Eg42Dr+/9yPu437QjlNsO/hBYPuOk= -github.com/gobuffalo/flect v0.0.0-20190117212819-a62e61d96794/go.mod h1:397QT6v05LkZkn07oJXXT6y9FCfwC8Pug0WA2/2mE9k= -github.com/gobuffalo/flect v0.1.0 h1:EJvbvZlo9exJk5UK02lz5pTs3XEpIM5/4o691KfvtkM= -github.com/gobuffalo/flect v0.1.0/go.mod h1:d2ehjJqGOH/Kjqcoz+F7jHTBbmDb38yXA598Hb50EGs= -github.com/gobuffalo/genny v0.0.0-20180924032338-7af3a40f2252/go.mod h1:tUTQOogrr7tAQnhajMSH6rv1BVev34H2sa1xNHMy94g= -github.com/gobuffalo/genny v0.0.0-20181003150629-3786a0744c5d/go.mod h1:WAd8HmjMVrnkAZbmfgH5dLBUchsZfqzp/WS5sQz+uTM= -github.com/gobuffalo/genny v0.0.0-20181005145118-318a41a134cc/go.mod h1:WAd8HmjMVrnkAZbmfgH5dLBUchsZfqzp/WS5sQz+uTM= -github.com/gobuffalo/genny v0.0.0-20181007153042-b8de7d566757/go.mod h1:+oG5Ljrw04czAHbPXREwaFojJbpUvcIy4DiOnbEJFTA= -github.com/gobuffalo/genny v0.0.0-20181012161047-33e5f43d83a6/go.mod h1:+oG5Ljrw04czAHbPXREwaFojJbpUvcIy4DiOnbEJFTA= -github.com/gobuffalo/genny v0.0.0-20181017160347-90a774534246/go.mod h1:+oG5Ljrw04czAHbPXREwaFojJbpUvcIy4DiOnbEJFTA= -github.com/gobuffalo/genny v0.0.0-20181024195656-51392254bf53/go.mod h1:o9GEH5gn5sCKLVB5rHFC4tq40rQ3VRUzmx6WwmaqISE= -github.com/gobuffalo/genny v0.0.0-20181025145300-af3f81d526b8/go.mod h1:uZ1fFYvdcP8mu0B/Ynarf6dsGvp7QFIpk/QACUuFUVI= -github.com/gobuffalo/genny v0.0.0-20181027191429-94d6cfb5c7fc/go.mod h1:x7SkrQQBx204Y+O9EwRXeszLJDTaWN0GnEasxgLrQTA= -github.com/gobuffalo/genny v0.0.0-20181027195209-3887b7171c4f/go.mod h1:JbKx8HSWICu5zyqWOa0dVV1pbbXOHusrSzQUprW6g+w= -github.com/gobuffalo/genny v0.0.0-20181106193839-7dcb0924caf1/go.mod h1:x61yHxvbDCgQ/7cOAbJCacZQuHgB0KMSzoYcw5debjU= -github.com/gobuffalo/genny v0.0.0-20181107223128-f18346459dbe/go.mod h1:utQD3aKKEsdb03oR+Vi/6ztQb1j7pO10N3OBoowRcSU= -github.com/gobuffalo/genny v0.0.0-20181114215459-0a4decd77f5d/go.mod h1:kN2KZ8VgXF9VIIOj/GM0Eo7YK+un4Q3tTreKOf0q1ng= -github.com/gobuffalo/genny v0.0.0-20181119162812-e8ff4adce8bb/go.mod h1:BA9htSe4bZwBDJLe8CUkoqkypq3hn3+CkoHqVOW718E= -github.com/gobuffalo/genny v0.0.0-20181127225641-2d959acc795b/go.mod h1:l54xLXNkteX/PdZ+HlgPk1qtcrgeOr3XUBBPDbH+7CQ= -github.com/gobuffalo/genny v0.0.0-20181128191930-77e34f71ba2a/go.mod h1:FW/D9p7cEEOqxYA71/hnrkOWm62JZ5ZNxcNIVJEaWBU= -github.com/gobuffalo/genny v0.0.0-20181203165245-fda8bcce96b1/go.mod h1:wpNSANu9UErftfiaAlz1pDZclrYzLtO5lALifODyjuM= -github.com/gobuffalo/genny v0.0.0-20181203201232-849d2c9534ea/go.mod h1:wpNSANu9UErftfiaAlz1pDZclrYzLtO5lALifODyjuM= -github.com/gobuffalo/genny v0.0.0-20181206121324-d6fb8a0dbe36/go.mod h1:wpNSANu9UErftfiaAlz1pDZclrYzLtO5lALifODyjuM= -github.com/gobuffalo/genny v0.0.0-20181207164119-84844398a37d/go.mod h1:y0ysCHGGQf2T3vOhCrGHheYN54Y/REj0ayd0Suf4C/8= -github.com/gobuffalo/genny v0.0.0-20181211165820-e26c8466f14d/go.mod h1:sHnK+ZSU4e2feXP3PA29ouij6PUEiN+RCwECjCTB3yM= -github.com/gobuffalo/genny v0.0.0-20190104222617-a71664fc38e7/go.mod h1:QPsQ1FnhEsiU8f+O0qKWXz2RE4TiDqLVChWkBuh1WaY= -github.com/gobuffalo/genny v0.0.0-20190112155932-f31a84fcacf5/go.mod h1:CIaHCrSIuJ4il6ka3Hub4DR4adDrGoXGEEt2FbBxoIo= -github.com/gobuffalo/genny v0.0.0-20190124191459-3310289fa4b4/go.mod h1:yIRqxhZV2sAzb+B3iPUMLauTRrYP8tJUlZ1zV9teKik= -github.com/gobuffalo/genny v0.0.0-20190131150032-1045e97d19fb/go.mod h1:yIRqxhZV2sAzb+B3iPUMLauTRrYP8tJUlZ1zV9teKik= -github.com/gobuffalo/genny v0.0.0-20190131190646-008a76242145/go.mod h1:NJvPZJxb9M4z790P6N2SMZKSUYpASpEvLuUWnHGKzb4= -github.com/gobuffalo/gitgen v0.0.0-20190219185555-91c2c5f0aad5 h1:TKLkvMd0sYNEsoVsoIGUzjFNtM7eMlQqLf/4JwlKVaE= -github.com/gobuffalo/gitgen v0.0.0-20190219185555-91c2c5f0aad5/go.mod h1:ZzGIrxBvCJEluaU4i3CN0GFlu1Qmb3yK8ziV02evJ1E= -github.com/gobuffalo/github_flavored_markdown v1.0.4/go.mod h1:uRowCdK+q8d/RF0Kt3/DSalaIXbb0De/dmTqMQdkQ4I= -github.com/gobuffalo/github_flavored_markdown v1.0.5/go.mod h1:U0643QShPF+OF2tJvYNiYDLDGDuQmJZXsf/bHOJPsMY= -github.com/gobuffalo/github_flavored_markdown v1.0.7/go.mod h1:w93Pd9Lz6LvyQXEG6DktTPHkOtCbr+arAD5mkwMzXLI= -github.com/gobuffalo/gogen v0.0.0-20190219194924-d32a17ad9761 h1:KJFgsBn2pl82SyCJrVO1ksoJq7u5a+f1MeBvmjHtGTk= -github.com/gobuffalo/gogen v0.0.0-20190219194924-d32a17ad9761/go.mod h1:v47C8sid+ZM2qK+YpQ2MGJKssKAqyTsH1wl/pTCPdz8= -github.com/gobuffalo/httptest v1.0.2/go.mod h1:7T1IbSrg60ankme0aDLVnEY0h056g9M1/ZvpVThtB7E= -github.com/gobuffalo/licenser v0.0.0-20180924033006-eae28e638a42/go.mod h1:Ubo90Np8gpsSZqNScZZkVXXAo5DGhTb+WYFIjlnog8w= -github.com/gobuffalo/licenser v0.0.0-20181025145548-437d89de4f75/go.mod h1:x3lEpYxkRG/XtGCUNkio+6RZ/dlOvLzTI9M1auIwFcw= -github.com/gobuffalo/licenser v0.0.0-20181027200154-58051a75da95/go.mod h1:BzhaaxGd1tq1+OLKObzgdCV9kqVhbTulxOpYbvMQWS0= -github.com/gobuffalo/licenser v0.0.0-20181109171355-91a2a7aac9a7/go.mod h1:m+Ygox92pi9bdg+gVaycvqE8RVSjZp7mWw75+K5NPHk= -github.com/gobuffalo/licenser v0.0.0-20181128165715-cc7305f8abed/go.mod h1:oU9F9UCE+AzI/MueCKZamsezGOOHfSirltllOVeRTAE= -github.com/gobuffalo/licenser v0.0.0-20181203160806-fe900bbede07/go.mod h1:ph6VDNvOzt1CdfaWC+9XwcBnlSTBz2j49PBwum6RFaU= -github.com/gobuffalo/licenser v0.0.0-20181211173111-f8a311c51159/go.mod h1:ve/Ue99DRuvnTaLq2zKa6F4KtHiYf7W046tDjuGYPfM= -github.com/gobuffalo/logger v0.0.0-20181022175615-46cfb361fc27/go.mod h1:8sQkgyhWipz1mIctHF4jTxmJh1Vxhp7mP8IqbljgJZo= -github.com/gobuffalo/logger v0.0.0-20181027144941-73d08d2bb969/go.mod h1:7uGg2duHKpWnN4+YmyKBdLXfhopkAdVM6H3nKbyFbz8= -github.com/gobuffalo/logger v0.0.0-20181027193913-9cf4dd0efe46/go.mod h1:7uGg2duHKpWnN4+YmyKBdLXfhopkAdVM6H3nKbyFbz8= -github.com/gobuffalo/logger v0.0.0-20181109185836-3feeab578c17/go.mod h1:oNErH0xLe+utO+OW8ptXMSA5DkiSEDW1u3zGIt8F9Ew= -github.com/gobuffalo/logger v0.0.0-20181117211126-8e9b89b7c264/go.mod h1:5etB91IE0uBlw9k756fVKZJdS+7M7ejVhmpXXiSFj0I= -github.com/gobuffalo/logger v0.0.0-20181127160119-5b956e21995c h1:Z/ppYX6EtPEysbW4VEGz2dO+4F4VTthWp2sWRUCANdU= -github.com/gobuffalo/logger v0.0.0-20181127160119-5b956e21995c/go.mod h1:+HxKANrR9VGw9yN3aOAppJKvhO05ctDi63w4mDnKv2U= -github.com/gobuffalo/makr v1.1.5/go.mod h1:Y+o0btAH1kYAMDJW/TX3+oAXEu0bmSLLoC9mIFxtzOw= -github.com/gobuffalo/mapi v1.0.0/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= -github.com/gobuffalo/mapi v1.0.1 h1:JRuTiZzDEZhBHkFiHTxJkYRT6CbYuL0K/rn+1byJoEA= -github.com/gobuffalo/mapi v1.0.1/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= -github.com/gobuffalo/meta v0.0.0-20181018155829-df62557efcd3/go.mod h1:XTTOhwMNryif3x9LkTTBO/Llrveezd71u3quLd0u7CM= -github.com/gobuffalo/meta v0.0.0-20181018192820-8c6cef77dab3/go.mod h1:E94EPzx9NERGCY69UWlcj6Hipf2uK/vnfrF4QD0plVE= -github.com/gobuffalo/meta v0.0.0-20181025145500-3a985a084b0a/go.mod h1:YDAKBud2FP7NZdruCSlmTmDOZbVSa6bpK7LJ/A/nlKg= -github.com/gobuffalo/meta v0.0.0-20181114191255-b130ebedd2f7/go.mod h1:K6cRZ29ozr4Btvsqkjvg5nDFTLOgTqf03KA70Ks0ypE= -github.com/gobuffalo/meta v0.0.0-20181127070345-0d7e59dd540b/go.mod h1:RLO7tMvE0IAKAM8wny1aN12pvEKn7EtkBLkUZR00Qf8= -github.com/gobuffalo/meta v0.0.0-20190120163247-50bbb1fa260d/go.mod h1:KKsH44nIK2gA8p0PJmRT9GvWJUdphkDUA8AJEvFWiqM= -github.com/gobuffalo/meta v0.0.0-20190121163014-ecaa953cbfb3 h1:JzhweLavqD8ZNLOIBRvE5IPyp+sw/wYQmL9c5XwZuHI= -github.com/gobuffalo/meta v0.0.0-20190121163014-ecaa953cbfb3/go.mod h1:KLfkGnS+Tucc+iTkUcAUBtxpwOJGfhw2pHRLddPxMQY= -github.com/gobuffalo/mw-basicauth v1.0.3/go.mod h1:dg7+ilMZOKnQFHDefUzUHufNyTswVUviCBgF244C1+0= -github.com/gobuffalo/mw-contenttype v0.0.0-20180802152300-74f5a47f4d56/go.mod h1:7EvcmzBbeCvFtQm5GqF9ys6QnCxz2UM1x0moiWLq1No= -github.com/gobuffalo/mw-csrf v0.0.0-20180802151833-446ff26e108b/go.mod h1:sbGtb8DmDZuDUQoxjr8hG1ZbLtZboD9xsn6p77ppcHo= -github.com/gobuffalo/mw-forcessl v0.0.0-20180802152810-73921ae7a130/go.mod h1:JvNHRj7bYNAMUr/5XMkZaDcw3jZhUZpsmzhd//FFWmQ= -github.com/gobuffalo/mw-i18n v0.0.0-20180802152014-e3060b7e13d6/go.mod h1:91AQfukc52A6hdfIfkxzyr+kpVYDodgAeT5cjX1UIj4= -github.com/gobuffalo/mw-paramlogger v0.0.0-20181005191442-d6ee392ec72e/go.mod h1:6OJr6VwSzgJMqWMj7TYmRUqzNe2LXu/W1rRW4MAz/ME= -github.com/gobuffalo/mw-tokenauth v0.0.0-20181001105134-8545f626c189/go.mod h1:UqBF00IfKvd39ni5+yI5MLMjAf4gX7cDKN/26zDOD6c= -github.com/gobuffalo/packd v0.0.0-20181027182251-01ad393492c8/go.mod h1:SmdBdhj6uhOsg1Ui4SFAyrhuc7U4VCildosO5IDJ3lc= -github.com/gobuffalo/packd v0.0.0-20181027190505-aafc0d02c411/go.mod h1:SmdBdhj6uhOsg1Ui4SFAyrhuc7U4VCildosO5IDJ3lc= -github.com/gobuffalo/packd v0.0.0-20181027194105-7ae579e6d213/go.mod h1:SmdBdhj6uhOsg1Ui4SFAyrhuc7U4VCildosO5IDJ3lc= -github.com/gobuffalo/packd v0.0.0-20181031195726-c82734870264/go.mod h1:Yf2toFaISlyQrr5TfO3h6DB9pl9mZRmyvBGQb/aQ/pI= -github.com/gobuffalo/packd v0.0.0-20181104210303-d376b15f8e96/go.mod h1:Yf2toFaISlyQrr5TfO3h6DB9pl9mZRmyvBGQb/aQ/pI= -github.com/gobuffalo/packd v0.0.0-20181111195323-b2e760a5f0ff/go.mod h1:Yf2toFaISlyQrr5TfO3h6DB9pl9mZRmyvBGQb/aQ/pI= -github.com/gobuffalo/packd v0.0.0-20181114190715-f25c5d2471d7/go.mod h1:Yf2toFaISlyQrr5TfO3h6DB9pl9mZRmyvBGQb/aQ/pI= -github.com/gobuffalo/packd v0.0.0-20181124090624-311c6248e5fb/go.mod h1:Foenia9ZvITEvG05ab6XpiD5EfBHPL8A6hush8SJ0o8= -github.com/gobuffalo/packd v0.0.0-20181207120301-c49825f8f6f4/go.mod h1:LYc0TGKFBBFTRC9dg2pcRcMqGCTMD7T2BIMP7OBuQAA= -github.com/gobuffalo/packd v0.0.0-20181212173646-eca3b8fd6687 h1:uZ+G4JprR0UEq0aHZs+6eP7TEZuFfrIkmQWejIBV/QQ= -github.com/gobuffalo/packd v0.0.0-20181212173646-eca3b8fd6687/go.mod h1:LYc0TGKFBBFTRC9dg2pcRcMqGCTMD7T2BIMP7OBuQAA= -github.com/gobuffalo/packr v1.13.7/go.mod h1:KkinLIn/n6+3tVXMwg6KkNvWwVsrRAz4ph+jgpk3Z24= -github.com/gobuffalo/packr v1.15.0/go.mod h1:t5gXzEhIviQwVlNx/+3SfS07GS+cZ2hn76WLzPp6MGI= -github.com/gobuffalo/packr v1.15.1/go.mod h1:IeqicJ7jm8182yrVmNbM6PR4g79SjN9tZLH8KduZZwE= -github.com/gobuffalo/packr v1.19.0/go.mod h1:MstrNkfCQhd5o+Ct4IJ0skWlxN8emOq8DsoT1G98VIU= -github.com/gobuffalo/packr v1.20.0/go.mod h1:JDytk1t2gP+my1ig7iI4NcVaXr886+N0ecUga6884zw= -github.com/gobuffalo/packr v1.21.0/go.mod h1:H00jGfj1qFKxscFJSw8wcL4hpQtPe1PfU2wa6sg/SR0= -github.com/gobuffalo/packr/v2 v2.0.0-rc.8/go.mod h1:y60QCdzwuMwO2R49fdQhsjCPv7tLQFR0ayzxxla9zes= -github.com/gobuffalo/packr/v2 v2.0.0-rc.9/go.mod h1:fQqADRfZpEsgkc7c/K7aMew3n4aF1Kji7+lIZeR98Fc= -github.com/gobuffalo/packr/v2 v2.0.0-rc.10/go.mod h1:4CWWn4I5T3v4c1OsJ55HbHlUEKNWMITG5iIkdr4Px4w= -github.com/gobuffalo/packr/v2 v2.0.0-rc.11/go.mod h1:JoieH/3h3U4UmatmV93QmqyPUdf4wVM9HELaHEu+3fk= -github.com/gobuffalo/packr/v2 v2.0.0-rc.12/go.mod h1:FV1zZTsVFi1DSCboO36Xgs4pzCZBjB/tDV9Cz/lSaR8= -github.com/gobuffalo/packr/v2 v2.0.0-rc.13/go.mod h1:2Mp7GhBFMdJlOK8vGfl7SYtfMP3+5roE39ejlfjw0rA= -github.com/gobuffalo/packr/v2 v2.0.0-rc.14/go.mod h1:06otbrNvDKO1eNQ3b8hst+1010UooI2MFg+B2Ze4MV8= -github.com/gobuffalo/packr/v2 v2.0.0-rc.15/go.mod h1:IMe7H2nJvcKXSF90y4X1rjYIRlNMJYCxEhssBXNZwWs= -github.com/gobuffalo/packr/v2 v2.0.0/go.mod h1:7McfLpSxaPUoSQm7gYpTZRQSK63mX8EKzzYSEFKvfkM= -github.com/gobuffalo/packr/v2 v2.0.1 h1:2jz0jiCa634BwBZkF7NJNWHD7nGsztQDV7gmM2jJhLs= -github.com/gobuffalo/packr/v2 v2.0.1/go.mod h1:tp5/5A2e67F1lUGTiNadtA2ToP045+mvkWzaqMCsZr4= -github.com/gobuffalo/plush v3.7.16+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= -github.com/gobuffalo/plush v3.7.20+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= -github.com/gobuffalo/plush v3.7.21+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= -github.com/gobuffalo/plush v3.7.22+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= -github.com/gobuffalo/plush v3.7.23+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= -github.com/gobuffalo/plush v3.7.30+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= -github.com/gobuffalo/plush v3.7.31+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= -github.com/gobuffalo/plush v3.7.32+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= -github.com/gobuffalo/plush v3.7.33+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= -github.com/gobuffalo/plushgen v0.0.0-20181128164830-d29dcb966cb2/go.mod h1:r9QwptTFnuvSaSRjpSp4S2/4e2D3tJhARYbvEBcKSb4= -github.com/gobuffalo/plushgen v0.0.0-20181203163832-9fc4964505c2/go.mod h1:opEdT33AA2HdrIwK1aibqnTJDVVKXC02Bar/GT1YRVs= -github.com/gobuffalo/plushgen v0.0.0-20181207152837-eedb135bd51b/go.mod h1:Lcw7HQbEVm09sAQrCLzIxuhFbB3nAgp4c55E+UlynR0= -github.com/gobuffalo/plushgen v0.0.0-20190104222512-177cd2b872b3/go.mod h1:tYxCozi8X62bpZyKXYHw1ncx2ZtT2nFvG42kuLwYjoc= -github.com/gobuffalo/pop v4.8.2+incompatible/go.mod h1:DwBz3SD5SsHpTZiTubcsFWcVDpJWGsxjVjMPnkiThWg= -github.com/gobuffalo/pop v4.8.3+incompatible/go.mod h1:DwBz3SD5SsHpTZiTubcsFWcVDpJWGsxjVjMPnkiThWg= -github.com/gobuffalo/pop v4.8.4+incompatible/go.mod h1:DwBz3SD5SsHpTZiTubcsFWcVDpJWGsxjVjMPnkiThWg= -github.com/gobuffalo/release v1.0.35/go.mod h1:VtHFAKs61vO3wboCec5xr9JPTjYyWYcvaM3lclkc4x4= -github.com/gobuffalo/release v1.0.38/go.mod h1:VtHFAKs61vO3wboCec5xr9JPTjYyWYcvaM3lclkc4x4= -github.com/gobuffalo/release v1.0.42/go.mod h1:RPs7EtafH4oylgetOJpGP0yCZZUiO4vqHfTHJjSdpug= -github.com/gobuffalo/release v1.0.52/go.mod h1:RPs7EtafH4oylgetOJpGP0yCZZUiO4vqHfTHJjSdpug= -github.com/gobuffalo/release v1.0.53/go.mod h1:FdF257nd8rqhNaqtDWFGhxdJ/Ig4J7VcS3KL7n/a+aA= -github.com/gobuffalo/release v1.0.54/go.mod h1:Pe5/RxRa/BE8whDpGfRqSI7D1a0evGK1T4JDm339tJc= -github.com/gobuffalo/release v1.0.61/go.mod h1:mfIO38ujUNVDlBziIYqXquYfBF+8FDHUjKZgYC1Hj24= -github.com/gobuffalo/release v1.0.72/go.mod h1:NP5NXgg/IX3M5XmHmWR99D687/3Dt9qZtTK/Lbwc1hU= -github.com/gobuffalo/release v1.1.1/go.mod h1:Sluak1Xd6kcp6snkluR1jeXAogdJZpFFRzTYRs/2uwg= -github.com/gobuffalo/release v1.1.3/go.mod h1:CuXc5/m+4zuq8idoDt1l4va0AXAn/OSs08uHOfMVr8E= -github.com/gobuffalo/release v1.1.6/go.mod h1:18naWa3kBsqO0cItXZNJuefCKOENpbbUIqRL1g+p6z0= -github.com/gobuffalo/shoulders v1.0.1/go.mod h1:V33CcVmaQ4gRUmHKwq1fiTXuf8Gp/qjQBUL5tHPmvbA= -github.com/gobuffalo/syncx v0.0.0-20181120191700-98333ab04150/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw= -github.com/gobuffalo/syncx v0.0.0-20181120194010-558ac7de985f h1:S5EeH1reN93KR0L6TQvkRpu9YggCYXrUqFh1iEgvdC0= -github.com/gobuffalo/syncx v0.0.0-20181120194010-558ac7de985f/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw= -github.com/gobuffalo/tags v2.0.11+incompatible/go.mod h1:9XmhOkyaB7UzvuY4UoZO4s67q8/xRMVJEaakauVQYeY= -github.com/gobuffalo/tags v2.0.14+incompatible/go.mod h1:9XmhOkyaB7UzvuY4UoZO4s67q8/xRMVJEaakauVQYeY= -github.com/gobuffalo/tags v2.0.15+incompatible/go.mod h1:9XmhOkyaB7UzvuY4UoZO4s67q8/xRMVJEaakauVQYeY= -github.com/gobuffalo/uuid v2.0.3+incompatible/go.mod h1:ErhIzkRhm0FtRuiE/PeORqcw4cVi1RtSpnwYrxuvkfE= -github.com/gobuffalo/uuid v2.0.4+incompatible/go.mod h1:ErhIzkRhm0FtRuiE/PeORqcw4cVi1RtSpnwYrxuvkfE= -github.com/gobuffalo/uuid v2.0.5+incompatible/go.mod h1:ErhIzkRhm0FtRuiE/PeORqcw4cVi1RtSpnwYrxuvkfE= -github.com/gobuffalo/validate v2.0.3+incompatible/go.mod h1:N+EtDe0J8252BgfzQUChBgfd6L93m9weay53EWFVsMM= -github.com/gobuffalo/x v0.0.0-20181003152136-452098b06085/go.mod h1:WevpGD+5YOreDJznWevcn8NTmQEW5STSBgIkpkjzqXc= -github.com/gobuffalo/x v0.0.0-20181007152206-913e47c59ca7/go.mod h1:9rDPXaB3kXdKWzMc4odGQQdG2e2DIEmANy5aSJ9yesY= -github.com/gofrs/uuid v3.1.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:tluoj9z5200jBnyusfRPU2LqT6J+DAorxEvtC7LHB+E= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/gomodule/redigo v2.0.0+incompatible/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= -github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/googleapis/gax-go v2.0.0+incompatible/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY= -github.com/googleapis/gax-go/v2 v2.0.3/go.mod h1:LLvjysVCY1JZeum8Z6l8qUty8fiNwE08qbEPm1M08qg= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= -github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/pat v0.0.0-20180118222023-199c85a7f6d1/go.mod h1:YeAe0gNeiNT5hoiZRI4yiOky6jVdNvfO2N6Kav/HmxY= -github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= -github.com/gorilla/sessions v1.1.2/go.mod h1:8KCfur6+4Mqcc6S0FEfKuN15Vl5MgXW92AE8ovaJD0w= -github.com/gorilla/sessions v1.1.3/go.mod h1:8KCfur6+4Mqcc6S0FEfKuN15Vl5MgXW92AE8ovaJD0w= -github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= -github.com/grpc-ecosystem/grpc-gateway v1.5.0/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= -github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/jackc/fake v0.0.0-20150926172116-812a484cc733/go.mod h1:WrMFNQdiFJ80sQsxDoMokWK1W5TQtxBFNpzWTD84ibQ= -github.com/jackc/pgx v3.2.0+incompatible/go.mod h1:0ZGrqGqkRlliWnWB4zKnWtjbSWbGkVEFm4TeybAXq+I= -github.com/jellevandenhooff/dkim v0.0.0-20150330215556-f50fe3d243e1/go.mod h1:E0B/fFc00Y+Rasa88328GlI/XbtyysCtTHZS8h7IrBU= -github.com/jmoiron/sqlx v0.0.0-20180614180643-0dae4fefe7c0/go.mod h1:IiEW3SEiiErVyFdH8NTuWjSifiEQKUoyK3LNqr2kCHU= -github.com/joho/godotenv v1.2.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= -github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc= -github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= -github.com/karrick/godirwalk v1.7.5/go.mod h1:2c9FRhkDxdIbgkOnCEvnSWs71Bhugbl46shStcFDJ34= -github.com/karrick/godirwalk v1.7.7/go.mod h1:2c9FRhkDxdIbgkOnCEvnSWs71Bhugbl46shStcFDJ34= -github.com/karrick/godirwalk v1.7.8 h1:VfG72pyIxgtC7+3X9CMHI0AOl4LwyRAg98WAgsvffi8= -github.com/karrick/godirwalk v1.7.8/go.mod h1:2c9FRhkDxdIbgkOnCEvnSWs71Bhugbl46shStcFDJ34= -github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/konsorten/go-windows-terminal-sequences v0.0.0-20180402223658-b729f2633dfe/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/pty v1.1.3/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/markbates/deplist v1.0.4/go.mod h1:gRRbPbbuA8TmMiRvaOzUlRfzfjeCCBqX2A6arxN01MM= -github.com/markbates/deplist v1.0.5/go.mod h1:gRRbPbbuA8TmMiRvaOzUlRfzfjeCCBqX2A6arxN01MM= -github.com/markbates/going v1.0.2/go.mod h1:UWCk3zm0UKefHZ7l8BNqi26UyiEMniznk8naLdTcy6c= -github.com/markbates/going v1.0.3/go.mod h1:fQiT6v6yQar9UD6bd/D4Z5Afbk9J6BBVBtLiyY4gp2o= -github.com/markbates/grift v1.0.4/go.mod h1:wbmtW74veyx+cgfwFhlnnMWqhoz55rnHR47oMXzsyVs= -github.com/markbates/hmax v1.0.0/go.mod h1:cOkR9dktiESxIMu+65oc/r/bdY4bE8zZw3OLhLx0X2c= -github.com/markbates/inflect v1.0.0/go.mod h1:oTeZL2KHA7CUX6X+fovmK9OvIOFuqu0TwdQrZjLTh88= -github.com/markbates/inflect v1.0.1/go.mod h1:uv3UVNBe5qBIfCm8O8Q+DW+S1EopeyINj+Ikhc7rnCk= -github.com/markbates/inflect v1.0.3/go.mod h1:1fR9+pO2KHEO9ZRtto13gDwwZaAKstQzferVeWqbgNs= -github.com/markbates/inflect v1.0.4/go.mod h1:1fR9+pO2KHEO9ZRtto13gDwwZaAKstQzferVeWqbgNs= -github.com/markbates/oncer v0.0.0-20180924031910-e862a676800b/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= -github.com/markbates/oncer v0.0.0-20180924034138-723ad0170a46/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= -github.com/markbates/oncer v0.0.0-20181014194634-05fccaae8fc4/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= -github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2 h1:JgVTCPf0uBVcUSWpyXmGpgOc62nK5HWUBKAGc3Qqa5k= -github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= -github.com/markbates/refresh v1.4.10/go.mod h1:NDPHvotuZmTmesXxr95C9bjlw1/0frJwtME2dzcVKhc= -github.com/markbates/safe v1.0.0/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= -github.com/markbates/safe v1.0.1 h1:yjZkbvRM6IzKj9tlu/zMJLS0n/V351OZWRnF3QfaUxI= -github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= -github.com/markbates/sigtx v1.0.0/go.mod h1:QF1Hv6Ic6Ca6W+T+DL0Y/ypborFKyvUY9HmuCD4VeTc= -github.com/markbates/willie v1.0.9/go.mod h1:fsrFVWl91+gXpx/6dv715j7i11fYPfZ9ZGfH0DQzY7w= -github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/microcosm-cc/bluemonday v1.0.1/go.mod h1:hsXNsILzKxV+sX77C5b8FSuKF00vh2OMYv+xgHpAMF4= -github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc= -github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/mapstructure v1.0.0/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/monoculum/formam v0.0.0-20180901015400-4e68be1d79ba/go.mod h1:RKgILGEJq24YyJ2ban8EO0RUVSJlF1pGsEvoLEACr/Q= -github.com/neelance/astrewrite v0.0.0-20160511093645-99348263ae86/go.mod h1:kHJEU3ofeGjhHklVoIGuVj85JJwZ6kWPaJwCIxgnFmo= -github.com/neelance/sourcemap v0.0.0-20151028013722-8c68805598ab/go.mod h1:Qr6/a/Q4r9LP1IltGz7tA7iOK1WonHEYhu1HRBA7ZiM= -github.com/nicksnyder/go-i18n v1.10.0/go.mod h1:HrK7VCrbOvQoUAQ7Vpy7i87N7JZZZ7R2xBGjv0j365Q= -github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= -github.com/onsi/gomega v1.4.2/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8= -github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/rogpeppe/go-internal v1.0.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.1.0 h1:g0fH8RicVgNl+zVZDCDfbdWxAWoAEJyI7I3TZYXFiig= -github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= -github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= -github.com/serenize/snaker v0.0.0-20171204205717-a683aaf2d516/go.mod h1:Yow6lPLSAXx2ifx470yD/nUe22Dv5vBvxK/UK9UUTVs= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= -github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= -github.com/shurcooL/component v0.0.0-20170202220835-f88ec8f54cc4/go.mod h1:XhFIlyj5a1fBNx5aJTbKoIq0mNaPvOagO+HjB3EtxrY= -github.com/shurcooL/events v0.0.0-20181021180414-410e4ca65f48/go.mod h1:5u70Mqkb5O5cxEA8nxTsgrgLehJeAw6Oc4Ab1c/P1HM= -github.com/shurcooL/github_flavored_markdown v0.0.0-20181002035957-2122de532470/go.mod h1:2dOwnU2uBioM+SGy2aZoq1f/Sd1l9OkAeAUvjSyvgU0= -github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= -github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ= -github.com/shurcooL/gofontwoff v0.0.0-20180329035133-29b52fc0a18d/go.mod h1:05UtEgK5zq39gLST6uB0cf3NEHjETfB4Fgr3Gx5R9Vw= -github.com/shurcooL/gopherjslib v0.0.0-20160914041154-feb6d3990c2c/go.mod h1:8d3azKNyqcHP1GaQE/c6dDgjkgSx2BZ4IoEi4F1reUI= -github.com/shurcooL/highlight_diff v0.0.0-20170515013008-09bb4053de1b/go.mod h1:ZpfEhSmds4ytuByIcDnOLkTHGUI6KNqRNPDLHDk+mUU= -github.com/shurcooL/highlight_go v0.0.0-20170515013102-78fb10f4a5f8/go.mod h1:UDKB5a1T23gOMUJrI+uSuH0VRDStOiUVSjBTRDVBVag= -github.com/shurcooL/highlight_go v0.0.0-20181028180052-98c3abbbae20/go.mod h1:UDKB5a1T23gOMUJrI+uSuH0VRDStOiUVSjBTRDVBVag= -github.com/shurcooL/home v0.0.0-20181020052607-80b7ffcb30f9/go.mod h1:+rgNQw2P9ARFAs37qieuu7ohDNQ3gds9msbT2yn85sg= -github.com/shurcooL/htmlg v0.0.0-20170918183704-d01228ac9e50/go.mod h1:zPn1wHpTIePGnXSHpsVPWEktKXHr6+SS6x/IKRb7cpw= -github.com/shurcooL/httperror v0.0.0-20170206035902-86b7830d14cc/go.mod h1:aYMfkZ6DWSJPJ6c4Wwz3QtW22G7mf/PEgaB9k/ik5+Y= -github.com/shurcooL/httpfs v0.0.0-20171119174359-809beceb2371/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg= -github.com/shurcooL/httpgzip v0.0.0-20180522190206-b1c53ac65af9/go.mod h1:919LwcH0M7/W4fcZ0/jy0qGght1GIhqyS/EgWGH2j5Q= -github.com/shurcooL/issues v0.0.0-20181008053335-6292fdc1e191/go.mod h1:e2qWDig5bLteJ4fwvDAc2NHzqFEthkqn7aOZAOpj+PQ= -github.com/shurcooL/issuesapp v0.0.0-20180602232740-048589ce2241/go.mod h1:NPpHK2TI7iSaM0buivtFUc9offApnI0Alt/K8hcHy0I= -github.com/shurcooL/notifications v0.0.0-20181007000457-627ab5aea122/go.mod h1:b5uSkrEVM1jQUspwbixRBhaIjIzL2xazXp6kntxYle0= -github.com/shurcooL/octicon v0.0.0-20180602230221-c42b0e3b24d9/go.mod h1:eWdoE5JD4R5UVWDucdOPg1g2fqQRq78IQa9zlOV1vpQ= -github.com/shurcooL/octicon v0.0.0-20181028054416-fa4f57f9efb2/go.mod h1:eWdoE5JD4R5UVWDucdOPg1g2fqQRq78IQa9zlOV1vpQ= -github.com/shurcooL/reactions v0.0.0-20181006231557-f2e0b4ca5b82/go.mod h1:TCR1lToEk4d2s07G3XGfz2QrgHXg4RJBvjrOozvoWfk= -github.com/shurcooL/sanitized_anchor_name v0.0.0-20170918181015-86672fcb3f95/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/shurcooL/users v0.0.0-20180125191416-49c67e49c537/go.mod h1:QJTqeLYEDaXHZDBsXlPCDqdhQuJkuw4NOtaxYe3xii4= -github.com/shurcooL/webdavfs v0.0.0-20170829043945-18c3829fa133/go.mod h1:hKmq5kWdCj2z2KEozexVbfEZIWiTjhE0+UjmZgPqehw= -github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= -github.com/sirupsen/logrus v1.1.0/go.mod h1:zrgwTnHtNr00buQ1vSptGe8m1f/BbgsPukg8qsT7A+A= -github.com/sirupsen/logrus v1.1.1/go.mod h1:zrgwTnHtNr00buQ1vSptGe8m1f/BbgsPukg8qsT7A+A= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.3.0 h1:hI/7Q+DtNZ2kINb6qt/lS+IyXnHQe9e90POfeewL/ME= -github.com/sirupsen/logrus v1.3.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d/go.mod h1:UdhH50NIW0fCiwBSr0co2m7BnFLdv4fQTgdqdJTHFeE= -github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e/go.mod h1:HuIsMU8RRBOtsCgI77wP899iHVBQpCmg4ErYMZB+2IA= -github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.2.0/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= -github.com/spf13/cast v1.2.0/go.mod h1:r2rcYCSwa1IExKTDiTfzaxqT2FNHs8hODu4LnUfgKEg= -github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v0.0.3 h1:ZlrZ4XsMRm04Fr5pSFxBgfND2EBVa1nLpiy1stUsX/8= -github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/pflag v1.0.2/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/viper v1.2.1/go.mod h1:P4AexN0a+C9tGAnUFNwDMYYZv3pjFuvmeiMyKRaNVlI= -github.com/spf13/viper v1.3.1/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA= -github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/unrolled/secure v0.0.0-20180918153822-f340ee86eb8b/go.mod h1:mnPT77IAdsi/kV7+Es7y+pXALeV3h7G6dQF6mNYjcLA= -github.com/unrolled/secure v0.0.0-20181005190816-ff9db2ff917f/go.mod h1:mnPT77IAdsi/kV7+Es7y+pXALeV3h7G6dQF6mNYjcLA= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= -go.opencensus.io v0.18.0/go.mod h1:vKdFvxhtzZ9onBp9VKHK8z/sRpBMnKAsufL7wlDrCOA= -go4.org v0.0.0-20180809161055-417644f6feb5/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE= -golang.org/x/build v0.0.0-20190111050920-041ab4dc3f9d/go.mod h1:OWs+y06UdEOHN4y+MfF/py+xQ/tYqIWW03b70/CG9Rw= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20180910181607-0e37d006457b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181001203147-e3636079e1a4/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181009213950-7c1a557ab941/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181015023909-0c41d7ab0a0e/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181024171144-74cb1d3d52f4/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181025113841-85e1b3f9139a/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181025213731-e84da0312774/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181106171534-e4dc69e5b2fd/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181112202954-3d3f9f413869/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181127143415-eb0de9b17e85/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190102171810-8d7daa0c54b3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190103213133-ff983b9c42bc/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67 h1:ng3VDlRp5/DHpSWl02R4rM9I+8M2rhmsuLwAMmkLQWE= -golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180816102801-aaf60122140d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180921000356-2f5d2388922f/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180926154720-4dfa2610cdf3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181011144130-49bb7cea24b1/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181017193950-04a2e542c03f/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181029044818-c44066c5c816/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181102091132-c10e9556a7bc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181106065722-10aee1819953/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181207154023-610586996380/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/perf v0.0.0-20180704124530-6e6d33e29852/go.mod h1:JLpeXjPJfIyPr5TlbXLkXWLhP8nz10XfvxElABhCtcw= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180816055513-1c9583448a9c/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180906133057-8cf3aee42992/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180921163948-d47a0f339242/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180927150500-dad3d9fb7b6e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181005133103-4497e2df6f9e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181011152604-fa43e7bc11ba/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181022134430-8a28ead16f52/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181024145615-5cd93ef61a7c/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181025063200-d989b31c8746/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181026064943-731415f00dce/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181029174526-d69651ed3497/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181106135930-3a76605856fd/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181206074257-70b957f3b65e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190102155601-82a175fd1598/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190116161447-11f53e031339 h1:g/Jesu8+QLnA0CPzF3E1pURg0Byr7i6jLoX5sqjcAh0= -golang.org/x/sys v0.0.0-20190116161447-11f53e031339/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181003024731-2f84ea8ef872/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181006002542-f60d9635b16a/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181008205924-a2b3f7f249e9/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181013182035-5e66757b835f/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181017214349-06f26fdaaa28/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181024171208-a2dc47679d30/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181026183834-f60e5f99f081/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181030000716-a0a13e073c7b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181105230042-78dc5bac0cac/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181107215632-34b416bd17b3/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181114190951-94339b83286c/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181119130350-139d099f6620/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181127195227-b4e97c0ed882/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181127232545-e782529d0ddd/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181203210056-e5f3ab76ea4b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181205224935-3576414c54a4/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181206194817-bcd4e47d0288/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181207183836-8bc39b988060/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181212172921-837e80568c09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190102213336-ca9055ed7d04/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190104182027-498d95493402/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190111214448-fc1d57b08d7b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190118193359-16909d206f00/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190124004107-78ee07aa9465/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190131142011-8dbcc66f33bb/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190206221403-44bcb96178d3/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190219185102-9394956cfdc5 h1:b4GZ2lQCm9+A7Et8ySqSq+t8f3wN+q56prDeN1DPAhQ= -golang.org/x/tools v0.0.0-20190219185102-9394956cfdc5/go.mod h1:E6PF97AdD6v0s+fPshSmumCW1S1Ne85RbPQxELkKa44= -google.golang.org/api v0.0.0-20180910000450-7ca32eb868bf/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= -google.golang.org/api v0.0.0-20181030000543-1d582fd0359e/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= -google.golang.org/api v0.1.0/go.mod h1:UGEZY7KEX120AnNLIHFMKIo4obdJhkp2tPbaPlQx13Y= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20181029155118-b69ba1387ce2/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20181202183823-bd91e49a0898/go.mod h1:7Ep/1NZk928CDR8SjdVbjWNpdIf6nzjE3BTgJDr2Atg= -google.golang.org/genproto v0.0.0-20190201180003-4b09977fb922/go.mod h1:L3J43x8/uS+qIUoksaLKe6OS3nUKxOKuIFz1sl2/jx4= -google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= -google.golang.org/grpc v1.16.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio= -google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= -gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= -gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc/go.mod h1:m7x9LTH6d71AHyAX77c9yqWCCa3UKHcVEj9y7hAtKDk= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= -gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df/go.mod h1:LRQQ+SO6ZHR7tOkpBDuZnXENFzX8qRjMDMyPD6BRkCw= -gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/mail.v2 v2.0.0-20180731213649-a0242b2233b4/go.mod h1:htwXN1Qh09vZJ1NVKxQqHPBaCBbzKhp5GzuJEA4VJWw= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -grpc.go4.org v0.0.0-20170609214715-11d0a25b4919/go.mod h1:77eQGdRu53HpSqPFJFmuJdjuHRquDANNeA4x7B8WQ9o= -honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -sourcegraph.com/sourcegraph/go-diff v0.5.0/go.mod h1:kuch7UrkMzY0X+p9CRK03kfuPQ2zzQcaEFbx8wA8rck= -sourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4/go.mod h1:ketZ/q3QxT9HOBeFhu6RdvsftgpsbFHBF5Cas6cDKZ0= diff --git a/vendor/github.com/gobuffalo/genny/group.go b/vendor/github.com/gobuffalo/genny/group.go deleted file mode 100644 index e1be356e4..000000000 --- a/vendor/github.com/gobuffalo/genny/group.go +++ /dev/null @@ -1,30 +0,0 @@ -package genny - -import "sync" - -type Group struct { - Generators []*Generator - moot sync.RWMutex -} - -func (gg *Group) Add(g *Generator) { - m := &gg.moot - m.Lock() - defer m.Unlock() - gg.Generators = append(gg.Generators, g) -} - -func (gg *Group) Merge(g2 *Group) { - for _, g := range g2.Generators { - gg.Add(g) - } -} - -func (gg *Group) With(r *Runner) { - m := &gg.moot - m.RLock() - defer m.RUnlock() - for _, g := range gg.Generators { - r.With(g) - } -} diff --git a/vendor/github.com/gobuffalo/genny/helpers.go b/vendor/github.com/gobuffalo/genny/helpers.go deleted file mode 100644 index 67d0c59b1..000000000 --- a/vendor/github.com/gobuffalo/genny/helpers.go +++ /dev/null @@ -1,54 +0,0 @@ -package genny - -import ( - "path/filepath" - "strings" - - "github.com/gobuffalo/envy" -) - -func exts(f File) []string { - var exts []string - - name := f.Name() - ext := filepath.Ext(name) - - for ext != "" { - exts = append([]string{ext}, exts...) - name = strings.TrimSuffix(name, ext) - ext = filepath.Ext(name) - } - return exts -} - -// HasExt checks if a file has ANY of the -// extensions passed in. If no extensions -// are given then `true` is returned -func HasExt(f File, ext ...string) bool { - if len(ext) == 0 || ext == nil { - return true - } - for _, xt := range ext { - xt = strings.TrimSpace(xt) - if xt == "*" || xt == "*.*" { - return true - } - for _, x := range exts(f) { - if x == xt { - return true - } - } - } - return false -} - -// StripExt from a File and return a new one -func StripExt(f File, ext string) File { - name := f.Name() - name = strings.Replace(name, ext, "", -1) - return NewFile(name, f) -} - -func GoBin() string { - return envy.Get("GO_BIN", "go") -} diff --git a/vendor/github.com/gobuffalo/genny/logger.go b/vendor/github.com/gobuffalo/genny/logger.go deleted file mode 100644 index a262a23f4..000000000 --- a/vendor/github.com/gobuffalo/genny/logger.go +++ /dev/null @@ -1,8 +0,0 @@ -package genny - -import "github.com/gobuffalo/logger" - -// Logger interface for a logger to be used with genny. Logrus is 100% compatible. -type Logger = logger.Logger - -var DefaultLogLvl = logger.InfoLevel diff --git a/vendor/github.com/gobuffalo/genny/replacer.go b/vendor/github.com/gobuffalo/genny/replacer.go deleted file mode 100644 index 386607189..000000000 --- a/vendor/github.com/gobuffalo/genny/replacer.go +++ /dev/null @@ -1,20 +0,0 @@ -package genny - -import ( - "strings" -) - -// Replace search/replace in a file name -func Replace(search string, replace string) Transformer { - return NewTransformer("*", func(f File) (File, error) { - name := f.Name() - name = strings.Replace(name, search, replace, -1) - return NewFile(name, f), nil - }) -} - -// Dot will convert -dot- in a file name to just a . -// example -dot-travis.yml becomes .travis.yml -func Dot() Transformer { - return Replace("-dot-", ".") -} diff --git a/vendor/github.com/gobuffalo/genny/results.go b/vendor/github.com/gobuffalo/genny/results.go deleted file mode 100644 index a1a3df3e9..000000000 --- a/vendor/github.com/gobuffalo/genny/results.go +++ /dev/null @@ -1,30 +0,0 @@ -package genny - -import ( - "net/http" - "os/exec" - - "github.com/pkg/errors" -) - -type Results struct { - Files []File - Commands []*exec.Cmd - Requests []RequestResult -} - -func (r Results) Find(s string) (File, error) { - for _, f := range r.Files { - if s == f.Name() { - return f, nil - } - } - return nil, errors.Errorf("%s not found", s) -} - -type RequestResult struct { - Request *http.Request - Response *http.Response - Client *http.Client - Error error -} diff --git a/vendor/github.com/gobuffalo/genny/runner.go b/vendor/github.com/gobuffalo/genny/runner.go deleted file mode 100644 index 7a0d232e8..000000000 --- a/vendor/github.com/gobuffalo/genny/runner.go +++ /dev/null @@ -1,335 +0,0 @@ -package genny - -import ( - "context" - "fmt" - "io" - "net/http" - "os" - "os/exec" - "path/filepath" - "sort" - "strings" - "sync" - - "github.com/gobuffalo/events" - "github.com/markbates/oncer" - "github.com/markbates/safe" - "github.com/pkg/errors" - "github.com/sirupsen/logrus" -) - -type RunFn func(r *Runner) error - -// Runner will run the generators -type Runner struct { - Logger Logger // Logger to use for the run - Context context.Context // context to use for the run - ExecFn func(*exec.Cmd) error // function to use when executing files - FileFn func(File) (File, error) // function to use when writing files - ChdirFn func(string, func() error) error // function to use when changing directories - DeleteFn func(string) error // function used to delete files/folders - RequestFn func(*http.Request, *http.Client) (*http.Response, error) // function used to make http requests - LookPathFn func(string) (string, error) // function used to make exec.LookPath lookups - Root string // the root of the write path - Disk *Disk - steps map[string]*Step - generators []*Generator - moot *sync.RWMutex - results Results - curGen *Generator -} - -func (r *Runner) Results() Results { - r.moot.Lock() - defer r.moot.Unlock() - r.results.Files = r.Disk.Files() - return r.results -} - -func (r *Runner) WithRun(fn RunFn) { - g := New() - g.RunFn(fn) - r.With(g) -} - -// With adds a Generator to the Runner -func (r *Runner) With(g *Generator) error { - r.moot.Lock() - step, ok := r.steps[g.StepName] - if !ok { - var err error - step, err = NewStep(g, len(r.steps)) - if err != nil { - return errors.WithStack(err) - } - } - r.moot.Unlock() - return r.WithStep(g.StepName, step) -} - -func (r *Runner) WithGroup(gg *Group) { - for _, g := range gg.Generators { - r.With(g) - } -} - -// WithNew takes a Generator and an error. -// Perfect for new-ing up generators -/* - // foo.New(Options) (*genny.Generator, error) - if err := run.WithNew(foo.New(opts)); err != nil { - return err - } -*/ -func (r *Runner) WithNew(g *Generator, err error) error { - if err != nil { - return errors.WithStack(err) - } - r.With(g) - return nil -} - -// WithFn will evaluate the function and if successful it will add -// the Generator to the Runner, otherwise it will return the error -// Deprecated -func (r *Runner) WithFn(fn func() (*Generator, error)) error { - oncer.Deprecate(5, "genny.Runner#WithFn", "") - return safe.RunE(func() error { - g, err := fn() - if err != nil { - return errors.WithStack(err) - } - r.With(g) - return nil - }) -} - -func (r *Runner) WithStep(name string, step *Step) error { - r.moot.Lock() - defer r.moot.Unlock() - if len(name) == 0 { - name = stepName() - } - r.steps[name] = step - return nil -} - -func (r *Runner) Steps() []*Step { - r.moot.RLock() - - var steps []*Step - - for _, step := range r.steps { - steps = append(steps, step) - } - - sort.Slice(steps, func(a, b int) bool { - return steps[a].index < steps[b].index - }) - - r.moot.RUnlock() - return steps -} - -func (r *Runner) FindStep(name string) (*Step, error) { - r.moot.RLock() - s, ok := r.steps[name] - r.moot.RUnlock() - if !ok { - return nil, errors.Errorf("could not find step %s", name) - } - return s, nil -} - -func (r *Runner) ReplaceStep(name string, s *Step) error { - os, err := r.FindStep(name) - if err != nil { - return errors.WithStack(err) - } - s.index = os.index - return r.WithStep(name, s) -} - -func (r *Runner) Run() error { - if f, ok := r.Logger.(io.Closer); ok { - defer f.Close() - } - steps := r.Steps() - - payload := events.Payload{ - "runner": r, - "steps": steps, - } - - events.EmitPayload(EvtStarted, payload) - - for _, step := range steps { - if err := step.Run(r); err != nil { - payload = events.Payload{ - "runner": r, - "step": step, - } - events.EmitError(EvtFinishedErr, err, payload) - return errors.WithStack(err) - } - } - events.EmitPayload(EvtFinished, payload) - - return nil -} - -// Exec can be used inside of Generators to run commands -func (r *Runner) Exec(cmd *exec.Cmd) error { - r.results.Commands = append(r.results.Commands, cmd) - r.Logger.Debug("Exec: ", strings.Join(cmd.Args, " ")) - if r.ExecFn == nil { - return nil - } - return safe.RunE(func() error { - return r.ExecFn(cmd) - }) -} - -func (r *Runner) LookPath(s string) (string, error) { - r.Logger.Debug("LookPath: ", s) - if r.LookPathFn != nil { - return r.LookPathFn(s) - } - return s, nil -} - -// File can be used inside of Generators to write files -func (r *Runner) File(f File) error { - if r.curGen != nil { - var err error - f, err = r.curGen.Transform(f) - if err != nil { - return errors.WithStack(err) - } - } - name := f.Name() - if !filepath.IsAbs(name) { - name = filepath.Join(r.Root, name) - } - - _, isDir := f.(Dir) - if isDir { - r.Logger.Debug("Dir: ", name) - } else { - r.Logger.Debug("File: ", name) - } - - if r.FileFn != nil { - err := safe.RunE(func() error { - var e error - if f, e = r.FileFn(f); e != nil { - return errors.WithStack(e) - } - if s, ok := f.(io.Seeker); ok { - s.Seek(0, 0) - } - return nil - }) - if err != nil { - return errors.WithStack(err) - } - } - f = NewFile(f.Name(), f) - if s, ok := f.(io.Seeker); ok { - s.Seek(0, 0) - } - r.Disk.Add(f) - return nil -} - -func (r *Runner) FindFile(name string) (File, error) { - return r.Disk.Find(name) -} - -// Chdir will change to the specified directory -// and revert back to the current directory when -// the runner function has returned. -// If the directory does not exist, it will be -// created for you. -func (r *Runner) Chdir(path string, fn func() error) error { - if len(path) == 0 { - return fn() - } - r.Logger.Debug("Chdir: ", path) - - if r.ChdirFn != nil { - return safe.RunE(func() error { - return r.ChdirFn(path, fn) - }) - } - - if err := safe.RunE(fn); err != nil { - return errors.WithStack(err) - } - return nil -} - -func (r *Runner) Delete(path string) error { - r.Logger.Debug("Delete: ", path) - - defer r.Disk.Remove(path) - if r.DeleteFn != nil { - return safe.RunE(func() error { - return r.DeleteFn(path) - }) - } - return nil -} - -func (r *Runner) Request(req *http.Request) (*http.Response, error) { - return r.RequestWithClient(req, http.DefaultClient) -} - -func (r *Runner) RequestWithClient(req *http.Request, c *http.Client) (*http.Response, error) { - key := fmt.Sprintf("[%s] %s\n", strings.ToUpper(req.Method), req.URL) - r.Logger.Debug("Request: ", key) - store := func(res *http.Response, err error) (*http.Response, error) { - r.moot.Lock() - r.results.Requests = append(r.results.Requests, RequestResult{ - Request: req, - Response: res, - Client: c, - Error: err, - }) - r.moot.Unlock() - return res, err - } - if r.RequestFn == nil { - return store(nil, nil) - } - var res *http.Response - err := safe.RunE(func() error { - var e error - res, e = r.RequestFn(req, c) - if e != nil { - return errors.WithStack(e) - } - return nil - }) - return store(res, err) -} - -// NewRunner will NOT execute commands and write files -// it is NOT destructive it is just the most basic Runner -// you can have. -func NewRunner(ctx context.Context) *Runner { - pwd, _ := os.Getwd() - l := logrus.New() - l.Out = os.Stdout - l.SetLevel(logrus.DebugLevel) - r := &Runner{ - Logger: l, - Context: ctx, - Root: pwd, - moot: &sync.RWMutex{}, - steps: map[string]*Step{}, - } - r.Disk = newDisk(r) - return r -} diff --git a/vendor/github.com/gobuffalo/genny/step.go b/vendor/github.com/gobuffalo/genny/step.go deleted file mode 100644 index 49f56b280..000000000 --- a/vendor/github.com/gobuffalo/genny/step.go +++ /dev/null @@ -1,146 +0,0 @@ -package genny - -import ( - "bytes" - "crypto/sha1" - "fmt" - "io" - "math/rand" - "strconv" - "sync" - "time" - - "github.com/gobuffalo/events" - "github.com/markbates/safe" - "github.com/pkg/errors" -) - -type DeleteFn func() - -type Step struct { - as *Generator - before []*Generator - after []*Generator - index int - moot *sync.RWMutex -} - -func (s *Step) Before(g *Generator) DeleteFn { - df := func() { - var a []*Generator - s.moot.Lock() - for _, b := range s.before { - if g.StepName == b.StepName { - continue - } - a = append(a, b) - } - s.before = a - s.moot.Unlock() - } - s.moot.Lock() - s.before = append(s.before, g) - s.moot.Unlock() - return df -} - -func (s *Step) After(g *Generator) DeleteFn { - df := func() { - var a []*Generator - s.moot.Lock() - for _, b := range s.after { - if g.StepName == b.StepName { - continue - } - a = append(a, b) - } - s.after = a - s.moot.Unlock() - } - s.moot.Lock() - s.after = append(s.after, g) - s.moot.Unlock() - return df -} - -func (s *Step) Run(r *Runner) error { - for _, b := range s.before { - if err := s.runGenerator(r, b); err != nil { - return errors.WithStack(err) - } - } - - if err := s.runGenerator(r, s.as); err != nil { - return errors.WithStack(err) - } - - for _, b := range s.after { - if err := s.runGenerator(r, b); err != nil { - return errors.WithStack(err) - } - } - - return nil -} - -func (s *Step) runGenerator(r *Runner, g *Generator) error { - r.curGen = g - - payload := events.Payload{ - "runner": r, - "step": s, - "generator": g, - } - if g.Should != nil { - err := safe.RunE(func() error { - if !g.Should(r) { - return io.EOF - } - return nil - }) - if err != nil { - r.Logger.Debugf("Step: %s [skipped]", g.StepName) - events.EmitPayload(EvtStepPrefix+":skipping:"+g.StepName, payload) - return nil - } - } - r.Logger.Debugf("Step: %s", g.StepName) - events.EmitPayload(EvtStepPrefix+":running:"+g.StepName, payload) - return r.Chdir(r.Root, func() error { - for _, fn := range g.runners { - err := safe.RunE(func() error { - return fn(r) - }) - if err != nil { - events.EmitError(EvtStepPrefix+":running:"+g.StepName+":err", err, payload) - return errors.WithStack(err) - } - } - return nil - }) -} - -func NewStep(g *Generator, index int) (*Step, error) { - if g == nil { - return nil, errors.New("generator can not be nil") - } - return &Step{ - as: g, - index: index, - moot: &sync.RWMutex{}, - }, nil -} - -func init() { - rand.Seed(time.Now().UnixNano()) -} - -func stepName() string { - bb := &bytes.Buffer{} - bb.WriteString(fmt.Sprint(time.Now().UnixNano())) - bb.WriteString(strconv.Itoa(rand.Int())) - bb.WriteString(strconv.Itoa(rand.Int())) - h := sha1.New() - h.Write(bb.Bytes()) - return fmt.Sprintf("%x", h.Sum(nil))[:8] -} diff --git a/vendor/github.com/gobuffalo/genny/transformer.go b/vendor/github.com/gobuffalo/genny/transformer.go deleted file mode 100644 index 29c7fe181..000000000 --- a/vendor/github.com/gobuffalo/genny/transformer.go +++ /dev/null @@ -1,45 +0,0 @@ -package genny - -import ( - "github.com/markbates/safe" - "github.com/pkg/errors" -) - -type TransformerFn func(File) (File, error) - -type Transformer struct { - Ext string - StripExt bool - fn TransformerFn -} - -func (t Transformer) Transform(f File) (File, error) { - if !HasExt(f, t.Ext) { - return f, nil - } - if t.fn == nil { - return f, nil - } - err := safe.RunE(func() error { - var e error - f, e = t.fn(f) - if e != nil { - return errors.WithStack(e) - } - return nil - }) - if err != nil { - return f, errors.WithStack(err) - } - if t.StripExt { - return StripExt(f, t.Ext), nil - } - return f, nil -} - -func NewTransformer(ext string, fn TransformerFn) Transformer { - return Transformer{ - Ext: ext, - fn: fn, - } -} diff --git a/vendor/github.com/gobuffalo/genny/version.go b/vendor/github.com/gobuffalo/genny/version.go deleted file mode 100644 index 103c8c9f7..000000000 --- a/vendor/github.com/gobuffalo/genny/version.go +++ /dev/null @@ -1,3 +0,0 @@ -package genny - -const Version = "v0.0.1" diff --git a/vendor/github.com/gobuffalo/genny/wet_runner.go b/vendor/github.com/gobuffalo/genny/wet_runner.go deleted file mode 100644 index 6b4a87d22..000000000 --- a/vendor/github.com/gobuffalo/genny/wet_runner.go +++ /dev/null @@ -1,99 +0,0 @@ -package genny - -import ( - "context" - "io" - "net/http" - "os" - "os/exec" - "path/filepath" - "time" - - "github.com/gobuffalo/logger" - "github.com/pkg/errors" -) - -// WetRunner will execute commands and write files -// it is DESTRUCTIVE -func WetRunner(ctx context.Context) *Runner { - r := DryRunner(ctx) - l := logger.New(DefaultLogLvl) - r.Logger = l - - r.ExecFn = wetExecFn - r.FileFn = func(f File) (File, error) { - return wetFileFn(r, f) - } - r.DeleteFn = os.RemoveAll - r.RequestFn = wetRequestFn - r.ChdirFn = func(path string, fn func() error) error { - pwd, _ := os.Getwd() - defer os.Chdir(pwd) - os.MkdirAll(path, 0755) - if err := os.Chdir(path); err != nil { - return errors.WithStack(err) - } - return fn() - } - r.LookPathFn = exec.LookPath - return r -} - -func wetRequestFn(req *http.Request, c *http.Client) (*http.Response, error) { - if c == nil { - c = &http.Client{} - } - ctx, cancel := context.WithTimeout(req.Context(), 30*time.Second) - defer cancel() - req = req.WithContext(ctx) - - res, err := c.Do(req) - if err != nil { - return res, errors.WithStack(err) - } - - if res.StatusCode >= 400 { - return res, errors.WithStack(errors.Errorf("response returned non-success code: %d", res.StatusCode)) - } - return res, nil -} - -func wetExecFn(cmd *exec.Cmd) error { - if cmd.Stdin == nil { - cmd.Stdin = os.Stdin - } - if cmd.Stdout == nil { - cmd.Stdout = os.Stdout - } - if cmd.Stderr == nil { - cmd.Stderr = os.Stderr - } - return cmd.Run() -} - -func wetFileFn(r *Runner, f File) (File, error) { - if d, ok := f.(Dir); ok { - if err := os.MkdirAll(d.Name(), d.Perm); err != nil { - return f, errors.WithStack(err) - } - return d, nil - } - - name := f.Name() - if !filepath.IsAbs(name) { - name = filepath.Join(r.Root, name) - } - dir := filepath.Dir(name) - if err := os.MkdirAll(dir, 0755); err != nil { - return f, errors.WithStack(err) - } - ff, err := os.Create(name) - if err != nil { - return f, errors.WithStack(err) - } - defer ff.Close() - if _, err := io.Copy(ff, f); err != nil { - return f, errors.WithStack(err) - } - return f, nil -} diff --git a/vendor/github.com/gobuffalo/gogen/.gitignore b/vendor/github.com/gobuffalo/gogen/.gitignore deleted file mode 100644 index 368971859..000000000 --- a/vendor/github.com/gobuffalo/gogen/.gitignore +++ /dev/null @@ -1,29 +0,0 @@ -*.log -.DS_Store -doc -tmp -pkg -*.gem -*.pid -coverage -coverage.data -build/* -*.pbxuser -*.mode1v3 -.svn -profile -.console_history -.sass-cache/* -.rake_tasks~ -*.log.lck -solr/ -.jhw-cache/ -jhw.* -*.sublime* -node_modules/ -dist/ -generated/ -.vendor/ -bin/* -gin-bin -.idea/ diff --git a/vendor/github.com/gobuffalo/gogen/.gometalinter.json b/vendor/github.com/gobuffalo/gogen/.gometalinter.json deleted file mode 100644 index e4f65a36e..000000000 --- a/vendor/github.com/gobuffalo/gogen/.gometalinter.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "Enable": ["vet", "golint", "goimports", "deadcode", "gotype", "ineffassign", "misspell", "nakedret", "unconvert", "megacheck", "varcheck"] -} diff --git a/vendor/github.com/gobuffalo/gogen/add_import.go b/vendor/github.com/gobuffalo/gogen/add_import.go deleted file mode 100644 index 338fb1b99..000000000 --- a/vendor/github.com/gobuffalo/gogen/add_import.go +++ /dev/null @@ -1,52 +0,0 @@ -package gogen - -import ( - "fmt" - "go/ast" - "go/token" - "strings" - - "github.com/gobuffalo/genny" - "github.com/pkg/errors" -) - -// AddImport adds n number of import statements into the path provided -func AddImport(gf genny.File, imports ...string) (genny.File, error) { - pf, err := ParseFile(gf) - if err != nil { - return gf, errors.WithStack(err) - } - gf = pf.File - - end := findLastImport(pf.Ast, pf.FileSet, pf.Lines) - - x := make([]string, len(imports), len(imports)+2) - for _, i := range imports { - x = append(x, fmt.Sprintf("\t\"%s\"", i)) - - } - if end < 0 { - x = append([]string{"import ("}, x...) - x = append(x, ")") - } - - pf.Lines = append(pf.Lines[:end], append(x, pf.Lines[end:]...)...) - - fileContent := strings.Join(pf.Lines, "\n") - return genny.NewFile(gf.Name(), strings.NewReader(fileContent)), nil -} - -func findLastImport(f *ast.File, fset *token.FileSet, fileLines []string) int { - var end = -1 - - ast.Inspect(f, func(n ast.Node) bool { - switch x := n.(type) { - case *ast.ImportSpec: - end = fset.Position(x.End()).Line - return true - } - return true - }) - - return end -} diff --git a/vendor/github.com/gobuffalo/gogen/add_inside_block.go b/vendor/github.com/gobuffalo/gogen/add_inside_block.go deleted file mode 100644 index 72a807bd4..000000000 --- a/vendor/github.com/gobuffalo/gogen/add_inside_block.go +++ /dev/null @@ -1,81 +0,0 @@ -package gogen - -import ( - "fmt" - "go/ast" - "strings" - - "github.com/gobuffalo/genny" - "github.com/pkg/errors" -) - -// AddInsideBlock will add anything inside of the app declaration block inside of file -func AddInsideBlock(gf genny.File, search string, expressions ...string) (genny.File, error) { - pf, err := ParseFile(gf) - if err != nil { - return gf, errors.WithStack(err) - } - gf = pf.File - - _, end := findBlockCoordinates(search, pf) - if end < 0 { - return gf, errors.Errorf("could not find desired block in %s", gf.Name()) - } - - if len(pf.Lines) == end { - end = end - 1 - } - - el := pf.Lines[end:] - sl := []string{} - sf := []string{} - for _, l := range pf.Lines[:end] { - // if there's a app.ServeFiles("/", foo) line it needs to be the last added to the router - if strings.Contains(l, "ServeFiles(\"/\"") { - sf = append(sf, l) - continue - } - sl = append(sl, l) - } - - for i := 0; i < len(expressions); i++ { - expressions[i] = fmt.Sprintf("\t\t%s", expressions[i]) - } - - el = append(sf, el...) - pf.Lines = append(sl, append(expressions, el...)...) - - fileContent := strings.Join(pf.Lines, "\n") - return genny.NewFile(gf.Name(), strings.NewReader(fileContent)), nil -} - -func findBlockCoordinates(search string, pf ParsedFile) (int, int) { - var end = -1 - var start = -1 - - ast.Inspect(pf.Ast, func(n ast.Node) bool { - switch x := n.(type) { - case *ast.StructType: - line := pf.FileSet.Position(x.Pos()).Line - structDeclaration := fmt.Sprintf("%s\n", pf.Lines[line-1]) - - if strings.Contains(structDeclaration, search) { - start = line - end = pf.FileSet.Position(x.End()).Line - return false - } - - case *ast.BlockStmt: - start = pf.FileSet.Position(x.Lbrace).Line - blockDeclaration := fmt.Sprintf("%s\n", pf.Lines[start-1]) - - if strings.Contains(blockDeclaration, search) { - end = pf.FileSet.Position(x.Rbrace).Line - 1 - } - - } - return true - }) - - return start, end -} diff --git a/vendor/github.com/gobuffalo/gogen/append.go b/vendor/github.com/gobuffalo/gogen/append.go deleted file mode 100644 index 494d08640..000000000 --- a/vendor/github.com/gobuffalo/gogen/append.go +++ /dev/null @@ -1,22 +0,0 @@ -package gogen - -import ( - "strings" - - "github.com/gobuffalo/genny" - "github.com/pkg/errors" -) - -// Append allows to append source into a go file -func Append(gf genny.File, expressions ...string) (genny.File, error) { - pf, err := ParseFile(gf) - if err != nil { - return gf, errors.WithStack(err) - } - - gf = pf.File - pf.Lines = append(pf.Lines, expressions...) - - fileContent := strings.Join(pf.Lines, "\n") - return genny.NewFile(gf.Name(), strings.NewReader(fileContent)), nil -} diff --git a/vendor/github.com/gobuffalo/gogen/files.go b/vendor/github.com/gobuffalo/gogen/files.go deleted file mode 100644 index 33a464f43..000000000 --- a/vendor/github.com/gobuffalo/gogen/files.go +++ /dev/null @@ -1,36 +0,0 @@ -package gogen - -import ( - "os" - "path/filepath" - "strings" - - "github.com/pkg/errors" -) - -func GoFiles(dir string) ([]string, error) { - var files []string - - pwd, err := os.Getwd() - if err != nil { - return files, errors.WithStack(err) - } - if dir == "" { - dir = pwd - } - - err = filepath.Walk(dir, func(path string, info os.FileInfo, err error) error { - path = strings.TrimPrefix(path, pwd+"/") - if strings.Contains(path, ".git") || strings.Contains(path, "node_modules") || strings.Contains(path, "vendor"+string(os.PathSeparator)) { - if info.IsDir() { - return filepath.SkipDir - } - return nil - } - if filepath.Ext(path) == ".go" { - files = append(files, path) - } - return nil - }) - return files, nil -} diff --git a/vendor/github.com/gobuffalo/gogen/fmt.go b/vendor/github.com/gobuffalo/gogen/fmt.go deleted file mode 100644 index 8d934791e..000000000 --- a/vendor/github.com/gobuffalo/gogen/fmt.go +++ /dev/null @@ -1,40 +0,0 @@ -package gogen - -import ( - "bytes" - - "github.com/gobuffalo/genny" - "github.com/gobuffalo/gogen/goimports" - "github.com/pkg/errors" -) - -func Fmt(root string) (*genny.Generator, error) { - g := genny.New() - g.RunFn(func(r *genny.Runner) error { - i, err := goimports.New(root) - if err != nil { - return errors.WithStack(err) - } - return i.Run() - }) - - return g, nil -} - -func FmtTransformer() genny.Transformer { - t := genny.NewTransformer(".go", func(f genny.File) (genny.File, error) { - bb := &bytes.Buffer{} - gi := goimports.NewFromFiles(goimports.File{ - Name: f.Name(), - In: f, - Out: bb, - }) - if err := gi.Run(); err != nil { - return f, errors.WithStack(err) - } - f = genny.NewFile(f.Name(), bb) - return f, nil - }) - t.StripExt = false - return t -} diff --git a/vendor/github.com/gobuffalo/gogen/get.go b/vendor/github.com/gobuffalo/gogen/get.go deleted file mode 100644 index d18a6ea47..000000000 --- a/vendor/github.com/gobuffalo/gogen/get.go +++ /dev/null @@ -1,24 +0,0 @@ -package gogen - -import ( - "os/exec" - - "github.com/gobuffalo/genny" - "github.com/gobuffalo/gogen/gomods" -) - -func Get(pkg string, args ...string) *exec.Cmd { - args = append([]string{"get"}, args...) - args = append(args, pkg) - cmd := exec.Command(genny.GoBin(), args...) - return cmd -} - -func Install(pkg string, args ...string) genny.RunFn { - return func(r *genny.Runner) error { - return gomods.Disable(func() error { - cmd := Get(pkg, args...) - return r.Exec(cmd) - }) - } -} diff --git a/vendor/github.com/gobuffalo/gogen/go.mod b/vendor/github.com/gobuffalo/gogen/go.mod deleted file mode 100644 index dba473493..000000000 --- a/vendor/github.com/gobuffalo/gogen/go.mod +++ /dev/null @@ -1,10 +0,0 @@ -module github.com/gobuffalo/gogen - -require ( - github.com/gobuffalo/envy v1.6.15 - github.com/gobuffalo/genny v0.0.0-20190219203444-c95082806342 - github.com/markbates/safe v1.0.1 - github.com/pkg/errors v0.8.1 - github.com/stretchr/testify v1.3.0 - golang.org/x/tools v0.0.0-20190221204921-83362c3779f5 -) diff --git a/vendor/github.com/gobuffalo/gogen/go.sum b/vendor/github.com/gobuffalo/gogen/go.sum deleted file mode 100644 index 8225a08de..000000000 --- a/vendor/github.com/gobuffalo/gogen/go.sum +++ /dev/null @@ -1,534 +0,0 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.31.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.36.0/go.mod h1:RUoy9p/M4ge0HzT8L+SDZ8jg+Q6fth0CiBuhFJpSV40= -dmitri.shuralyov.com/app/changes v0.0.0-20180602232624-0a106ad413e3/go.mod h1:Yl+fi1br7+Rr3LqpNJf1/uxUdtRUV+Tnj0o93V2B9MU= -dmitri.shuralyov.com/html/belt v0.0.0-20180602232347-f7d459c86be0/go.mod h1:JLBrvjyP0v+ecvNYvCpyZgu5/xkfAUhi6wJj28eUfSU= -dmitri.shuralyov.com/service/change v0.0.0-20181023043359-a85b471d5412/go.mod h1:a1inKt/atXimZ4Mv927x+r7UpyzRUf4emIoiiSC2TN4= -dmitri.shuralyov.com/state v0.0.0-20180228185332-28bcc343414c/go.mod h1:0PRwlb0D6DFvNNtx+9ybjezNCa8XF0xaYcETyp6rHWU= -git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg= -github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= -github.com/ajg/form v0.0.0-20160822230020-523a5da1a92f/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= -github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= -github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625/go.mod h1:HYsPBTaaSFSlLx/70C2HPIMNZpVV8+vt/A+FMnYP11g= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= -github.com/cockroachdb/cockroach-go v0.0.0-20181001143604-e0a95dfd547c/go.mod h1:XGLbWH/ujMcbPbhZq52Nv6UrCghb1yGn//133kEsvDk= -github.com/codegangsta/negroni v1.0.0/go.mod h1:v0y3T5G7Y1UlFfyxFn/QLRU4a2EuNau2iZY63YTKWo0= -github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= -github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dustin/go-humanize v0.0.0-20180713052910-9f541cc9db5d/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/structs v1.0.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= -github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= -github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= -github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= -github.com/gobuffalo/attrs v0.0.0-20190219185331-f338c9388485/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0= -github.com/gobuffalo/buffalo v0.12.8-0.20181004233540-fac9bb505aa8/go.mod h1:sLyT7/dceRXJUxSsE813JTQtA3Eb1vjxWfo/N//vXIY= -github.com/gobuffalo/buffalo v0.13.0/go.mod h1:Mjn1Ba9wpIbpbrD+lIDMy99pQ0H0LiddMIIDGse7qT4= -github.com/gobuffalo/buffalo-plugins v1.0.2/go.mod h1:pOp/uF7X3IShFHyobahTkTLZaeUXwb0GrUTb9ngJWTs= -github.com/gobuffalo/buffalo-plugins v1.0.4/go.mod h1:pWS1vjtQ6uD17MVFWf7i3zfThrEKWlI5+PYLw/NaDB4= -github.com/gobuffalo/buffalo-plugins v1.4.3/go.mod h1:uCzTY0woez4nDMdQjkcOYKanngeUVRO2HZi7ezmAjWY= -github.com/gobuffalo/buffalo-plugins v1.5.1/go.mod h1:jbmwSZK5+PiAP9cC09VQOrGMZFCa/P0UMlIS3O12r5w= -github.com/gobuffalo/buffalo-plugins v1.6.4/go.mod h1:/+N1aophkA2jZ1ifB2O3Y9yGwu6gKOVMtUmJnbg+OZI= -github.com/gobuffalo/buffalo-plugins v1.6.5/go.mod h1:0HVkbgrVs/MnPZ/FOseDMVanCTm2RNcdM0PuXcL1NNI= -github.com/gobuffalo/buffalo-plugins v1.6.7/go.mod h1:ZGZRkzz2PiKWHs0z7QsPBOTo2EpcGRArMEym6ghKYgk= -github.com/gobuffalo/buffalo-plugins v1.6.9/go.mod h1:yYlYTrPdMCz+6/+UaXg5Jm4gN3xhsvsQ2ygVatZV5vw= -github.com/gobuffalo/buffalo-plugins v1.6.11/go.mod h1:eAA6xJIL8OuynJZ8amXjRmHND6YiusVAaJdHDN1Lu8Q= -github.com/gobuffalo/buffalo-plugins v1.8.2/go.mod h1:9te6/VjEQ7pKp7lXlDIMqzxgGpjlKoAcAANdCgoR960= -github.com/gobuffalo/buffalo-plugins v1.8.3/go.mod h1:IAWq6vjZJVXebIq2qGTLOdlXzmpyTZ5iJG5b59fza5U= -github.com/gobuffalo/buffalo-plugins v1.9.4/go.mod h1:grCV6DGsQlVzQwk6XdgcL3ZPgLm9BVxlBmXPMF8oBHI= -github.com/gobuffalo/buffalo-plugins v1.10.0/go.mod h1:4osg8d9s60txLuGwXnqH+RCjPHj9K466cDFRl3PErHI= -github.com/gobuffalo/buffalo-plugins v1.11.0/go.mod h1:rtIvAYRjYibgmWhnjKmo7OadtnxuMG5ZQLr25ozAzjg= -github.com/gobuffalo/buffalo-plugins v1.12.0 h1:5rvYQ7mwfPwUW9zqcMd9ahWtPVOOouMKZjv88q45Z7c= -github.com/gobuffalo/buffalo-plugins v1.12.0/go.mod h1:kw4Mj2vQXqe4X5TI36PEQgswbL30heGQwJEeDKd1v+4= -github.com/gobuffalo/buffalo-pop v1.0.5/go.mod h1:Fw/LfFDnSmB/vvQXPvcXEjzP98Tc+AudyNWUBWKCwQ8= -github.com/gobuffalo/depgen v0.0.0-20190219190223-ba8c93fa0c2c/go.mod h1:CE/HUV4vDCXtJayRf6WoMWgezb1yH4QHg8GNK8FL0JI= -github.com/gobuffalo/envy v1.6.4/go.mod h1:Abh+Jfw475/NWtYMEt+hnJWRiC8INKWibIMyNt1w2Mc= -github.com/gobuffalo/envy v1.6.5/go.mod h1:N+GkhhZ/93bGZc6ZKhJLP6+m+tCNPKwgSpH9kaifseQ= -github.com/gobuffalo/envy v1.6.6/go.mod h1:N+GkhhZ/93bGZc6ZKhJLP6+m+tCNPKwgSpH9kaifseQ= -github.com/gobuffalo/envy v1.6.7/go.mod h1:N+GkhhZ/93bGZc6ZKhJLP6+m+tCNPKwgSpH9kaifseQ= -github.com/gobuffalo/envy v1.6.8/go.mod h1:N+GkhhZ/93bGZc6ZKhJLP6+m+tCNPKwgSpH9kaifseQ= -github.com/gobuffalo/envy v1.6.9/go.mod h1:N+GkhhZ/93bGZc6ZKhJLP6+m+tCNPKwgSpH9kaifseQ= -github.com/gobuffalo/envy v1.6.10/go.mod h1:X0CFllQjTV5ogsnUrg+Oks2yTI+PU2dGYBJOEI2D1Uo= -github.com/gobuffalo/envy v1.6.11/go.mod h1:Fiq52W7nrHGDggFPhn2ZCcHw4u/rqXkqo+i7FB6EAcg= -github.com/gobuffalo/envy v1.6.12/go.mod h1:qJNrJhKkZpEW0glh5xP2syQHH5kgdmgsKss2Kk8PTP0= -github.com/gobuffalo/envy v1.6.13/go.mod h1:w9DJppgl51JwUFWWd/M/6/otrPtWV3WYMa+NNLunqKA= -github.com/gobuffalo/envy v1.6.15 h1:OsV5vOpHYUpP7ZLS6sem1y40/lNX1BZj+ynMiRi21lQ= -github.com/gobuffalo/envy v1.6.15/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= -github.com/gobuffalo/events v1.0.3/go.mod h1:Txo8WmqScapa7zimEQIwgiJBvMECMe9gJjsKNPN3uZw= -github.com/gobuffalo/events v1.0.7/go.mod h1:z8txf6H9jWhQ5Scr7YPLWg/cgXBRj8Q4uYI+rsVCCSQ= -github.com/gobuffalo/events v1.0.8/go.mod h1:A5KyqT1sA+3GJiBE4QKZibse9mtOcI9nw8gGrDdqYGs= -github.com/gobuffalo/events v1.1.3/go.mod h1:9yPGWYv11GENtzrIRApwQRMYSbUgCsZ1w6R503fCfrk= -github.com/gobuffalo/events v1.1.4/go.mod h1:09/YRRgZHEOts5Isov+g9X2xajxdvOAcUuAHIX/O//A= -github.com/gobuffalo/events v1.1.5/go.mod h1:3YUSzgHfYctSjEjLCWbkXP6djH2M+MLaVRzb4ymbAK0= -github.com/gobuffalo/events v1.1.7/go.mod h1:6fGqxH2ing5XMb3EYRq9LEkVlyPGs4oO/eLzh+S8CxY= -github.com/gobuffalo/events v1.1.8/go.mod h1:UFy+W6X6VbCWS8k2iT81HYX65dMtiuVycMy04cplt/8= -github.com/gobuffalo/events v1.1.9/go.mod h1:/0nf8lMtP5TkgNbzYxR6Bl4GzBy5s5TebgNTdRfRbPM= -github.com/gobuffalo/events v1.2.0 h1:YovlMNcwNTfIm/3OdB+KemDOm8yUz4XIH+4kbMhGXWw= -github.com/gobuffalo/events v1.2.0/go.mod h1:pxvpvsKXKZNPtHuIxUV3K+g+KP5o4forzaeFj++bh68= -github.com/gobuffalo/fizz v1.0.12/go.mod h1:C0sltPxpYK8Ftvf64kbsQa2yiCZY4RZviurNxXdAKwc= -github.com/gobuffalo/flect v0.0.0-20180907193754-dc14d8acaf9f/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA= -github.com/gobuffalo/flect v0.0.0-20181002182613-4571df4b1daf/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA= -github.com/gobuffalo/flect v0.0.0-20181007231023-ae7ed6bfe683/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA= -github.com/gobuffalo/flect v0.0.0-20181018182602-fd24a256709f/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA= -github.com/gobuffalo/flect v0.0.0-20181019110701-3d6f0b585514/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA= -github.com/gobuffalo/flect v0.0.0-20181024204909-8f6be1a8c6c2/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA= -github.com/gobuffalo/flect v0.0.0-20181104133451-1f6e9779237a/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA= -github.com/gobuffalo/flect v0.0.0-20181114183036-47375f6d8328/go.mod h1:0HvNbHdfh+WOvDSIASqJOSxTOWSxCCUF++k/Y53v9rI= -github.com/gobuffalo/flect v0.0.0-20181210151238-24a2b68e0316/go.mod h1:en58vff74S9b99Eg42Dr+/9yPu437QjlNsO/hBYPuOk= -github.com/gobuffalo/flect v0.0.0-20190104192022-4af577e09bf2/go.mod h1:en58vff74S9b99Eg42Dr+/9yPu437QjlNsO/hBYPuOk= -github.com/gobuffalo/flect v0.0.0-20190117212819-a62e61d96794/go.mod h1:397QT6v05LkZkn07oJXXT6y9FCfwC8Pug0WA2/2mE9k= -github.com/gobuffalo/flect v0.1.0 h1:EJvbvZlo9exJk5UK02lz5pTs3XEpIM5/4o691KfvtkM= -github.com/gobuffalo/flect v0.1.0/go.mod h1:d2ehjJqGOH/Kjqcoz+F7jHTBbmDb38yXA598Hb50EGs= -github.com/gobuffalo/genny v0.0.0-20180924032338-7af3a40f2252/go.mod h1:tUTQOogrr7tAQnhajMSH6rv1BVev34H2sa1xNHMy94g= -github.com/gobuffalo/genny v0.0.0-20181003150629-3786a0744c5d/go.mod h1:WAd8HmjMVrnkAZbmfgH5dLBUchsZfqzp/WS5sQz+uTM= -github.com/gobuffalo/genny v0.0.0-20181005145118-318a41a134cc/go.mod h1:WAd8HmjMVrnkAZbmfgH5dLBUchsZfqzp/WS5sQz+uTM= -github.com/gobuffalo/genny v0.0.0-20181007153042-b8de7d566757/go.mod h1:+oG5Ljrw04czAHbPXREwaFojJbpUvcIy4DiOnbEJFTA= -github.com/gobuffalo/genny v0.0.0-20181012161047-33e5f43d83a6/go.mod h1:+oG5Ljrw04czAHbPXREwaFojJbpUvcIy4DiOnbEJFTA= -github.com/gobuffalo/genny v0.0.0-20181017160347-90a774534246/go.mod h1:+oG5Ljrw04czAHbPXREwaFojJbpUvcIy4DiOnbEJFTA= -github.com/gobuffalo/genny v0.0.0-20181024195656-51392254bf53/go.mod h1:o9GEH5gn5sCKLVB5rHFC4tq40rQ3VRUzmx6WwmaqISE= -github.com/gobuffalo/genny v0.0.0-20181025145300-af3f81d526b8/go.mod h1:uZ1fFYvdcP8mu0B/Ynarf6dsGvp7QFIpk/QACUuFUVI= -github.com/gobuffalo/genny v0.0.0-20181027191429-94d6cfb5c7fc/go.mod h1:x7SkrQQBx204Y+O9EwRXeszLJDTaWN0GnEasxgLrQTA= -github.com/gobuffalo/genny v0.0.0-20181027195209-3887b7171c4f/go.mod h1:JbKx8HSWICu5zyqWOa0dVV1pbbXOHusrSzQUprW6g+w= -github.com/gobuffalo/genny v0.0.0-20181106193839-7dcb0924caf1/go.mod h1:x61yHxvbDCgQ/7cOAbJCacZQuHgB0KMSzoYcw5debjU= -github.com/gobuffalo/genny v0.0.0-20181107223128-f18346459dbe/go.mod h1:utQD3aKKEsdb03oR+Vi/6ztQb1j7pO10N3OBoowRcSU= -github.com/gobuffalo/genny v0.0.0-20181114215459-0a4decd77f5d/go.mod h1:kN2KZ8VgXF9VIIOj/GM0Eo7YK+un4Q3tTreKOf0q1ng= -github.com/gobuffalo/genny v0.0.0-20181119162812-e8ff4adce8bb/go.mod h1:BA9htSe4bZwBDJLe8CUkoqkypq3hn3+CkoHqVOW718E= -github.com/gobuffalo/genny v0.0.0-20181127225641-2d959acc795b/go.mod h1:l54xLXNkteX/PdZ+HlgPk1qtcrgeOr3XUBBPDbH+7CQ= -github.com/gobuffalo/genny v0.0.0-20181128191930-77e34f71ba2a/go.mod h1:FW/D9p7cEEOqxYA71/hnrkOWm62JZ5ZNxcNIVJEaWBU= -github.com/gobuffalo/genny v0.0.0-20181203165245-fda8bcce96b1/go.mod h1:wpNSANu9UErftfiaAlz1pDZclrYzLtO5lALifODyjuM= -github.com/gobuffalo/genny v0.0.0-20181203201232-849d2c9534ea/go.mod h1:wpNSANu9UErftfiaAlz1pDZclrYzLtO5lALifODyjuM= -github.com/gobuffalo/genny v0.0.0-20181206121324-d6fb8a0dbe36/go.mod h1:wpNSANu9UErftfiaAlz1pDZclrYzLtO5lALifODyjuM= -github.com/gobuffalo/genny v0.0.0-20181207164119-84844398a37d/go.mod h1:y0ysCHGGQf2T3vOhCrGHheYN54Y/REj0ayd0Suf4C/8= -github.com/gobuffalo/genny v0.0.0-20181211165820-e26c8466f14d/go.mod h1:sHnK+ZSU4e2feXP3PA29ouij6PUEiN+RCwECjCTB3yM= -github.com/gobuffalo/genny v0.0.0-20190104222617-a71664fc38e7/go.mod h1:QPsQ1FnhEsiU8f+O0qKWXz2RE4TiDqLVChWkBuh1WaY= -github.com/gobuffalo/genny v0.0.0-20190112155932-f31a84fcacf5/go.mod h1:CIaHCrSIuJ4il6ka3Hub4DR4adDrGoXGEEt2FbBxoIo= -github.com/gobuffalo/genny v0.0.0-20190124191459-3310289fa4b4/go.mod h1:yIRqxhZV2sAzb+B3iPUMLauTRrYP8tJUlZ1zV9teKik= -github.com/gobuffalo/genny v0.0.0-20190131150032-1045e97d19fb/go.mod h1:yIRqxhZV2sAzb+B3iPUMLauTRrYP8tJUlZ1zV9teKik= -github.com/gobuffalo/genny v0.0.0-20190131190646-008a76242145/go.mod h1:NJvPZJxb9M4z790P6N2SMZKSUYpASpEvLuUWnHGKzb4= -github.com/gobuffalo/genny v0.0.0-20190219203444-c95082806342 h1:ewzWZ+TT9/3wYSnUPQRU7YFzqWAx4dgUXdgvJVTVLCA= -github.com/gobuffalo/genny v0.0.0-20190219203444-c95082806342/go.mod h1:3BLT+Vs94EEz3fKR8WWOkYpL6c1tdJcZUNCe3LZAnvQ= -github.com/gobuffalo/gitgen v0.0.0-20190219185555-91c2c5f0aad5/go.mod h1:ZzGIrxBvCJEluaU4i3CN0GFlu1Qmb3yK8ziV02evJ1E= -github.com/gobuffalo/github_flavored_markdown v1.0.4/go.mod h1:uRowCdK+q8d/RF0Kt3/DSalaIXbb0De/dmTqMQdkQ4I= -github.com/gobuffalo/github_flavored_markdown v1.0.5/go.mod h1:U0643QShPF+OF2tJvYNiYDLDGDuQmJZXsf/bHOJPsMY= -github.com/gobuffalo/github_flavored_markdown v1.0.7/go.mod h1:w93Pd9Lz6LvyQXEG6DktTPHkOtCbr+arAD5mkwMzXLI= -github.com/gobuffalo/gogen v0.0.0-20190219194924-d32a17ad9761/go.mod h1:v47C8sid+ZM2qK+YpQ2MGJKssKAqyTsH1wl/pTCPdz8= -github.com/gobuffalo/httptest v1.0.2/go.mod h1:7T1IbSrg60ankme0aDLVnEY0h056g9M1/ZvpVThtB7E= -github.com/gobuffalo/licenser v0.0.0-20180924033006-eae28e638a42/go.mod h1:Ubo90Np8gpsSZqNScZZkVXXAo5DGhTb+WYFIjlnog8w= -github.com/gobuffalo/licenser v0.0.0-20181025145548-437d89de4f75/go.mod h1:x3lEpYxkRG/XtGCUNkio+6RZ/dlOvLzTI9M1auIwFcw= -github.com/gobuffalo/licenser v0.0.0-20181027200154-58051a75da95/go.mod h1:BzhaaxGd1tq1+OLKObzgdCV9kqVhbTulxOpYbvMQWS0= -github.com/gobuffalo/licenser v0.0.0-20181109171355-91a2a7aac9a7/go.mod h1:m+Ygox92pi9bdg+gVaycvqE8RVSjZp7mWw75+K5NPHk= -github.com/gobuffalo/licenser v0.0.0-20181128165715-cc7305f8abed/go.mod h1:oU9F9UCE+AzI/MueCKZamsezGOOHfSirltllOVeRTAE= -github.com/gobuffalo/licenser v0.0.0-20181203160806-fe900bbede07/go.mod h1:ph6VDNvOzt1CdfaWC+9XwcBnlSTBz2j49PBwum6RFaU= -github.com/gobuffalo/licenser v0.0.0-20181211173111-f8a311c51159/go.mod h1:ve/Ue99DRuvnTaLq2zKa6F4KtHiYf7W046tDjuGYPfM= -github.com/gobuffalo/logger v0.0.0-20181022175615-46cfb361fc27/go.mod h1:8sQkgyhWipz1mIctHF4jTxmJh1Vxhp7mP8IqbljgJZo= -github.com/gobuffalo/logger v0.0.0-20181027144941-73d08d2bb969/go.mod h1:7uGg2duHKpWnN4+YmyKBdLXfhopkAdVM6H3nKbyFbz8= -github.com/gobuffalo/logger v0.0.0-20181027193913-9cf4dd0efe46/go.mod h1:7uGg2duHKpWnN4+YmyKBdLXfhopkAdVM6H3nKbyFbz8= -github.com/gobuffalo/logger v0.0.0-20181109185836-3feeab578c17/go.mod h1:oNErH0xLe+utO+OW8ptXMSA5DkiSEDW1u3zGIt8F9Ew= -github.com/gobuffalo/logger v0.0.0-20181117211126-8e9b89b7c264/go.mod h1:5etB91IE0uBlw9k756fVKZJdS+7M7ejVhmpXXiSFj0I= -github.com/gobuffalo/logger v0.0.0-20181127160119-5b956e21995c h1:Z/ppYX6EtPEysbW4VEGz2dO+4F4VTthWp2sWRUCANdU= -github.com/gobuffalo/logger v0.0.0-20181127160119-5b956e21995c/go.mod h1:+HxKANrR9VGw9yN3aOAppJKvhO05ctDi63w4mDnKv2U= -github.com/gobuffalo/makr v1.1.5/go.mod h1:Y+o0btAH1kYAMDJW/TX3+oAXEu0bmSLLoC9mIFxtzOw= -github.com/gobuffalo/mapi v1.0.0/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= -github.com/gobuffalo/mapi v1.0.1 h1:JRuTiZzDEZhBHkFiHTxJkYRT6CbYuL0K/rn+1byJoEA= -github.com/gobuffalo/mapi v1.0.1/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= -github.com/gobuffalo/meta v0.0.0-20181018155829-df62557efcd3/go.mod h1:XTTOhwMNryif3x9LkTTBO/Llrveezd71u3quLd0u7CM= -github.com/gobuffalo/meta v0.0.0-20181018192820-8c6cef77dab3/go.mod h1:E94EPzx9NERGCY69UWlcj6Hipf2uK/vnfrF4QD0plVE= -github.com/gobuffalo/meta v0.0.0-20181025145500-3a985a084b0a/go.mod h1:YDAKBud2FP7NZdruCSlmTmDOZbVSa6bpK7LJ/A/nlKg= -github.com/gobuffalo/meta v0.0.0-20181114191255-b130ebedd2f7/go.mod h1:K6cRZ29ozr4Btvsqkjvg5nDFTLOgTqf03KA70Ks0ypE= -github.com/gobuffalo/meta v0.0.0-20181127070345-0d7e59dd540b/go.mod h1:RLO7tMvE0IAKAM8wny1aN12pvEKn7EtkBLkUZR00Qf8= -github.com/gobuffalo/meta v0.0.0-20190120163247-50bbb1fa260d/go.mod h1:KKsH44nIK2gA8p0PJmRT9GvWJUdphkDUA8AJEvFWiqM= -github.com/gobuffalo/meta v0.0.0-20190121163014-ecaa953cbfb3 h1:JzhweLavqD8ZNLOIBRvE5IPyp+sw/wYQmL9c5XwZuHI= -github.com/gobuffalo/meta v0.0.0-20190121163014-ecaa953cbfb3/go.mod h1:KLfkGnS+Tucc+iTkUcAUBtxpwOJGfhw2pHRLddPxMQY= -github.com/gobuffalo/mw-basicauth v1.0.3/go.mod h1:dg7+ilMZOKnQFHDefUzUHufNyTswVUviCBgF244C1+0= -github.com/gobuffalo/mw-contenttype v0.0.0-20180802152300-74f5a47f4d56/go.mod h1:7EvcmzBbeCvFtQm5GqF9ys6QnCxz2UM1x0moiWLq1No= -github.com/gobuffalo/mw-csrf v0.0.0-20180802151833-446ff26e108b/go.mod h1:sbGtb8DmDZuDUQoxjr8hG1ZbLtZboD9xsn6p77ppcHo= -github.com/gobuffalo/mw-forcessl v0.0.0-20180802152810-73921ae7a130/go.mod h1:JvNHRj7bYNAMUr/5XMkZaDcw3jZhUZpsmzhd//FFWmQ= -github.com/gobuffalo/mw-i18n v0.0.0-20180802152014-e3060b7e13d6/go.mod h1:91AQfukc52A6hdfIfkxzyr+kpVYDodgAeT5cjX1UIj4= -github.com/gobuffalo/mw-paramlogger v0.0.0-20181005191442-d6ee392ec72e/go.mod h1:6OJr6VwSzgJMqWMj7TYmRUqzNe2LXu/W1rRW4MAz/ME= -github.com/gobuffalo/mw-tokenauth v0.0.0-20181001105134-8545f626c189/go.mod h1:UqBF00IfKvd39ni5+yI5MLMjAf4gX7cDKN/26zDOD6c= -github.com/gobuffalo/packd v0.0.0-20181027182251-01ad393492c8/go.mod h1:SmdBdhj6uhOsg1Ui4SFAyrhuc7U4VCildosO5IDJ3lc= -github.com/gobuffalo/packd v0.0.0-20181027190505-aafc0d02c411/go.mod h1:SmdBdhj6uhOsg1Ui4SFAyrhuc7U4VCildosO5IDJ3lc= -github.com/gobuffalo/packd v0.0.0-20181027194105-7ae579e6d213/go.mod h1:SmdBdhj6uhOsg1Ui4SFAyrhuc7U4VCildosO5IDJ3lc= -github.com/gobuffalo/packd v0.0.0-20181031195726-c82734870264/go.mod h1:Yf2toFaISlyQrr5TfO3h6DB9pl9mZRmyvBGQb/aQ/pI= -github.com/gobuffalo/packd v0.0.0-20181104210303-d376b15f8e96/go.mod h1:Yf2toFaISlyQrr5TfO3h6DB9pl9mZRmyvBGQb/aQ/pI= -github.com/gobuffalo/packd v0.0.0-20181111195323-b2e760a5f0ff/go.mod h1:Yf2toFaISlyQrr5TfO3h6DB9pl9mZRmyvBGQb/aQ/pI= -github.com/gobuffalo/packd v0.0.0-20181114190715-f25c5d2471d7/go.mod h1:Yf2toFaISlyQrr5TfO3h6DB9pl9mZRmyvBGQb/aQ/pI= -github.com/gobuffalo/packd v0.0.0-20181124090624-311c6248e5fb/go.mod h1:Foenia9ZvITEvG05ab6XpiD5EfBHPL8A6hush8SJ0o8= -github.com/gobuffalo/packd v0.0.0-20181207120301-c49825f8f6f4/go.mod h1:LYc0TGKFBBFTRC9dg2pcRcMqGCTMD7T2BIMP7OBuQAA= -github.com/gobuffalo/packd v0.0.0-20181212173646-eca3b8fd6687 h1:uZ+G4JprR0UEq0aHZs+6eP7TEZuFfrIkmQWejIBV/QQ= -github.com/gobuffalo/packd v0.0.0-20181212173646-eca3b8fd6687/go.mod h1:LYc0TGKFBBFTRC9dg2pcRcMqGCTMD7T2BIMP7OBuQAA= -github.com/gobuffalo/packr v1.13.7/go.mod h1:KkinLIn/n6+3tVXMwg6KkNvWwVsrRAz4ph+jgpk3Z24= -github.com/gobuffalo/packr v1.15.0/go.mod h1:t5gXzEhIviQwVlNx/+3SfS07GS+cZ2hn76WLzPp6MGI= -github.com/gobuffalo/packr v1.15.1/go.mod h1:IeqicJ7jm8182yrVmNbM6PR4g79SjN9tZLH8KduZZwE= -github.com/gobuffalo/packr v1.19.0/go.mod h1:MstrNkfCQhd5o+Ct4IJ0skWlxN8emOq8DsoT1G98VIU= -github.com/gobuffalo/packr v1.20.0/go.mod h1:JDytk1t2gP+my1ig7iI4NcVaXr886+N0ecUga6884zw= -github.com/gobuffalo/packr v1.21.0/go.mod h1:H00jGfj1qFKxscFJSw8wcL4hpQtPe1PfU2wa6sg/SR0= -github.com/gobuffalo/packr/v2 v2.0.0-rc.8/go.mod h1:y60QCdzwuMwO2R49fdQhsjCPv7tLQFR0ayzxxla9zes= -github.com/gobuffalo/packr/v2 v2.0.0-rc.9/go.mod h1:fQqADRfZpEsgkc7c/K7aMew3n4aF1Kji7+lIZeR98Fc= -github.com/gobuffalo/packr/v2 v2.0.0-rc.10/go.mod h1:4CWWn4I5T3v4c1OsJ55HbHlUEKNWMITG5iIkdr4Px4w= -github.com/gobuffalo/packr/v2 v2.0.0-rc.11/go.mod h1:JoieH/3h3U4UmatmV93QmqyPUdf4wVM9HELaHEu+3fk= -github.com/gobuffalo/packr/v2 v2.0.0-rc.12/go.mod h1:FV1zZTsVFi1DSCboO36Xgs4pzCZBjB/tDV9Cz/lSaR8= -github.com/gobuffalo/packr/v2 v2.0.0-rc.13/go.mod h1:2Mp7GhBFMdJlOK8vGfl7SYtfMP3+5roE39ejlfjw0rA= -github.com/gobuffalo/packr/v2 v2.0.0-rc.14/go.mod h1:06otbrNvDKO1eNQ3b8hst+1010UooI2MFg+B2Ze4MV8= -github.com/gobuffalo/packr/v2 v2.0.0-rc.15/go.mod h1:IMe7H2nJvcKXSF90y4X1rjYIRlNMJYCxEhssBXNZwWs= -github.com/gobuffalo/packr/v2 v2.0.0/go.mod h1:7McfLpSxaPUoSQm7gYpTZRQSK63mX8EKzzYSEFKvfkM= -github.com/gobuffalo/packr/v2 v2.0.1 h1:2jz0jiCa634BwBZkF7NJNWHD7nGsztQDV7gmM2jJhLs= -github.com/gobuffalo/packr/v2 v2.0.1/go.mod h1:tp5/5A2e67F1lUGTiNadtA2ToP045+mvkWzaqMCsZr4= -github.com/gobuffalo/plush v3.7.16+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= -github.com/gobuffalo/plush v3.7.20+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= -github.com/gobuffalo/plush v3.7.21+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= -github.com/gobuffalo/plush v3.7.22+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= -github.com/gobuffalo/plush v3.7.23+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= -github.com/gobuffalo/plush v3.7.30+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= -github.com/gobuffalo/plush v3.7.31+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= -github.com/gobuffalo/plush v3.7.32+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= -github.com/gobuffalo/plush v3.7.33+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= -github.com/gobuffalo/plushgen v0.0.0-20181128164830-d29dcb966cb2/go.mod h1:r9QwptTFnuvSaSRjpSp4S2/4e2D3tJhARYbvEBcKSb4= -github.com/gobuffalo/plushgen v0.0.0-20181203163832-9fc4964505c2/go.mod h1:opEdT33AA2HdrIwK1aibqnTJDVVKXC02Bar/GT1YRVs= -github.com/gobuffalo/plushgen v0.0.0-20181207152837-eedb135bd51b/go.mod h1:Lcw7HQbEVm09sAQrCLzIxuhFbB3nAgp4c55E+UlynR0= -github.com/gobuffalo/plushgen v0.0.0-20190104222512-177cd2b872b3/go.mod h1:tYxCozi8X62bpZyKXYHw1ncx2ZtT2nFvG42kuLwYjoc= -github.com/gobuffalo/pop v4.8.2+incompatible/go.mod h1:DwBz3SD5SsHpTZiTubcsFWcVDpJWGsxjVjMPnkiThWg= -github.com/gobuffalo/pop v4.8.3+incompatible/go.mod h1:DwBz3SD5SsHpTZiTubcsFWcVDpJWGsxjVjMPnkiThWg= -github.com/gobuffalo/pop v4.8.4+incompatible/go.mod h1:DwBz3SD5SsHpTZiTubcsFWcVDpJWGsxjVjMPnkiThWg= -github.com/gobuffalo/release v1.0.35/go.mod h1:VtHFAKs61vO3wboCec5xr9JPTjYyWYcvaM3lclkc4x4= -github.com/gobuffalo/release v1.0.38/go.mod h1:VtHFAKs61vO3wboCec5xr9JPTjYyWYcvaM3lclkc4x4= -github.com/gobuffalo/release v1.0.42/go.mod h1:RPs7EtafH4oylgetOJpGP0yCZZUiO4vqHfTHJjSdpug= -github.com/gobuffalo/release v1.0.52/go.mod h1:RPs7EtafH4oylgetOJpGP0yCZZUiO4vqHfTHJjSdpug= -github.com/gobuffalo/release v1.0.53/go.mod h1:FdF257nd8rqhNaqtDWFGhxdJ/Ig4J7VcS3KL7n/a+aA= -github.com/gobuffalo/release v1.0.54/go.mod h1:Pe5/RxRa/BE8whDpGfRqSI7D1a0evGK1T4JDm339tJc= -github.com/gobuffalo/release v1.0.61/go.mod h1:mfIO38ujUNVDlBziIYqXquYfBF+8FDHUjKZgYC1Hj24= -github.com/gobuffalo/release v1.0.72/go.mod h1:NP5NXgg/IX3M5XmHmWR99D687/3Dt9qZtTK/Lbwc1hU= -github.com/gobuffalo/release v1.1.1/go.mod h1:Sluak1Xd6kcp6snkluR1jeXAogdJZpFFRzTYRs/2uwg= -github.com/gobuffalo/release v1.1.3/go.mod h1:CuXc5/m+4zuq8idoDt1l4va0AXAn/OSs08uHOfMVr8E= -github.com/gobuffalo/release v1.1.6/go.mod h1:18naWa3kBsqO0cItXZNJuefCKOENpbbUIqRL1g+p6z0= -github.com/gobuffalo/shoulders v1.0.1/go.mod h1:V33CcVmaQ4gRUmHKwq1fiTXuf8Gp/qjQBUL5tHPmvbA= -github.com/gobuffalo/syncx v0.0.0-20181120191700-98333ab04150/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw= -github.com/gobuffalo/syncx v0.0.0-20181120194010-558ac7de985f h1:S5EeH1reN93KR0L6TQvkRpu9YggCYXrUqFh1iEgvdC0= -github.com/gobuffalo/syncx v0.0.0-20181120194010-558ac7de985f/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw= -github.com/gobuffalo/tags v2.0.11+incompatible/go.mod h1:9XmhOkyaB7UzvuY4UoZO4s67q8/xRMVJEaakauVQYeY= -github.com/gobuffalo/tags v2.0.14+incompatible/go.mod h1:9XmhOkyaB7UzvuY4UoZO4s67q8/xRMVJEaakauVQYeY= -github.com/gobuffalo/tags v2.0.15+incompatible/go.mod h1:9XmhOkyaB7UzvuY4UoZO4s67q8/xRMVJEaakauVQYeY= -github.com/gobuffalo/uuid v2.0.3+incompatible/go.mod h1:ErhIzkRhm0FtRuiE/PeORqcw4cVi1RtSpnwYrxuvkfE= -github.com/gobuffalo/uuid v2.0.4+incompatible/go.mod h1:ErhIzkRhm0FtRuiE/PeORqcw4cVi1RtSpnwYrxuvkfE= -github.com/gobuffalo/uuid v2.0.5+incompatible/go.mod h1:ErhIzkRhm0FtRuiE/PeORqcw4cVi1RtSpnwYrxuvkfE= -github.com/gobuffalo/validate v2.0.3+incompatible/go.mod h1:N+EtDe0J8252BgfzQUChBgfd6L93m9weay53EWFVsMM= -github.com/gobuffalo/x v0.0.0-20181003152136-452098b06085/go.mod h1:WevpGD+5YOreDJznWevcn8NTmQEW5STSBgIkpkjzqXc= -github.com/gobuffalo/x v0.0.0-20181007152206-913e47c59ca7/go.mod h1:9rDPXaB3kXdKWzMc4odGQQdG2e2DIEmANy5aSJ9yesY= -github.com/gofrs/uuid v3.1.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:tluoj9z5200jBnyusfRPU2LqT6J+DAorxEvtC7LHB+E= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/gomodule/redigo v2.0.0+incompatible/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= -github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/googleapis/gax-go v2.0.0+incompatible/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY= -github.com/googleapis/gax-go/v2 v2.0.3/go.mod h1:LLvjysVCY1JZeum8Z6l8qUty8fiNwE08qbEPm1M08qg= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= -github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/pat v0.0.0-20180118222023-199c85a7f6d1/go.mod h1:YeAe0gNeiNT5hoiZRI4yiOky6jVdNvfO2N6Kav/HmxY= -github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= -github.com/gorilla/sessions v1.1.2/go.mod h1:8KCfur6+4Mqcc6S0FEfKuN15Vl5MgXW92AE8ovaJD0w= -github.com/gorilla/sessions v1.1.3/go.mod h1:8KCfur6+4Mqcc6S0FEfKuN15Vl5MgXW92AE8ovaJD0w= -github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= -github.com/grpc-ecosystem/grpc-gateway v1.5.0/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= -github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/jackc/fake v0.0.0-20150926172116-812a484cc733/go.mod h1:WrMFNQdiFJ80sQsxDoMokWK1W5TQtxBFNpzWTD84ibQ= -github.com/jackc/pgx v3.2.0+incompatible/go.mod h1:0ZGrqGqkRlliWnWB4zKnWtjbSWbGkVEFm4TeybAXq+I= -github.com/jellevandenhooff/dkim v0.0.0-20150330215556-f50fe3d243e1/go.mod h1:E0B/fFc00Y+Rasa88328GlI/XbtyysCtTHZS8h7IrBU= -github.com/jmoiron/sqlx v0.0.0-20180614180643-0dae4fefe7c0/go.mod h1:IiEW3SEiiErVyFdH8NTuWjSifiEQKUoyK3LNqr2kCHU= -github.com/joho/godotenv v1.2.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= -github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc= -github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= -github.com/karrick/godirwalk v1.7.5/go.mod h1:2c9FRhkDxdIbgkOnCEvnSWs71Bhugbl46shStcFDJ34= -github.com/karrick/godirwalk v1.7.7/go.mod h1:2c9FRhkDxdIbgkOnCEvnSWs71Bhugbl46shStcFDJ34= -github.com/karrick/godirwalk v1.7.8 h1:VfG72pyIxgtC7+3X9CMHI0AOl4LwyRAg98WAgsvffi8= -github.com/karrick/godirwalk v1.7.8/go.mod h1:2c9FRhkDxdIbgkOnCEvnSWs71Bhugbl46shStcFDJ34= -github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/konsorten/go-windows-terminal-sequences v0.0.0-20180402223658-b729f2633dfe/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/pty v1.1.3/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/markbates/deplist v1.0.4/go.mod h1:gRRbPbbuA8TmMiRvaOzUlRfzfjeCCBqX2A6arxN01MM= -github.com/markbates/deplist v1.0.5/go.mod h1:gRRbPbbuA8TmMiRvaOzUlRfzfjeCCBqX2A6arxN01MM= -github.com/markbates/going v1.0.2/go.mod h1:UWCk3zm0UKefHZ7l8BNqi26UyiEMniznk8naLdTcy6c= -github.com/markbates/going v1.0.3/go.mod h1:fQiT6v6yQar9UD6bd/D4Z5Afbk9J6BBVBtLiyY4gp2o= -github.com/markbates/grift v1.0.4/go.mod h1:wbmtW74veyx+cgfwFhlnnMWqhoz55rnHR47oMXzsyVs= -github.com/markbates/hmax v1.0.0/go.mod h1:cOkR9dktiESxIMu+65oc/r/bdY4bE8zZw3OLhLx0X2c= -github.com/markbates/inflect v1.0.0/go.mod h1:oTeZL2KHA7CUX6X+fovmK9OvIOFuqu0TwdQrZjLTh88= -github.com/markbates/inflect v1.0.1/go.mod h1:uv3UVNBe5qBIfCm8O8Q+DW+S1EopeyINj+Ikhc7rnCk= -github.com/markbates/inflect v1.0.3/go.mod h1:1fR9+pO2KHEO9ZRtto13gDwwZaAKstQzferVeWqbgNs= -github.com/markbates/inflect v1.0.4/go.mod h1:1fR9+pO2KHEO9ZRtto13gDwwZaAKstQzferVeWqbgNs= -github.com/markbates/oncer v0.0.0-20180924031910-e862a676800b/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= -github.com/markbates/oncer v0.0.0-20180924034138-723ad0170a46/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= -github.com/markbates/oncer v0.0.0-20181014194634-05fccaae8fc4/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= -github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2 h1:JgVTCPf0uBVcUSWpyXmGpgOc62nK5HWUBKAGc3Qqa5k= -github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= -github.com/markbates/refresh v1.4.10/go.mod h1:NDPHvotuZmTmesXxr95C9bjlw1/0frJwtME2dzcVKhc= -github.com/markbates/safe v1.0.0/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= -github.com/markbates/safe v1.0.1 h1:yjZkbvRM6IzKj9tlu/zMJLS0n/V351OZWRnF3QfaUxI= -github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= -github.com/markbates/sigtx v1.0.0/go.mod h1:QF1Hv6Ic6Ca6W+T+DL0Y/ypborFKyvUY9HmuCD4VeTc= -github.com/markbates/willie v1.0.9/go.mod h1:fsrFVWl91+gXpx/6dv715j7i11fYPfZ9ZGfH0DQzY7w= -github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/microcosm-cc/bluemonday v1.0.1/go.mod h1:hsXNsILzKxV+sX77C5b8FSuKF00vh2OMYv+xgHpAMF4= -github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc= -github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/mapstructure v1.0.0/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/monoculum/formam v0.0.0-20180901015400-4e68be1d79ba/go.mod h1:RKgILGEJq24YyJ2ban8EO0RUVSJlF1pGsEvoLEACr/Q= -github.com/neelance/astrewrite v0.0.0-20160511093645-99348263ae86/go.mod h1:kHJEU3ofeGjhHklVoIGuVj85JJwZ6kWPaJwCIxgnFmo= -github.com/neelance/sourcemap v0.0.0-20151028013722-8c68805598ab/go.mod h1:Qr6/a/Q4r9LP1IltGz7tA7iOK1WonHEYhu1HRBA7ZiM= -github.com/nicksnyder/go-i18n v1.10.0/go.mod h1:HrK7VCrbOvQoUAQ7Vpy7i87N7JZZZ7R2xBGjv0j365Q= -github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= -github.com/onsi/gomega v1.4.2/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8= -github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/rogpeppe/go-internal v1.0.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.1.0 h1:g0fH8RicVgNl+zVZDCDfbdWxAWoAEJyI7I3TZYXFiig= -github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= -github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= -github.com/serenize/snaker v0.0.0-20171204205717-a683aaf2d516/go.mod h1:Yow6lPLSAXx2ifx470yD/nUe22Dv5vBvxK/UK9UUTVs= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= -github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= -github.com/shurcooL/component v0.0.0-20170202220835-f88ec8f54cc4/go.mod h1:XhFIlyj5a1fBNx5aJTbKoIq0mNaPvOagO+HjB3EtxrY= -github.com/shurcooL/events v0.0.0-20181021180414-410e4ca65f48/go.mod h1:5u70Mqkb5O5cxEA8nxTsgrgLehJeAw6Oc4Ab1c/P1HM= -github.com/shurcooL/github_flavored_markdown v0.0.0-20181002035957-2122de532470/go.mod h1:2dOwnU2uBioM+SGy2aZoq1f/Sd1l9OkAeAUvjSyvgU0= -github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= -github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ= -github.com/shurcooL/gofontwoff v0.0.0-20180329035133-29b52fc0a18d/go.mod h1:05UtEgK5zq39gLST6uB0cf3NEHjETfB4Fgr3Gx5R9Vw= -github.com/shurcooL/gopherjslib v0.0.0-20160914041154-feb6d3990c2c/go.mod h1:8d3azKNyqcHP1GaQE/c6dDgjkgSx2BZ4IoEi4F1reUI= -github.com/shurcooL/highlight_diff v0.0.0-20170515013008-09bb4053de1b/go.mod h1:ZpfEhSmds4ytuByIcDnOLkTHGUI6KNqRNPDLHDk+mUU= -github.com/shurcooL/highlight_go v0.0.0-20170515013102-78fb10f4a5f8/go.mod h1:UDKB5a1T23gOMUJrI+uSuH0VRDStOiUVSjBTRDVBVag= -github.com/shurcooL/highlight_go v0.0.0-20181028180052-98c3abbbae20/go.mod h1:UDKB5a1T23gOMUJrI+uSuH0VRDStOiUVSjBTRDVBVag= -github.com/shurcooL/home v0.0.0-20181020052607-80b7ffcb30f9/go.mod h1:+rgNQw2P9ARFAs37qieuu7ohDNQ3gds9msbT2yn85sg= -github.com/shurcooL/htmlg v0.0.0-20170918183704-d01228ac9e50/go.mod h1:zPn1wHpTIePGnXSHpsVPWEktKXHr6+SS6x/IKRb7cpw= -github.com/shurcooL/httperror v0.0.0-20170206035902-86b7830d14cc/go.mod h1:aYMfkZ6DWSJPJ6c4Wwz3QtW22G7mf/PEgaB9k/ik5+Y= -github.com/shurcooL/httpfs v0.0.0-20171119174359-809beceb2371/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg= -github.com/shurcooL/httpgzip v0.0.0-20180522190206-b1c53ac65af9/go.mod h1:919LwcH0M7/W4fcZ0/jy0qGght1GIhqyS/EgWGH2j5Q= -github.com/shurcooL/issues v0.0.0-20181008053335-6292fdc1e191/go.mod h1:e2qWDig5bLteJ4fwvDAc2NHzqFEthkqn7aOZAOpj+PQ= -github.com/shurcooL/issuesapp v0.0.0-20180602232740-048589ce2241/go.mod h1:NPpHK2TI7iSaM0buivtFUc9offApnI0Alt/K8hcHy0I= -github.com/shurcooL/notifications v0.0.0-20181007000457-627ab5aea122/go.mod h1:b5uSkrEVM1jQUspwbixRBhaIjIzL2xazXp6kntxYle0= -github.com/shurcooL/octicon v0.0.0-20180602230221-c42b0e3b24d9/go.mod h1:eWdoE5JD4R5UVWDucdOPg1g2fqQRq78IQa9zlOV1vpQ= -github.com/shurcooL/octicon v0.0.0-20181028054416-fa4f57f9efb2/go.mod h1:eWdoE5JD4R5UVWDucdOPg1g2fqQRq78IQa9zlOV1vpQ= -github.com/shurcooL/reactions v0.0.0-20181006231557-f2e0b4ca5b82/go.mod h1:TCR1lToEk4d2s07G3XGfz2QrgHXg4RJBvjrOozvoWfk= -github.com/shurcooL/sanitized_anchor_name v0.0.0-20170918181015-86672fcb3f95/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/shurcooL/users v0.0.0-20180125191416-49c67e49c537/go.mod h1:QJTqeLYEDaXHZDBsXlPCDqdhQuJkuw4NOtaxYe3xii4= -github.com/shurcooL/webdavfs v0.0.0-20170829043945-18c3829fa133/go.mod h1:hKmq5kWdCj2z2KEozexVbfEZIWiTjhE0+UjmZgPqehw= -github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= -github.com/sirupsen/logrus v1.1.0/go.mod h1:zrgwTnHtNr00buQ1vSptGe8m1f/BbgsPukg8qsT7A+A= -github.com/sirupsen/logrus v1.1.1/go.mod h1:zrgwTnHtNr00buQ1vSptGe8m1f/BbgsPukg8qsT7A+A= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.3.0 h1:hI/7Q+DtNZ2kINb6qt/lS+IyXnHQe9e90POfeewL/ME= -github.com/sirupsen/logrus v1.3.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d/go.mod h1:UdhH50NIW0fCiwBSr0co2m7BnFLdv4fQTgdqdJTHFeE= -github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e/go.mod h1:HuIsMU8RRBOtsCgI77wP899iHVBQpCmg4ErYMZB+2IA= -github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.2.0/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= -github.com/spf13/cast v1.2.0/go.mod h1:r2rcYCSwa1IExKTDiTfzaxqT2FNHs8hODu4LnUfgKEg= -github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v0.0.3 h1:ZlrZ4XsMRm04Fr5pSFxBgfND2EBVa1nLpiy1stUsX/8= -github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/pflag v1.0.2/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/viper v1.2.1/go.mod h1:P4AexN0a+C9tGAnUFNwDMYYZv3pjFuvmeiMyKRaNVlI= -github.com/spf13/viper v1.3.1/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA= -github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/unrolled/secure v0.0.0-20180918153822-f340ee86eb8b/go.mod h1:mnPT77IAdsi/kV7+Es7y+pXALeV3h7G6dQF6mNYjcLA= -github.com/unrolled/secure v0.0.0-20181005190816-ff9db2ff917f/go.mod h1:mnPT77IAdsi/kV7+Es7y+pXALeV3h7G6dQF6mNYjcLA= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= -go.opencensus.io v0.18.0/go.mod h1:vKdFvxhtzZ9onBp9VKHK8z/sRpBMnKAsufL7wlDrCOA= -go4.org v0.0.0-20180809161055-417644f6feb5/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE= -golang.org/x/build v0.0.0-20190111050920-041ab4dc3f9d/go.mod h1:OWs+y06UdEOHN4y+MfF/py+xQ/tYqIWW03b70/CG9Rw= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20180910181607-0e37d006457b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181001203147-e3636079e1a4/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181009213950-7c1a557ab941/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181015023909-0c41d7ab0a0e/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181024171144-74cb1d3d52f4/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181025113841-85e1b3f9139a/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181025213731-e84da0312774/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181106171534-e4dc69e5b2fd/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181112202954-3d3f9f413869/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181127143415-eb0de9b17e85/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190102171810-8d7daa0c54b3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190103213133-ff983b9c42bc/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67 h1:ng3VDlRp5/DHpSWl02R4rM9I+8M2rhmsuLwAMmkLQWE= -golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180816102801-aaf60122140d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180921000356-2f5d2388922f/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180926154720-4dfa2610cdf3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181011144130-49bb7cea24b1/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181017193950-04a2e542c03f/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181029044818-c44066c5c816/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181102091132-c10e9556a7bc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181106065722-10aee1819953/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181207154023-610586996380/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/perf v0.0.0-20180704124530-6e6d33e29852/go.mod h1:JLpeXjPJfIyPr5TlbXLkXWLhP8nz10XfvxElABhCtcw= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180816055513-1c9583448a9c/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180906133057-8cf3aee42992/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180921163948-d47a0f339242/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180927150500-dad3d9fb7b6e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181005133103-4497e2df6f9e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181011152604-fa43e7bc11ba/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181022134430-8a28ead16f52/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181024145615-5cd93ef61a7c/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181025063200-d989b31c8746/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181026064943-731415f00dce/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181029174526-d69651ed3497/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181106135930-3a76605856fd/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181206074257-70b957f3b65e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190102155601-82a175fd1598/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190116161447-11f53e031339 h1:g/Jesu8+QLnA0CPzF3E1pURg0Byr7i6jLoX5sqjcAh0= -golang.org/x/sys v0.0.0-20190116161447-11f53e031339/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181003024731-2f84ea8ef872/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181006002542-f60d9635b16a/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181008205924-a2b3f7f249e9/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181013182035-5e66757b835f/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181017214349-06f26fdaaa28/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181024171208-a2dc47679d30/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181026183834-f60e5f99f081/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181030000716-a0a13e073c7b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181105230042-78dc5bac0cac/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181107215632-34b416bd17b3/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181114190951-94339b83286c/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181119130350-139d099f6620/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181127195227-b4e97c0ed882/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181127232545-e782529d0ddd/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181203210056-e5f3ab76ea4b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181205224935-3576414c54a4/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181206194817-bcd4e47d0288/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181207183836-8bc39b988060/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181212172921-837e80568c09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190102213336-ca9055ed7d04/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190104182027-498d95493402/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190111214448-fc1d57b08d7b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190118193359-16909d206f00/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190124004107-78ee07aa9465/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190131142011-8dbcc66f33bb/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190206221403-44bcb96178d3/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190219185102-9394956cfdc5/go.mod h1:E6PF97AdD6v0s+fPshSmumCW1S1Ne85RbPQxELkKa44= -golang.org/x/tools v0.0.0-20190221204921-83362c3779f5 h1:ev5exjGDsOo0NPTB0qdCcE53BfWl1IICJlhgXgfT9fM= -golang.org/x/tools v0.0.0-20190221204921-83362c3779f5/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -google.golang.org/api v0.0.0-20180910000450-7ca32eb868bf/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= -google.golang.org/api v0.0.0-20181030000543-1d582fd0359e/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= -google.golang.org/api v0.1.0/go.mod h1:UGEZY7KEX120AnNLIHFMKIo4obdJhkp2tPbaPlQx13Y= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20181029155118-b69ba1387ce2/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20181202183823-bd91e49a0898/go.mod h1:7Ep/1NZk928CDR8SjdVbjWNpdIf6nzjE3BTgJDr2Atg= -google.golang.org/genproto v0.0.0-20190201180003-4b09977fb922/go.mod h1:L3J43x8/uS+qIUoksaLKe6OS3nUKxOKuIFz1sl2/jx4= -google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= -google.golang.org/grpc v1.16.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio= -google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= -gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= -gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc/go.mod h1:m7x9LTH6d71AHyAX77c9yqWCCa3UKHcVEj9y7hAtKDk= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= -gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df/go.mod h1:LRQQ+SO6ZHR7tOkpBDuZnXENFzX8qRjMDMyPD6BRkCw= -gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/mail.v2 v2.0.0-20180731213649-a0242b2233b4/go.mod h1:htwXN1Qh09vZJ1NVKxQqHPBaCBbzKhp5GzuJEA4VJWw= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -grpc.go4.org v0.0.0-20170609214715-11d0a25b4919/go.mod h1:77eQGdRu53HpSqPFJFmuJdjuHRquDANNeA4x7B8WQ9o= -honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -sourcegraph.com/sourcegraph/go-diff v0.5.0/go.mod h1:kuch7UrkMzY0X+p9CRK03kfuPQ2zzQcaEFbx8wA8rck= -sourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4/go.mod h1:ketZ/q3QxT9HOBeFhu6RdvsftgpsbFHBF5Cas6cDKZ0= diff --git a/vendor/github.com/gobuffalo/gogen/goimports/README.md b/vendor/github.com/gobuffalo/gogen/goimports/README.md deleted file mode 100644 index 2fc751375..000000000 --- a/vendor/github.com/gobuffalo/gogen/goimports/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# goimports - -This package is a modified version of [https://github.com/golang/tools/tree/master/cmd/goimports](https://github.com/golang/tools/tree/master/cmd/goimports) to be called programmatically, instead of via the binary. - -Please see the `LICENSE` file details on the original license. diff --git a/vendor/github.com/gobuffalo/gogen/goimports/goimports.go b/vendor/github.com/gobuffalo/gogen/goimports/goimports.go deleted file mode 100644 index 1c68a124e..000000000 --- a/vendor/github.com/gobuffalo/gogen/goimports/goimports.go +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package goimports - -import ( - "bytes" - "io" - "io/ioutil" - "os" - "path/filepath" - "strings" - - "github.com/pkg/errors" - "golang.org/x/tools/imports" -) - -type File struct { - Name string - In io.Reader - Out io.Writer -} - -type Runner struct { - files []File -} - -func New(path ...string) (Runner, error) { - r := Runner{} - files, err := buildFiles(path...) - if err != nil { - return r, errors.WithStack(err) - } - r.files = files - return r, nil -} - -func NewFromFiles(files ...File) Runner { - return Runner{ - files: files, - } -} - -func (r Runner) Run() error { - for _, file := range r.files { - if err := r.processFile(file); err != nil { - return errors.WithStack(err) - } - } - return nil -} - -func (r Runner) processFile(file File) error { - var src []byte - var err error - if file.In == nil { - src, err = ioutil.ReadFile(file.Name) - } else { - src, err = ioutil.ReadAll(file.In) - } - if err != nil { - return errors.WithStack(err) - } - res, err := imports.Process(file.Name, src, nil) - if err != nil && err != io.EOF { - return errors.WithStack(err) - } - if bytes.Equal(src, res) { - if s, ok := file.In.(io.Seeker); ok { - s.Seek(0, 0) - } - return nil - } - if file.Out == nil { - if err = ioutil.WriteFile(file.Name, res, 0); err != nil { - return errors.WithStack(err) - } - return nil - } - _, err = file.Out.Write(res) - if c, ok := file.Out.(io.Closer); ok { - c.Close() - } - return err -} - -func isGoFile(f os.FileInfo) bool { - // ignore non-Go files - name := f.Name() - return !f.IsDir() && !strings.HasPrefix(name, ".") && strings.HasSuffix(name, ".go") -} - -func buildFiles(paths ...string) ([]File, error) { - var files []File - for _, root := range paths { - err := filepath.Walk(root, func(path string, info os.FileInfo, _ error) error { - if info == nil { - return nil - } - if info.IsDir() { - return nil - } - if !isGoFile(info) { - return nil - } - b, err := ioutil.ReadFile(path) - if err != nil { - return errors.WithStack(err) - } - files = append(files, File{ - Name: path, - In: bytes.NewReader(b), - }) - return nil - }) - if err != nil { - return files, errors.WithStack(err) - } - } - return files, nil -} diff --git a/vendor/github.com/gobuffalo/gogen/gomods/gomods.go b/vendor/github.com/gobuffalo/gogen/gomods/gomods.go deleted file mode 100644 index 906fefea8..000000000 --- a/vendor/github.com/gobuffalo/gogen/gomods/gomods.go +++ /dev/null @@ -1,32 +0,0 @@ -package gomods - -import ( - "github.com/gobuffalo/envy" - "github.com/markbates/safe" - "github.com/pkg/errors" -) - -const ENV = "GO111MODULE" - -var ErrModsOff = errors.New("go mods are turned off") - -func Force(b bool) { - if b { - envy.MustSet(ENV, "on") - return - } - envy.MustSet(ENV, "off") -} - -func On() bool { - return envy.Mods() -} - -func Disable(fn func() error) error { - oe := envy.Get(ENV, "off") - envy.MustSet(ENV, "off") - - err := safe.RunE(fn) - envy.MustSet(ENV, oe) - return err -} diff --git a/vendor/github.com/gobuffalo/gogen/gomods/init.go b/vendor/github.com/gobuffalo/gogen/gomods/init.go deleted file mode 100644 index 3d239c755..000000000 --- a/vendor/github.com/gobuffalo/gogen/gomods/init.go +++ /dev/null @@ -1,66 +0,0 @@ -package gomods - -import ( - "go/build" - "os" - "os/exec" - "strings" - - "github.com/gobuffalo/genny" - "github.com/pkg/errors" -) - -func New(name string, path string) (*genny.Group, error) { - g := &genny.Group{} - - init, err := Init(name, path) - if err != nil { - return g, errors.WithStack(err) - } - g.Add(init) - - tidy, err := Tidy(path, false) - if err != nil { - return g, errors.WithStack(err) - } - g.Add(tidy) - return g, nil -} - -func Init(name string, path string) (*genny.Generator, error) { - if len(name) == 0 && len(path) == 0 { - pwd, err := os.Getwd() - if err != nil { - return nil, errors.WithStack(err) - } - path = pwd - } - - if len(name) == 0 && path != "." { - name = path - c := build.Default - for _, s := range c.SrcDirs() { - name = strings.TrimPrefix(name, s) - } - } - - name = strings.Replace(name, "\\", "/", -1) - name = strings.TrimPrefix(name, "/") - - g := genny.New() - g.StepName = "go:mod:init:" + name - g.RunFn(func(r *genny.Runner) error { - if !On() { - return nil - } - return r.Chdir(path, func() error { - args := []string{"mod", "init"} - if len(name) > 0 { - args = append(args, name) - } - cmd := exec.Command(genny.GoBin(), args...) - return r.Exec(cmd) - }) - }) - return g, nil -} diff --git a/vendor/github.com/gobuffalo/gogen/gomods/tidy.go b/vendor/github.com/gobuffalo/gogen/gomods/tidy.go deleted file mode 100644 index b6c901fab..000000000 --- a/vendor/github.com/gobuffalo/gogen/gomods/tidy.go +++ /dev/null @@ -1,25 +0,0 @@ -package gomods - -import ( - "os/exec" - - "github.com/gobuffalo/genny" -) - -func Tidy(path string, verbose bool) (*genny.Generator, error) { - g := genny.New() - g.StepName = "go:mod:tidy:" + path - g.RunFn(func(r *genny.Runner) error { - if !On() { - return nil - } - return r.Chdir(path, func() error { - cmd := exec.Command(genny.GoBin(), "mod", "tidy") - if verbose { - cmd.Args = append(cmd.Args, "-v") - } - return r.Exec(cmd) - }) - }) - return g, nil -} diff --git a/vendor/github.com/gobuffalo/gogen/package.go b/vendor/github.com/gobuffalo/gogen/package.go deleted file mode 100644 index 56c05646b..000000000 --- a/vendor/github.com/gobuffalo/gogen/package.go +++ /dev/null @@ -1,20 +0,0 @@ -package gogen - -import ( - "path/filepath" - - "github.com/gobuffalo/genny" - "github.com/pkg/errors" -) - -func PackageName(f genny.File) (string, error) { - pkg := filepath.Base(filepath.Dir(f.Name())) - pf, err := ParseFile(f) - if err == nil { - pkg = pf.Ast.Name.String() - } - if len(pkg) == 0 || pkg == "." { - return "", errors.New("could not determine package") - } - return pkg, nil -} diff --git a/vendor/github.com/gobuffalo/gogen/replace_block_body.go b/vendor/github.com/gobuffalo/gogen/replace_block_body.go deleted file mode 100644 index e56194e15..000000000 --- a/vendor/github.com/gobuffalo/gogen/replace_block_body.go +++ /dev/null @@ -1,27 +0,0 @@ -package gogen - -import ( - "strings" - - "github.com/gobuffalo/genny" - "github.com/pkg/errors" -) - -// ReplaceBlockBody will replace found block with expressions passed -func ReplaceBlockBody(gf genny.File, search string, expressions ...string) (genny.File, error) { - pf, err := ParseFile(gf) - if err != nil { - return gf, errors.WithStack(err) - } - gf = pf.File - - start, end := findBlockCoordinates(search, pf) - if end < 0 { - return gf, errors.Errorf("could not find desired block in %s", gf.Name()) - } - - pf.Lines = append(pf.Lines[:start], append(expressions, pf.Lines[end:]...)...) - - fileContent := strings.Join(pf.Lines, "\n") - return genny.NewFile(gf.Name(), strings.NewReader(fileContent)), nil -} diff --git a/vendor/github.com/gobuffalo/gogen/rewrite_import.go b/vendor/github.com/gobuffalo/gogen/rewrite_import.go deleted file mode 100644 index 86e705b25..000000000 --- a/vendor/github.com/gobuffalo/gogen/rewrite_import.go +++ /dev/null @@ -1,34 +0,0 @@ -package gogen - -import ( - "bytes" - "go/ast" - "go/parser" - "go/printer" - - "github.com/gobuffalo/genny" - "github.com/pkg/errors" - "golang.org/x/tools/go/ast/astutil" -) - -func RewriteImports(gf genny.File, swaps map[string]string) (genny.File, error) { - pf, err := ParseFileMode(gf, parser.ParseComments) - if err != nil { - return gf, errors.WithStack(err) - } - for key, value := range swaps { - if !astutil.DeleteImport(pf.FileSet, pf.Ast, key) { - continue - } - - astutil.AddImport(pf.FileSet, pf.Ast, value) - } - ast.SortImports(pf.FileSet, pf.Ast) - - w := &bytes.Buffer{} - if err = (&printer.Config{Mode: printer.TabIndent | printer.UseSpaces, Tabwidth: 8}).Fprint(w, pf.FileSet, pf.Ast); err != nil { - return gf, errors.WithStack(err) - } - - return genny.NewFile(gf.Name(), w), nil -} diff --git a/vendor/github.com/gobuffalo/gogen/templates.go b/vendor/github.com/gobuffalo/gogen/templates.go deleted file mode 100644 index aa4e4b039..000000000 --- a/vendor/github.com/gobuffalo/gogen/templates.go +++ /dev/null @@ -1,52 +0,0 @@ -package gogen - -import ( - "bytes" - "io/ioutil" - - "text/template" - - "github.com/gobuffalo/genny" - "github.com/pkg/errors" -) - -var TemplateHelpers = map[string]interface{}{} - -// TemplateTransformer will run any file that has a ".tmpl" extension through text/template -func TemplateTransformer(data interface{}, helpers map[string]interface{}) genny.Transformer { - if helpers == nil { - helpers = TemplateHelpers - } - t := genny.NewTransformer(".tmpl", func(f genny.File) (genny.File, error) { - return renderWithTemplate(f, data, helpers) - }) - t.StripExt = true - return t -} - -func renderWithTemplate(f genny.File, data interface{}, helpers template.FuncMap) (genny.File, error) { - if f == nil { - return f, errors.New("file was nil") - } - path := f.Name() - t := template.New(path) - if helpers != nil { - t = t.Funcs(helpers) - } - - b, err := ioutil.ReadAll(f) - if err != nil { - return f, errors.WithStack(err) - } - t, err = t.Parse(string(b)) - if err != nil { - return f, errors.WithStack(err) - } - - var bb bytes.Buffer - if err = t.Execute(&bb, data); err != nil { - err = errors.WithStack(err) - return f, errors.WithStack(err) - } - return genny.StripExt(genny.NewFile(path, &bb), ".tmpl"), nil -} diff --git a/vendor/github.com/gobuffalo/gogen/version.go b/vendor/github.com/gobuffalo/gogen/version.go deleted file mode 100644 index 8a51a5c47..000000000 --- a/vendor/github.com/gobuffalo/gogen/version.go +++ /dev/null @@ -1,4 +0,0 @@ -package gogen - -// Version of gogen -const Version = "v0.0.1" diff --git a/vendor/github.com/gobuffalo/logger/.gometalinter.json b/vendor/github.com/gobuffalo/logger/.gometalinter.json deleted file mode 100644 index e4f65a36e..000000000 --- a/vendor/github.com/gobuffalo/logger/.gometalinter.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "Enable": ["vet", "golint", "goimports", "deadcode", "gotype", "ineffassign", "misspell", "nakedret", "unconvert", "megacheck", "varcheck"] -} diff --git a/vendor/github.com/gobuffalo/logger/LICENSE b/vendor/github.com/gobuffalo/logger/LICENSE index a538bcbf2..649efd437 100644 --- a/vendor/github.com/gobuffalo/logger/LICENSE +++ b/vendor/github.com/gobuffalo/logger/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2018 Mark Bates +Copyright (c) 2019 Mark Bates Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/github.com/gobuffalo/logger/Makefile b/vendor/github.com/gobuffalo/logger/Makefile index e0e2f3baa..0ac539f1c 100644 --- a/vendor/github.com/gobuffalo/logger/Makefile +++ b/vendor/github.com/gobuffalo/logger/Makefile @@ -1,8 +1,7 @@ -TAGS ?= "sqlite" -GO_BIN ?= go +TAGS ?= "" +GO_BIN ?= "go" -install: - packr +install: $(GO_BIN) install -tags ${TAGS} -v . make tidy @@ -14,42 +13,49 @@ else endif deps: - $(GO_BIN) get github.com/gobuffalo/release - $(GO_BIN) get github.com/gobuffalo/packr/packr $(GO_BIN) get -tags ${TAGS} -t ./... make tidy -build: - packr +build: $(GO_BIN) build -v . make tidy -test: - packr - $(GO_BIN) test -tags ${TAGS} ./... +test: + $(GO_BIN) test -cover -tags ${TAGS} ./... make tidy -ci-test: +ci-deps: + $(GO_BIN) get -tags ${TAGS} -t ./... + +ci-test: $(GO_BIN) test -tags ${TAGS} -race ./... - make tidy lint: - gometalinter --vendor ./... --deadline=1m --skip=internal + go get github.com/golangci/golangci-lint/cmd/golangci-lint + golangci-lint run --enable-all make tidy update: +ifeq ($(GO111MODULE),on) + rm go.* + $(GO_BIN) mod init + $(GO_BIN) mod tidy +else $(GO_BIN) get -u -tags ${TAGS} - make tidy - packr +endif make test make install make tidy -release-test: +release-test: $(GO_BIN) test -tags ${TAGS} -race ./... make tidy release: + $(GO_BIN) get github.com/gobuffalo/release make tidy - release -y -f version.go + release -y -f version.go --skip-packr make tidy + + + diff --git a/vendor/github.com/gobuffalo/logger/SHOULDERS.md b/vendor/github.com/gobuffalo/logger/SHOULDERS.md new file mode 100644 index 000000000..1780b8a05 --- /dev/null +++ b/vendor/github.com/gobuffalo/logger/SHOULDERS.md @@ -0,0 +1,18 @@ +# github.com/gobuffalo/logger Stands on the Shoulders of Giants + +github.com/gobuffalo/logger does not try to reinvent the wheel! Instead, it uses the already great wheels developed by the Go community and puts them all together in the best way possible. Without these giants, this project would not be possible. Please make sure to check them out and thank them for all of their hard work. + +Thank you to the following **GIANTS**: + + +* [github.com/gobuffalo/envy](https://godoc.org/github.com/gobuffalo/envy) + +* [github.com/konsorten/go-windows-terminal-sequences](https://godoc.org/github.com/konsorten/go-windows-terminal-sequences) + +* [github.com/rogpeppe/go-internal](https://godoc.org/github.com/rogpeppe/go-internal) + +* [github.com/sirupsen/logrus](https://godoc.org/github.com/sirupsen/logrus) + +* [golang.org/x/term](https://godoc.org/golang.org/x/term) + +* [golang.org/x/sys](https://godoc.org/golang.org/x/sys) diff --git a/vendor/github.com/gobuffalo/logger/formatter.go b/vendor/github.com/gobuffalo/logger/formatter.go index cb173d77e..3018bf4b5 100644 --- a/vendor/github.com/gobuffalo/logger/formatter.go +++ b/vendor/github.com/gobuffalo/logger/formatter.go @@ -61,6 +61,7 @@ func (f *textFormatter) Format(entry *logrus.Entry) ([]byte, error) { f.printColored(b, entry, keys) } else { f.appendKeyValue(b, "level", entry.Level.String()) + f.appendKeyValue(b, "time", entry.Time.Format(defaultTimestampFormat)) if entry.Message != "" { f.appendKeyValue(b, "msg", entry.Message) } diff --git a/vendor/github.com/gobuffalo/logger/go.mod b/vendor/github.com/gobuffalo/logger/go.mod index 751943b33..f55f05c69 100644 --- a/vendor/github.com/gobuffalo/logger/go.mod +++ b/vendor/github.com/gobuffalo/logger/go.mod @@ -1,7 +1,8 @@ module github.com/gobuffalo/logger +go 1.13 + require ( - github.com/gobuffalo/envy v1.6.9 - github.com/sirupsen/logrus v1.2.0 - golang.org/x/crypto v0.0.0-20181127143415-eb0de9b17e85 + github.com/sirupsen/logrus v1.4.2 + golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf ) diff --git a/vendor/github.com/gobuffalo/logger/go.sum b/vendor/github.com/gobuffalo/logger/go.sum index 0df0a19ba..47ed4e3c8 100644 --- a/vendor/github.com/gobuffalo/logger/go.sum +++ b/vendor/github.com/gobuffalo/logger/go.sum @@ -1,20 +1,17 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/gobuffalo/envy v1.6.9 h1:ShEJ/fUg/wr5qIYmTTOnUQ0sy1yGo+4uYQJNgg753S8= -github.com/gobuffalo/envy v1.6.9/go.mod h1:N+GkhhZ/93bGZc6ZKhJLP6+m+tCNPKwgSpH9kaifseQ= -github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc= -github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/sirupsen/logrus v1.2.0 h1:juTguoYk5qI21pwyTXY3B3Y5cOTH3ZUyZCg1v/mihuo= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181127143415-eb0de9b17e85 h1:et7+NAX3lLIk5qUCTA9QelBjGE/NkhzYw/mhnr0s7nI= -golang.org/x/crypto v0.0.0-20181127143415-eb0de9b17e85/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33 h1:I6FyU15t786LL7oL/hn43zqTuEGr4PN7F4XJ1p4E3Y8= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894 h1:Cz4ceDQGXuKRnVBDTS23GTn/pU5OE2C0WrNTOYK1Uuc= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68 h1:nxC68pudNYkKU6jWhgrqdreuFiOQWj1Fs7T3VrH4Pjw= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf h1:MZ2shdL+ZM/XzY3ZGOnh4Nlpnxz5GSOhOmtHo3iPU6M= +golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= diff --git a/vendor/github.com/gobuffalo/logger/logger.go b/vendor/github.com/gobuffalo/logger/logger.go index ad7d1f8e8..0591cf584 100644 --- a/vendor/github.com/gobuffalo/logger/logger.go +++ b/vendor/github.com/gobuffalo/logger/logger.go @@ -3,7 +3,6 @@ package logger import ( "os" - "github.com/gobuffalo/envy" "github.com/sirupsen/logrus" ) @@ -53,7 +52,11 @@ func NewLogger(level string) FieldLogger { Example: time="2016-12-01T21:02:07-05:00" level=info duration=225.283µs human_size="106 B" method=GET path="/" render=199.79µs request_id=2265736089 size=106 status=200 */ func New(lvl Level) FieldLogger { - dev := envy.Get("GO_ENV", "development") == "development" + e := os.Getenv("GO_ENV") + if len(e) == 0 { + e = "development" + } + dev := e == "development" l := logrus.New() l.SetOutput(os.Stdout) l.Level = lvl diff --git a/vendor/github.com/gobuffalo/logger/terminal_check.go b/vendor/github.com/gobuffalo/logger/terminal_check.go index f7ec282c8..008943205 100644 --- a/vendor/github.com/gobuffalo/logger/terminal_check.go +++ b/vendor/github.com/gobuffalo/logger/terminal_check.go @@ -6,13 +6,13 @@ import ( "io" "os" - "golang.org/x/crypto/ssh/terminal" + "golang.org/x/term" ) func checkIfTerminal(w io.Writer) bool { switch v := w.(type) { case *os.File: - return terminal.IsTerminal(int(v.Fd())) + return term.IsTerminal(int(v.Fd())) default: return false } diff --git a/vendor/github.com/gobuffalo/logger/version.go b/vendor/github.com/gobuffalo/logger/version.go index 40b8bf87a..dee0c6f15 100644 --- a/vendor/github.com/gobuffalo/logger/version.go +++ b/vendor/github.com/gobuffalo/logger/version.go @@ -1,4 +1,4 @@ package logger // Version of the logger -const Version = "v0.0.1" +const Version = "v1.0.1" diff --git a/vendor/github.com/gobuffalo/mapi/.gitignore b/vendor/github.com/gobuffalo/mapi/.gitignore deleted file mode 100644 index 368971859..000000000 --- a/vendor/github.com/gobuffalo/mapi/.gitignore +++ /dev/null @@ -1,29 +0,0 @@ -*.log -.DS_Store -doc -tmp -pkg -*.gem -*.pid -coverage -coverage.data -build/* -*.pbxuser -*.mode1v3 -.svn -profile -.console_history -.sass-cache/* -.rake_tasks~ -*.log.lck -solr/ -.jhw-cache/ -jhw.* -*.sublime* -node_modules/ -dist/ -generated/ -.vendor/ -bin/* -gin-bin -.idea/ diff --git a/vendor/github.com/gobuffalo/mapi/.gometalinter.json b/vendor/github.com/gobuffalo/mapi/.gometalinter.json deleted file mode 100644 index e4f65a36e..000000000 --- a/vendor/github.com/gobuffalo/mapi/.gometalinter.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "Enable": ["vet", "golint", "goimports", "deadcode", "gotype", "ineffassign", "misspell", "nakedret", "unconvert", "megacheck", "varcheck"] -} diff --git a/vendor/github.com/gobuffalo/mapi/Makefile b/vendor/github.com/gobuffalo/mapi/Makefile deleted file mode 100644 index 187cb8a3f..000000000 --- a/vendor/github.com/gobuffalo/mapi/Makefile +++ /dev/null @@ -1,40 +0,0 @@ -TAGS ?= "sqlite" -GO_BIN ?= go - -install: - packr - $(GO_BIN) install -v . - -deps: - $(GO_BIN) get github.com/gobuffalo/release - $(GO_BIN) get github.com/gobuffalo/packr/packr - $(GO_BIN) get -tags ${TAGS} -t ./... - $(GO_BIN) mod tidy - -build: - packr - $(GO_BIN) build -v . - -test: - packr - $(GO_BIN) test -tags ${TAGS} ./... - -ci-test: deps - $(GO_BIN) test -tags ${TAGS} -race ./... - -lint: - gometalinter --vendor ./... --deadline=1m --skip=internal - -update: - $(GO_BIN) get -u -tags ${TAGS} - $(GO_BIN) mod tidy - packr - make test - make install - $(GO_BIN) mod tidy - -release-test: - $(GO_BIN) test -tags ${TAGS} -race ./... - -release: - release -y -f version.go diff --git a/vendor/github.com/gobuffalo/mapi/go.mod b/vendor/github.com/gobuffalo/mapi/go.mod deleted file mode 100644 index 0408822d3..000000000 --- a/vendor/github.com/gobuffalo/mapi/go.mod +++ /dev/null @@ -1,8 +0,0 @@ -module github.com/gobuffalo/mapi - -require ( - github.com/davecgh/go-spew v1.1.1 // indirect - github.com/pkg/errors v0.8.0 - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/stretchr/testify v1.2.2 -) diff --git a/vendor/github.com/gobuffalo/mapi/go.sum b/vendor/github.com/gobuffalo/mapi/go.sum deleted file mode 100644 index 68c9735d5..000000000 --- a/vendor/github.com/gobuffalo/mapi/go.sum +++ /dev/null @@ -1,8 +0,0 @@ -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/pkg/errors v0.8.0 h1:WdK/asTD0HN+q6hsWO3/vpuAkAr+tw6aNJNDFFf0+qw= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= diff --git a/vendor/github.com/gobuffalo/mapi/mapi.go b/vendor/github.com/gobuffalo/mapi/mapi.go deleted file mode 100644 index 21de16a3a..000000000 --- a/vendor/github.com/gobuffalo/mapi/mapi.go +++ /dev/null @@ -1,109 +0,0 @@ -package mapi - -import ( - "encoding/json" - "reflect" - "strings" - - "github.com/pkg/errors" -) - -var ErrNotFound = errors.New("not found") - -type Mapi map[string]interface{} - -func (mi Mapi) String() string { - b, _ := mi.MarshalJSON() - return string(b) -} - -func (mi Mapi) Interface() interface{} { - return mi -} - -func (mi Mapi) Pluck(s string) (interface{}, error) { - keys := strings.Split(s, ":") - return reduce(keys, mi) -} - -func (mi *Mapi) UnmarshalJSON(b []byte) error { - mm := map[string]interface{}{} - if err := json.Unmarshal(b, &mm); err != nil { - return errors.WithStack(err) - } - unmarshal(mm) - (*mi) = Mapi(mm) - return nil -} - -func unmarshal(m map[string]interface{}) { - for k, v := range m { - if mv, ok := v.(map[string]interface{}); ok { - unmarshal(mv) - m[k] = Mapi(mv) - } - } -} - -func (mi Mapi) MarshalJSON() ([]byte, error) { - m := map[string]interface{}{} - - for k, v := range mi { - rv := reflect.Indirect(reflect.ValueOf(v)) - switch rv.Kind() { - case reflect.Map: - mm := Mapi{} - for _, xk := range rv.MapKeys() { - mm[xk.String()] = rv.MapIndex(xk).Interface() - } - m[k] = mm - default: - if _, ok := v.(Mapi); ok { - continue - } - if _, err := json.Marshal(v); err == nil { - // if it can be marshaled, add it to the map - m[k] = v - } - } - } - return json.Marshal(m) -} - -func reduce(keys []string, in interface{}) (interface{}, error) { - if len(keys) == 0 { - return nil, ErrNotFound - } - - rv := reflect.Indirect(reflect.ValueOf(in)) - if !rv.IsValid() { - return nil, ErrNotFound - } - if rv.Kind() != reflect.Map { - return nil, ErrNotFound - } - - var key reflect.Value - for _, k := range rv.MapKeys() { - if k.String() == keys[0] { - key = k - break - } - } - if !key.IsValid() { - return nil, ErrNotFound - } - - keys = keys[1:] - iv := rv.MapIndex(key) - - if !iv.IsValid() { - return nil, ErrNotFound - } - - if len(keys) == 0 { - return iv.Interface(), nil - } - - return reduce(keys, iv.Interface()) -} diff --git a/vendor/github.com/gobuffalo/mapi/shoulders.md b/vendor/github.com/gobuffalo/mapi/shoulders.md deleted file mode 100644 index 47f65e8e0..000000000 --- a/vendor/github.com/gobuffalo/mapi/shoulders.md +++ /dev/null @@ -1,10 +0,0 @@ -# github.com/gobuffalo/mapi Stands on the Shoulders of Giants - -github.com/gobuffalo/mapi does not try to reinvent the wheel! Instead, it uses the already great wheels developed by the Go community and puts them all together in the best way possible. Without these giants this project would not be possible. Please make sure to check them out and thank them for all of their hard work. - -Thank you to the following **GIANTS**: - - -* [github.com/gobuffalo/mapi](https://godoc.org/github.com/gobuffalo/mapi) - -* [github.com/pkg/errors](https://godoc.org/github.com/pkg/errors) diff --git a/vendor/github.com/gobuffalo/mapi/version.go b/vendor/github.com/gobuffalo/mapi/version.go deleted file mode 100644 index 5af0dd14a..000000000 --- a/vendor/github.com/gobuffalo/mapi/version.go +++ /dev/null @@ -1,3 +0,0 @@ -package mapi - -const Version = "v1.0.1" diff --git a/vendor/github.com/gobuffalo/meta/.gitignore b/vendor/github.com/gobuffalo/meta/.gitignore deleted file mode 100644 index 368971859..000000000 --- a/vendor/github.com/gobuffalo/meta/.gitignore +++ /dev/null @@ -1,29 +0,0 @@ -*.log -.DS_Store -doc -tmp -pkg -*.gem -*.pid -coverage -coverage.data -build/* -*.pbxuser -*.mode1v3 -.svn -profile -.console_history -.sass-cache/* -.rake_tasks~ -*.log.lck -solr/ -.jhw-cache/ -jhw.* -*.sublime* -node_modules/ -dist/ -generated/ -.vendor/ -bin/* -gin-bin -.idea/ diff --git a/vendor/github.com/gobuffalo/meta/.gometalinter.json b/vendor/github.com/gobuffalo/meta/.gometalinter.json deleted file mode 100644 index e4f65a36e..000000000 --- a/vendor/github.com/gobuffalo/meta/.gometalinter.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "Enable": ["vet", "golint", "goimports", "deadcode", "gotype", "ineffassign", "misspell", "nakedret", "unconvert", "megacheck", "varcheck"] -} diff --git a/vendor/github.com/gobuffalo/meta/.travis.yml b/vendor/github.com/gobuffalo/meta/.travis.yml deleted file mode 100644 index 1fb041a25..000000000 --- a/vendor/github.com/gobuffalo/meta/.travis.yml +++ /dev/null @@ -1,36 +0,0 @@ -language: go - -sudo: false - -matrix: - include: - - os: linux - go: "1.9.x" - - os: windows - go: "1.9.x" - - os: linux - go: "1.10.x" - - os: windows - go: "1.10.x" - - os: linux - go: "1.11.x" - env: - - GO111MODULE=off - - os: windows - go: "1.11.x" - env: - - GO111MODULE=off - - os: linux - go: "1.11.x" - env: - - GO111MODULE=on - - os: windows - go: "1.11.x" - env: - - GO111MODULE=on - -install: false - -script: - - go get -v -t ./... - - go test -v -timeout=5s -race ./... diff --git a/vendor/github.com/gobuffalo/meta/LICENSE b/vendor/github.com/gobuffalo/meta/LICENSE deleted file mode 100644 index a538bcbf2..000000000 --- a/vendor/github.com/gobuffalo/meta/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2018 Mark Bates - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/vendor/github.com/gobuffalo/meta/Makefile b/vendor/github.com/gobuffalo/meta/Makefile deleted file mode 100644 index fee1bee00..000000000 --- a/vendor/github.com/gobuffalo/meta/Makefile +++ /dev/null @@ -1,46 +0,0 @@ -TAGS ?= "sqlite" -GO_BIN ?= go - -install: deps - packr - $(GO_BIN) install -tags ${TAGS} -v . - -deps: - $(GO_BIN) get github.com/gobuffalo/release - $(GO_BIN) get github.com/gobuffalo/packr/packr - $(GO_BIN) get -tags ${TAGS} -t ./... -ifeq ($(GO111MODULE),on) - $(GO_BIN) mod tidy -endif - -build: - packr - $(GO_BIN) build -v . - -test: - packr - $(GO_BIN) test -tags ${TAGS} ./... - -ci-test: - $(GO_BIN) test -tags ${TAGS} -race ./... - -lint: - gometalinter --vendor ./... --deadline=1m --skip=internal - -update: - $(GO_BIN) get -u -tags ${TAGS} -ifeq ($(GO111MODULE),on) - $(GO_BIN) mod tidy -endif - packr - make test - make install -ifeq ($(GO111MODULE),on) - $(GO_BIN) mod tidy -endif - -release-test: - $(GO_BIN) test -tags ${TAGS} -race ./... - -release: - release -y -f version.go diff --git a/vendor/github.com/gobuffalo/meta/SHOULDERS.md b/vendor/github.com/gobuffalo/meta/SHOULDERS.md deleted file mode 100644 index 97639fee9..000000000 --- a/vendor/github.com/gobuffalo/meta/SHOULDERS.md +++ /dev/null @@ -1,20 +0,0 @@ -# `github.com/gobuffalo/meta` Stands on the Shoulders of Giants - -`github.com/gobuffalo/meta` does not try to reinvent the wheel! Instead, it uses the already great wheels developed by the Go community and puts them all together in the best way possible. Without these giants this project would not be possible. Please make sure to check them out and thank them for all of their hard work. - -Thank you to the following **GIANTS**: - - -* [github.com/BurntSushi/toml](https://godoc.org/github.com/BurntSushi/toml) - -* [github.com/gobuffalo/envy](https://godoc.org/github.com/gobuffalo/envy) - -* [github.com/gobuffalo/flect](https://godoc.org/github.com/gobuffalo/flect) - -* [github.com/gobuffalo/flect/name](https://godoc.org/github.com/gobuffalo/flect/name) - -* [github.com/gobuffalo/meta](https://godoc.org/github.com/gobuffalo/meta) - -* [github.com/joho/godotenv](https://godoc.org/github.com/joho/godotenv) - -* [github.com/pkg/errors](https://godoc.org/github.com/pkg/errors) diff --git a/vendor/github.com/gobuffalo/meta/app.go b/vendor/github.com/gobuffalo/meta/app.go deleted file mode 100644 index e960a6d31..000000000 --- a/vendor/github.com/gobuffalo/meta/app.go +++ /dev/null @@ -1,156 +0,0 @@ -package meta - -import ( - "encoding/json" - "fmt" - "io" - "io/ioutil" - "os" - "path" - "path/filepath" - - "github.com/BurntSushi/toml" - "github.com/gobuffalo/envy" - "github.com/gobuffalo/flect/name" - "github.com/markbates/oncer" - "github.com/pkg/errors" - "github.com/rogpeppe/go-internal/modfile" -) - -// App represents meta data for a Buffalo application on disk -type App struct { - Pwd string `json:"pwd" toml:"-"` - Root string `json:"root" toml:"-"` - GoPath string `json:"go_path" toml:"-"` - PackagePkg string `json:"package_path" toml:"-"` - ActionsPkg string `json:"actions_path" toml:"-"` - ModelsPkg string `json:"models_path" toml:"-"` - GriftsPkg string `json:"grifts_path" toml:"-"` - WithModules bool `json:"with_modules" toml:"-"` - Name name.Ident `json:"name" toml:"name"` - Bin string `json:"bin" toml:"bin"` - VCS string `json:"vcs" toml:"vcs"` - WithPop bool `json:"with_pop" toml:"with_pop"` - WithSQLite bool `json:"with_sqlite" toml:"with_sqlite"` - WithDep bool `json:"with_dep" toml:"with_dep"` - WithWebpack bool `json:"with_webpack" toml:"with_webpack"` - WithNodeJs bool `json:"with_nodejs" toml:"with_nodejs"` - WithYarn bool `json:"with_yarn" toml:"with_yarn"` - WithDocker bool `json:"with_docker" toml:"with_docker"` - WithGrifts bool `json:"with_grifts" toml:"with_grifts"` - AsWeb bool `json:"as_web" toml:"as_web"` - AsAPI bool `json:"as_api" toml:"as_api"` - packageJSON packageJSON -} - -func (a App) IsZero() bool { - return a.String() == App{}.String() -} - -func resolvePackageName(name string, pwd string) string { - result, _ := envy.CurrentModule() - - if filepath.Base(result) != name { - result = path.Join(result, name) - } - if envy.Mods() { - moddata, err := ioutil.ReadFile(filepath.Join(pwd, name, "go.mod")) - if err != nil { - return result - } - packagePath := modfile.ModulePath(moddata) - if packagePath == "" { - return name - } - return packagePath - } - - return result -} - -// ResolveSymlinks takes a path and gets the pointed path -// if the original one is a symlink. -func ResolveSymlinks(p string) string { - cd, err := os.Lstat(p) - if err != nil { - return p - } - if cd.Mode()&os.ModeSymlink != 0 { - // This is a symlink - r, err := filepath.EvalSymlinks(p) - if err != nil { - return p - } - return r - } - return p -} - -func (a App) String() string { - b, _ := json.Marshal(a) - return string(b) -} - -// Encode the list of plugins, in TOML format, to the reader -func (a App) Encode(w io.Writer) error { - if err := toml.NewEncoder(w).Encode(a); err != nil { - return errors.WithStack(err) - } - return nil -} - -// Decode the list of plugins, in TOML format, from the reader -func (a *App) Decode(r io.Reader) error { - xa := New(".") - if _, err := toml.DecodeReader(r, &xa); err != nil { - return errors.WithStack(err) - } - (*a) = xa - return nil -} - -// PackageRoot sets the root package of the application and -// recalculates package related values -func (a *App) PackageRoot(pp string) { - a.PackagePkg = pp - a.ActionsPkg = pp + "/actions" - a.ModelsPkg = pp + "/models" - a.GriftsPkg = pp + "/grifts" -} - -type packageJSON struct { - Scripts map[string]string `json:"scripts"` -} - -// NodeScript gets the "scripts" section from package.json and -// returns the matching script if it exists. -func (a App) NodeScript(name string) (string, error) { - if !a.WithNodeJs { - return "", errors.New("package.json not found") - } - var err error - oncer.Do("meta.NodeScript", func() { - var b []byte - b, err = ioutil.ReadFile(filepath.Join(a.Root, "package.json")) - if err != nil { - err = errors.WithMessage(err, "could not read package.json") - return - } - p := packageJSON{} - if err = json.Unmarshal(b, &p); err != nil { - err = errors.WithMessage(err, "could not parse package.json") - return - } - a.packageJSON = p - }) - - if err != nil { - return "", err - } - - s, ok := a.packageJSON.Scripts[name] - if ok { - return s, nil - } - return "", fmt.Errorf("node script %s not found", name) -} diff --git a/vendor/github.com/gobuffalo/meta/go.mod b/vendor/github.com/gobuffalo/meta/go.mod deleted file mode 100644 index 03dfa6e15..000000000 --- a/vendor/github.com/gobuffalo/meta/go.mod +++ /dev/null @@ -1,13 +0,0 @@ -module github.com/gobuffalo/meta - -require ( - github.com/BurntSushi/toml v0.3.1 - github.com/gobuffalo/envy v1.6.12 - github.com/gobuffalo/flect v0.0.0-20190117212819-a62e61d96794 - github.com/kr/pty v1.1.3 // indirect - github.com/markbates/deplist v1.0.5 // indirect - github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2 - github.com/pkg/errors v0.8.1 - github.com/rogpeppe/go-internal v1.1.0 - github.com/stretchr/testify v1.3.0 -) diff --git a/vendor/github.com/gobuffalo/meta/go.sum b/vendor/github.com/gobuffalo/meta/go.sum deleted file mode 100644 index 111704532..000000000 --- a/vendor/github.com/gobuffalo/meta/go.sum +++ /dev/null @@ -1,375 +0,0 @@ -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= -github.com/ajg/form v0.0.0-20160822230020-523a5da1a92f/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= -github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= -github.com/cockroachdb/cockroach-go v0.0.0-20181001143604-e0a95dfd547c/go.mod h1:XGLbWH/ujMcbPbhZq52Nv6UrCghb1yGn//133kEsvDk= -github.com/codegangsta/negroni v1.0.0/go.mod h1:v0y3T5G7Y1UlFfyxFn/QLRU4a2EuNau2iZY63YTKWo0= -github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= -github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dustin/go-humanize v0.0.0-20180713052910-9f541cc9db5d/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/structs v1.0.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= -github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= -github.com/gobuffalo/buffalo v0.12.8-0.20181004233540-fac9bb505aa8/go.mod h1:sLyT7/dceRXJUxSsE813JTQtA3Eb1vjxWfo/N//vXIY= -github.com/gobuffalo/buffalo v0.13.0/go.mod h1:Mjn1Ba9wpIbpbrD+lIDMy99pQ0H0LiddMIIDGse7qT4= -github.com/gobuffalo/buffalo-plugins v1.0.2/go.mod h1:pOp/uF7X3IShFHyobahTkTLZaeUXwb0GrUTb9ngJWTs= -github.com/gobuffalo/buffalo-plugins v1.0.4/go.mod h1:pWS1vjtQ6uD17MVFWf7i3zfThrEKWlI5+PYLw/NaDB4= -github.com/gobuffalo/buffalo-plugins v1.4.3/go.mod h1:uCzTY0woez4nDMdQjkcOYKanngeUVRO2HZi7ezmAjWY= -github.com/gobuffalo/buffalo-plugins v1.5.1/go.mod h1:jbmwSZK5+PiAP9cC09VQOrGMZFCa/P0UMlIS3O12r5w= -github.com/gobuffalo/buffalo-plugins v1.6.4/go.mod h1:/+N1aophkA2jZ1ifB2O3Y9yGwu6gKOVMtUmJnbg+OZI= -github.com/gobuffalo/buffalo-plugins v1.6.5/go.mod h1:0HVkbgrVs/MnPZ/FOseDMVanCTm2RNcdM0PuXcL1NNI= -github.com/gobuffalo/buffalo-plugins v1.6.7/go.mod h1:ZGZRkzz2PiKWHs0z7QsPBOTo2EpcGRArMEym6ghKYgk= -github.com/gobuffalo/buffalo-plugins v1.6.9/go.mod h1:yYlYTrPdMCz+6/+UaXg5Jm4gN3xhsvsQ2ygVatZV5vw= -github.com/gobuffalo/buffalo-plugins v1.6.11/go.mod h1:eAA6xJIL8OuynJZ8amXjRmHND6YiusVAaJdHDN1Lu8Q= -github.com/gobuffalo/buffalo-plugins v1.8.2/go.mod h1:9te6/VjEQ7pKp7lXlDIMqzxgGpjlKoAcAANdCgoR960= -github.com/gobuffalo/buffalo-plugins v1.8.3/go.mod h1:IAWq6vjZJVXebIq2qGTLOdlXzmpyTZ5iJG5b59fza5U= -github.com/gobuffalo/buffalo-plugins v1.9.4/go.mod h1:grCV6DGsQlVzQwk6XdgcL3ZPgLm9BVxlBmXPMF8oBHI= -github.com/gobuffalo/buffalo-plugins v1.10.0/go.mod h1:4osg8d9s60txLuGwXnqH+RCjPHj9K466cDFRl3PErHI= -github.com/gobuffalo/buffalo-pop v1.0.5/go.mod h1:Fw/LfFDnSmB/vvQXPvcXEjzP98Tc+AudyNWUBWKCwQ8= -github.com/gobuffalo/envy v1.6.4/go.mod h1:Abh+Jfw475/NWtYMEt+hnJWRiC8INKWibIMyNt1w2Mc= -github.com/gobuffalo/envy v1.6.5/go.mod h1:N+GkhhZ/93bGZc6ZKhJLP6+m+tCNPKwgSpH9kaifseQ= -github.com/gobuffalo/envy v1.6.6/go.mod h1:N+GkhhZ/93bGZc6ZKhJLP6+m+tCNPKwgSpH9kaifseQ= -github.com/gobuffalo/envy v1.6.7/go.mod h1:N+GkhhZ/93bGZc6ZKhJLP6+m+tCNPKwgSpH9kaifseQ= -github.com/gobuffalo/envy v1.6.8/go.mod h1:N+GkhhZ/93bGZc6ZKhJLP6+m+tCNPKwgSpH9kaifseQ= -github.com/gobuffalo/envy v1.6.9/go.mod h1:N+GkhhZ/93bGZc6ZKhJLP6+m+tCNPKwgSpH9kaifseQ= -github.com/gobuffalo/envy v1.6.10/go.mod h1:X0CFllQjTV5ogsnUrg+Oks2yTI+PU2dGYBJOEI2D1Uo= -github.com/gobuffalo/envy v1.6.11/go.mod h1:Fiq52W7nrHGDggFPhn2ZCcHw4u/rqXkqo+i7FB6EAcg= -github.com/gobuffalo/envy v1.6.12 h1:zkhss8DXz/pty2HAyA8BnvWMTYxo4gjd4+WCnYovoxY= -github.com/gobuffalo/envy v1.6.12/go.mod h1:qJNrJhKkZpEW0glh5xP2syQHH5kgdmgsKss2Kk8PTP0= -github.com/gobuffalo/events v1.0.3/go.mod h1:Txo8WmqScapa7zimEQIwgiJBvMECMe9gJjsKNPN3uZw= -github.com/gobuffalo/events v1.0.7/go.mod h1:z8txf6H9jWhQ5Scr7YPLWg/cgXBRj8Q4uYI+rsVCCSQ= -github.com/gobuffalo/events v1.0.8/go.mod h1:A5KyqT1sA+3GJiBE4QKZibse9mtOcI9nw8gGrDdqYGs= -github.com/gobuffalo/events v1.1.3/go.mod h1:9yPGWYv11GENtzrIRApwQRMYSbUgCsZ1w6R503fCfrk= -github.com/gobuffalo/events v1.1.4/go.mod h1:09/YRRgZHEOts5Isov+g9X2xajxdvOAcUuAHIX/O//A= -github.com/gobuffalo/events v1.1.5/go.mod h1:3YUSzgHfYctSjEjLCWbkXP6djH2M+MLaVRzb4ymbAK0= -github.com/gobuffalo/events v1.1.7/go.mod h1:6fGqxH2ing5XMb3EYRq9LEkVlyPGs4oO/eLzh+S8CxY= -github.com/gobuffalo/events v1.1.8/go.mod h1:UFy+W6X6VbCWS8k2iT81HYX65dMtiuVycMy04cplt/8= -github.com/gobuffalo/events v1.1.9/go.mod h1:/0nf8lMtP5TkgNbzYxR6Bl4GzBy5s5TebgNTdRfRbPM= -github.com/gobuffalo/fizz v1.0.12/go.mod h1:C0sltPxpYK8Ftvf64kbsQa2yiCZY4RZviurNxXdAKwc= -github.com/gobuffalo/flect v0.0.0-20180907193754-dc14d8acaf9f/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA= -github.com/gobuffalo/flect v0.0.0-20181002182613-4571df4b1daf/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA= -github.com/gobuffalo/flect v0.0.0-20181007231023-ae7ed6bfe683/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA= -github.com/gobuffalo/flect v0.0.0-20181018182602-fd24a256709f/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA= -github.com/gobuffalo/flect v0.0.0-20181019110701-3d6f0b585514/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA= -github.com/gobuffalo/flect v0.0.0-20181024204909-8f6be1a8c6c2/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA= -github.com/gobuffalo/flect v0.0.0-20181104133451-1f6e9779237a/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA= -github.com/gobuffalo/flect v0.0.0-20181114183036-47375f6d8328/go.mod h1:0HvNbHdfh+WOvDSIASqJOSxTOWSxCCUF++k/Y53v9rI= -github.com/gobuffalo/flect v0.0.0-20181210151238-24a2b68e0316/go.mod h1:en58vff74S9b99Eg42Dr+/9yPu437QjlNsO/hBYPuOk= -github.com/gobuffalo/flect v0.0.0-20190104192022-4af577e09bf2/go.mod h1:en58vff74S9b99Eg42Dr+/9yPu437QjlNsO/hBYPuOk= -github.com/gobuffalo/flect v0.0.0-20190117212819-a62e61d96794 h1:HZOs07hF3AmoaUj4HJQHV5RqfOuGnPZI7aFcireIrww= -github.com/gobuffalo/flect v0.0.0-20190117212819-a62e61d96794/go.mod h1:397QT6v05LkZkn07oJXXT6y9FCfwC8Pug0WA2/2mE9k= -github.com/gobuffalo/genny v0.0.0-20180924032338-7af3a40f2252/go.mod h1:tUTQOogrr7tAQnhajMSH6rv1BVev34H2sa1xNHMy94g= -github.com/gobuffalo/genny v0.0.0-20181003150629-3786a0744c5d/go.mod h1:WAd8HmjMVrnkAZbmfgH5dLBUchsZfqzp/WS5sQz+uTM= -github.com/gobuffalo/genny v0.0.0-20181005145118-318a41a134cc/go.mod h1:WAd8HmjMVrnkAZbmfgH5dLBUchsZfqzp/WS5sQz+uTM= -github.com/gobuffalo/genny v0.0.0-20181007153042-b8de7d566757/go.mod h1:+oG5Ljrw04czAHbPXREwaFojJbpUvcIy4DiOnbEJFTA= -github.com/gobuffalo/genny v0.0.0-20181012161047-33e5f43d83a6/go.mod h1:+oG5Ljrw04czAHbPXREwaFojJbpUvcIy4DiOnbEJFTA= -github.com/gobuffalo/genny v0.0.0-20181017160347-90a774534246/go.mod h1:+oG5Ljrw04czAHbPXREwaFojJbpUvcIy4DiOnbEJFTA= -github.com/gobuffalo/genny v0.0.0-20181024195656-51392254bf53/go.mod h1:o9GEH5gn5sCKLVB5rHFC4tq40rQ3VRUzmx6WwmaqISE= -github.com/gobuffalo/genny v0.0.0-20181025145300-af3f81d526b8/go.mod h1:uZ1fFYvdcP8mu0B/Ynarf6dsGvp7QFIpk/QACUuFUVI= -github.com/gobuffalo/genny v0.0.0-20181027191429-94d6cfb5c7fc/go.mod h1:x7SkrQQBx204Y+O9EwRXeszLJDTaWN0GnEasxgLrQTA= -github.com/gobuffalo/genny v0.0.0-20181027195209-3887b7171c4f/go.mod h1:JbKx8HSWICu5zyqWOa0dVV1pbbXOHusrSzQUprW6g+w= -github.com/gobuffalo/genny v0.0.0-20181106193839-7dcb0924caf1/go.mod h1:x61yHxvbDCgQ/7cOAbJCacZQuHgB0KMSzoYcw5debjU= -github.com/gobuffalo/genny v0.0.0-20181107223128-f18346459dbe/go.mod h1:utQD3aKKEsdb03oR+Vi/6ztQb1j7pO10N3OBoowRcSU= -github.com/gobuffalo/genny v0.0.0-20181114215459-0a4decd77f5d/go.mod h1:kN2KZ8VgXF9VIIOj/GM0Eo7YK+un4Q3tTreKOf0q1ng= -github.com/gobuffalo/genny v0.0.0-20181119162812-e8ff4adce8bb/go.mod h1:BA9htSe4bZwBDJLe8CUkoqkypq3hn3+CkoHqVOW718E= -github.com/gobuffalo/genny v0.0.0-20181127225641-2d959acc795b/go.mod h1:l54xLXNkteX/PdZ+HlgPk1qtcrgeOr3XUBBPDbH+7CQ= -github.com/gobuffalo/genny v0.0.0-20181128191930-77e34f71ba2a/go.mod h1:FW/D9p7cEEOqxYA71/hnrkOWm62JZ5ZNxcNIVJEaWBU= -github.com/gobuffalo/genny v0.0.0-20181203165245-fda8bcce96b1/go.mod h1:wpNSANu9UErftfiaAlz1pDZclrYzLtO5lALifODyjuM= -github.com/gobuffalo/genny v0.0.0-20181203201232-849d2c9534ea/go.mod h1:wpNSANu9UErftfiaAlz1pDZclrYzLtO5lALifODyjuM= -github.com/gobuffalo/genny v0.0.0-20181206121324-d6fb8a0dbe36/go.mod h1:wpNSANu9UErftfiaAlz1pDZclrYzLtO5lALifODyjuM= -github.com/gobuffalo/genny v0.0.0-20181207164119-84844398a37d/go.mod h1:y0ysCHGGQf2T3vOhCrGHheYN54Y/REj0ayd0Suf4C/8= -github.com/gobuffalo/genny v0.0.0-20181211165820-e26c8466f14d/go.mod h1:sHnK+ZSU4e2feXP3PA29ouij6PUEiN+RCwECjCTB3yM= -github.com/gobuffalo/genny v0.0.0-20190104222617-a71664fc38e7/go.mod h1:QPsQ1FnhEsiU8f+O0qKWXz2RE4TiDqLVChWkBuh1WaY= -github.com/gobuffalo/genny v0.0.0-20190112155932-f31a84fcacf5/go.mod h1:CIaHCrSIuJ4il6ka3Hub4DR4adDrGoXGEEt2FbBxoIo= -github.com/gobuffalo/github_flavored_markdown v1.0.4/go.mod h1:uRowCdK+q8d/RF0Kt3/DSalaIXbb0De/dmTqMQdkQ4I= -github.com/gobuffalo/github_flavored_markdown v1.0.5/go.mod h1:U0643QShPF+OF2tJvYNiYDLDGDuQmJZXsf/bHOJPsMY= -github.com/gobuffalo/github_flavored_markdown v1.0.7/go.mod h1:w93Pd9Lz6LvyQXEG6DktTPHkOtCbr+arAD5mkwMzXLI= -github.com/gobuffalo/httptest v1.0.2/go.mod h1:7T1IbSrg60ankme0aDLVnEY0h056g9M1/ZvpVThtB7E= -github.com/gobuffalo/licenser v0.0.0-20180924033006-eae28e638a42/go.mod h1:Ubo90Np8gpsSZqNScZZkVXXAo5DGhTb+WYFIjlnog8w= -github.com/gobuffalo/licenser v0.0.0-20181025145548-437d89de4f75/go.mod h1:x3lEpYxkRG/XtGCUNkio+6RZ/dlOvLzTI9M1auIwFcw= -github.com/gobuffalo/licenser v0.0.0-20181027200154-58051a75da95/go.mod h1:BzhaaxGd1tq1+OLKObzgdCV9kqVhbTulxOpYbvMQWS0= -github.com/gobuffalo/licenser v0.0.0-20181109171355-91a2a7aac9a7/go.mod h1:m+Ygox92pi9bdg+gVaycvqE8RVSjZp7mWw75+K5NPHk= -github.com/gobuffalo/licenser v0.0.0-20181128165715-cc7305f8abed/go.mod h1:oU9F9UCE+AzI/MueCKZamsezGOOHfSirltllOVeRTAE= -github.com/gobuffalo/licenser v0.0.0-20181203160806-fe900bbede07/go.mod h1:ph6VDNvOzt1CdfaWC+9XwcBnlSTBz2j49PBwum6RFaU= -github.com/gobuffalo/licenser v0.0.0-20181211173111-f8a311c51159/go.mod h1:ve/Ue99DRuvnTaLq2zKa6F4KtHiYf7W046tDjuGYPfM= -github.com/gobuffalo/logger v0.0.0-20181022175615-46cfb361fc27/go.mod h1:8sQkgyhWipz1mIctHF4jTxmJh1Vxhp7mP8IqbljgJZo= -github.com/gobuffalo/logger v0.0.0-20181027144941-73d08d2bb969/go.mod h1:7uGg2duHKpWnN4+YmyKBdLXfhopkAdVM6H3nKbyFbz8= -github.com/gobuffalo/logger v0.0.0-20181027193913-9cf4dd0efe46/go.mod h1:7uGg2duHKpWnN4+YmyKBdLXfhopkAdVM6H3nKbyFbz8= -github.com/gobuffalo/logger v0.0.0-20181109185836-3feeab578c17/go.mod h1:oNErH0xLe+utO+OW8ptXMSA5DkiSEDW1u3zGIt8F9Ew= -github.com/gobuffalo/logger v0.0.0-20181117211126-8e9b89b7c264/go.mod h1:5etB91IE0uBlw9k756fVKZJdS+7M7ejVhmpXXiSFj0I= -github.com/gobuffalo/logger v0.0.0-20181127160119-5b956e21995c/go.mod h1:+HxKANrR9VGw9yN3aOAppJKvhO05ctDi63w4mDnKv2U= -github.com/gobuffalo/makr v1.1.5/go.mod h1:Y+o0btAH1kYAMDJW/TX3+oAXEu0bmSLLoC9mIFxtzOw= -github.com/gobuffalo/mapi v1.0.0/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= -github.com/gobuffalo/mapi v1.0.1/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= -github.com/gobuffalo/meta v0.0.0-20181018155829-df62557efcd3/go.mod h1:XTTOhwMNryif3x9LkTTBO/Llrveezd71u3quLd0u7CM= -github.com/gobuffalo/meta v0.0.0-20181018192820-8c6cef77dab3/go.mod h1:E94EPzx9NERGCY69UWlcj6Hipf2uK/vnfrF4QD0plVE= -github.com/gobuffalo/meta v0.0.0-20181025145500-3a985a084b0a/go.mod h1:YDAKBud2FP7NZdruCSlmTmDOZbVSa6bpK7LJ/A/nlKg= -github.com/gobuffalo/meta v0.0.0-20181114191255-b130ebedd2f7/go.mod h1:K6cRZ29ozr4Btvsqkjvg5nDFTLOgTqf03KA70Ks0ypE= -github.com/gobuffalo/meta v0.0.0-20181127070345-0d7e59dd540b/go.mod h1:RLO7tMvE0IAKAM8wny1aN12pvEKn7EtkBLkUZR00Qf8= -github.com/gobuffalo/mw-basicauth v1.0.3/go.mod h1:dg7+ilMZOKnQFHDefUzUHufNyTswVUviCBgF244C1+0= -github.com/gobuffalo/mw-contenttype v0.0.0-20180802152300-74f5a47f4d56/go.mod h1:7EvcmzBbeCvFtQm5GqF9ys6QnCxz2UM1x0moiWLq1No= -github.com/gobuffalo/mw-csrf v0.0.0-20180802151833-446ff26e108b/go.mod h1:sbGtb8DmDZuDUQoxjr8hG1ZbLtZboD9xsn6p77ppcHo= -github.com/gobuffalo/mw-forcessl v0.0.0-20180802152810-73921ae7a130/go.mod h1:JvNHRj7bYNAMUr/5XMkZaDcw3jZhUZpsmzhd//FFWmQ= -github.com/gobuffalo/mw-i18n v0.0.0-20180802152014-e3060b7e13d6/go.mod h1:91AQfukc52A6hdfIfkxzyr+kpVYDodgAeT5cjX1UIj4= -github.com/gobuffalo/mw-paramlogger v0.0.0-20181005191442-d6ee392ec72e/go.mod h1:6OJr6VwSzgJMqWMj7TYmRUqzNe2LXu/W1rRW4MAz/ME= -github.com/gobuffalo/mw-tokenauth v0.0.0-20181001105134-8545f626c189/go.mod h1:UqBF00IfKvd39ni5+yI5MLMjAf4gX7cDKN/26zDOD6c= -github.com/gobuffalo/packd v0.0.0-20181027182251-01ad393492c8/go.mod h1:SmdBdhj6uhOsg1Ui4SFAyrhuc7U4VCildosO5IDJ3lc= -github.com/gobuffalo/packd v0.0.0-20181027190505-aafc0d02c411/go.mod h1:SmdBdhj6uhOsg1Ui4SFAyrhuc7U4VCildosO5IDJ3lc= -github.com/gobuffalo/packd v0.0.0-20181027194105-7ae579e6d213/go.mod h1:SmdBdhj6uhOsg1Ui4SFAyrhuc7U4VCildosO5IDJ3lc= -github.com/gobuffalo/packd v0.0.0-20181031195726-c82734870264/go.mod h1:Yf2toFaISlyQrr5TfO3h6DB9pl9mZRmyvBGQb/aQ/pI= -github.com/gobuffalo/packd v0.0.0-20181104210303-d376b15f8e96/go.mod h1:Yf2toFaISlyQrr5TfO3h6DB9pl9mZRmyvBGQb/aQ/pI= -github.com/gobuffalo/packd v0.0.0-20181111195323-b2e760a5f0ff/go.mod h1:Yf2toFaISlyQrr5TfO3h6DB9pl9mZRmyvBGQb/aQ/pI= -github.com/gobuffalo/packd v0.0.0-20181114190715-f25c5d2471d7/go.mod h1:Yf2toFaISlyQrr5TfO3h6DB9pl9mZRmyvBGQb/aQ/pI= -github.com/gobuffalo/packd v0.0.0-20181124090624-311c6248e5fb/go.mod h1:Foenia9ZvITEvG05ab6XpiD5EfBHPL8A6hush8SJ0o8= -github.com/gobuffalo/packd v0.0.0-20181207120301-c49825f8f6f4/go.mod h1:LYc0TGKFBBFTRC9dg2pcRcMqGCTMD7T2BIMP7OBuQAA= -github.com/gobuffalo/packd v0.0.0-20181212173646-eca3b8fd6687/go.mod h1:LYc0TGKFBBFTRC9dg2pcRcMqGCTMD7T2BIMP7OBuQAA= -github.com/gobuffalo/packr v1.13.7/go.mod h1:KkinLIn/n6+3tVXMwg6KkNvWwVsrRAz4ph+jgpk3Z24= -github.com/gobuffalo/packr v1.15.0/go.mod h1:t5gXzEhIviQwVlNx/+3SfS07GS+cZ2hn76WLzPp6MGI= -github.com/gobuffalo/packr v1.15.1/go.mod h1:IeqicJ7jm8182yrVmNbM6PR4g79SjN9tZLH8KduZZwE= -github.com/gobuffalo/packr v1.19.0/go.mod h1:MstrNkfCQhd5o+Ct4IJ0skWlxN8emOq8DsoT1G98VIU= -github.com/gobuffalo/packr v1.20.0/go.mod h1:JDytk1t2gP+my1ig7iI4NcVaXr886+N0ecUga6884zw= -github.com/gobuffalo/packr v1.21.0/go.mod h1:H00jGfj1qFKxscFJSw8wcL4hpQtPe1PfU2wa6sg/SR0= -github.com/gobuffalo/packr/v2 v2.0.0-rc.8/go.mod h1:y60QCdzwuMwO2R49fdQhsjCPv7tLQFR0ayzxxla9zes= -github.com/gobuffalo/packr/v2 v2.0.0-rc.9/go.mod h1:fQqADRfZpEsgkc7c/K7aMew3n4aF1Kji7+lIZeR98Fc= -github.com/gobuffalo/packr/v2 v2.0.0-rc.10/go.mod h1:4CWWn4I5T3v4c1OsJ55HbHlUEKNWMITG5iIkdr4Px4w= -github.com/gobuffalo/packr/v2 v2.0.0-rc.11/go.mod h1:JoieH/3h3U4UmatmV93QmqyPUdf4wVM9HELaHEu+3fk= -github.com/gobuffalo/packr/v2 v2.0.0-rc.12/go.mod h1:FV1zZTsVFi1DSCboO36Xgs4pzCZBjB/tDV9Cz/lSaR8= -github.com/gobuffalo/packr/v2 v2.0.0-rc.13/go.mod h1:2Mp7GhBFMdJlOK8vGfl7SYtfMP3+5roE39ejlfjw0rA= -github.com/gobuffalo/packr/v2 v2.0.0-rc.14/go.mod h1:06otbrNvDKO1eNQ3b8hst+1010UooI2MFg+B2Ze4MV8= -github.com/gobuffalo/plush v3.7.16+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= -github.com/gobuffalo/plush v3.7.20+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= -github.com/gobuffalo/plush v3.7.21+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= -github.com/gobuffalo/plush v3.7.22+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= -github.com/gobuffalo/plush v3.7.23+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= -github.com/gobuffalo/plush v3.7.30+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= -github.com/gobuffalo/plush v3.7.31+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= -github.com/gobuffalo/plush v3.7.32+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= -github.com/gobuffalo/plushgen v0.0.0-20181128164830-d29dcb966cb2/go.mod h1:r9QwptTFnuvSaSRjpSp4S2/4e2D3tJhARYbvEBcKSb4= -github.com/gobuffalo/plushgen v0.0.0-20181203163832-9fc4964505c2/go.mod h1:opEdT33AA2HdrIwK1aibqnTJDVVKXC02Bar/GT1YRVs= -github.com/gobuffalo/plushgen v0.0.0-20181207152837-eedb135bd51b/go.mod h1:Lcw7HQbEVm09sAQrCLzIxuhFbB3nAgp4c55E+UlynR0= -github.com/gobuffalo/plushgen v0.0.0-20190104222512-177cd2b872b3/go.mod h1:tYxCozi8X62bpZyKXYHw1ncx2ZtT2nFvG42kuLwYjoc= -github.com/gobuffalo/pop v4.8.2+incompatible/go.mod h1:DwBz3SD5SsHpTZiTubcsFWcVDpJWGsxjVjMPnkiThWg= -github.com/gobuffalo/pop v4.8.3+incompatible/go.mod h1:DwBz3SD5SsHpTZiTubcsFWcVDpJWGsxjVjMPnkiThWg= -github.com/gobuffalo/pop v4.8.4+incompatible/go.mod h1:DwBz3SD5SsHpTZiTubcsFWcVDpJWGsxjVjMPnkiThWg= -github.com/gobuffalo/release v1.0.35/go.mod h1:VtHFAKs61vO3wboCec5xr9JPTjYyWYcvaM3lclkc4x4= -github.com/gobuffalo/release v1.0.38/go.mod h1:VtHFAKs61vO3wboCec5xr9JPTjYyWYcvaM3lclkc4x4= -github.com/gobuffalo/release v1.0.42/go.mod h1:RPs7EtafH4oylgetOJpGP0yCZZUiO4vqHfTHJjSdpug= -github.com/gobuffalo/release v1.0.52/go.mod h1:RPs7EtafH4oylgetOJpGP0yCZZUiO4vqHfTHJjSdpug= -github.com/gobuffalo/release v1.0.53/go.mod h1:FdF257nd8rqhNaqtDWFGhxdJ/Ig4J7VcS3KL7n/a+aA= -github.com/gobuffalo/release v1.0.54/go.mod h1:Pe5/RxRa/BE8whDpGfRqSI7D1a0evGK1T4JDm339tJc= -github.com/gobuffalo/release v1.0.61/go.mod h1:mfIO38ujUNVDlBziIYqXquYfBF+8FDHUjKZgYC1Hj24= -github.com/gobuffalo/release v1.0.72/go.mod h1:NP5NXgg/IX3M5XmHmWR99D687/3Dt9qZtTK/Lbwc1hU= -github.com/gobuffalo/release v1.1.1/go.mod h1:Sluak1Xd6kcp6snkluR1jeXAogdJZpFFRzTYRs/2uwg= -github.com/gobuffalo/release v1.1.3/go.mod h1:CuXc5/m+4zuq8idoDt1l4va0AXAn/OSs08uHOfMVr8E= -github.com/gobuffalo/release v1.1.6/go.mod h1:18naWa3kBsqO0cItXZNJuefCKOENpbbUIqRL1g+p6z0= -github.com/gobuffalo/shoulders v1.0.1/go.mod h1:V33CcVmaQ4gRUmHKwq1fiTXuf8Gp/qjQBUL5tHPmvbA= -github.com/gobuffalo/syncx v0.0.0-20181120191700-98333ab04150/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw= -github.com/gobuffalo/syncx v0.0.0-20181120194010-558ac7de985f/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw= -github.com/gobuffalo/tags v2.0.11+incompatible/go.mod h1:9XmhOkyaB7UzvuY4UoZO4s67q8/xRMVJEaakauVQYeY= -github.com/gobuffalo/tags v2.0.14+incompatible/go.mod h1:9XmhOkyaB7UzvuY4UoZO4s67q8/xRMVJEaakauVQYeY= -github.com/gobuffalo/tags v2.0.15+incompatible/go.mod h1:9XmhOkyaB7UzvuY4UoZO4s67q8/xRMVJEaakauVQYeY= -github.com/gobuffalo/uuid v2.0.3+incompatible/go.mod h1:ErhIzkRhm0FtRuiE/PeORqcw4cVi1RtSpnwYrxuvkfE= -github.com/gobuffalo/uuid v2.0.4+incompatible/go.mod h1:ErhIzkRhm0FtRuiE/PeORqcw4cVi1RtSpnwYrxuvkfE= -github.com/gobuffalo/uuid v2.0.5+incompatible/go.mod h1:ErhIzkRhm0FtRuiE/PeORqcw4cVi1RtSpnwYrxuvkfE= -github.com/gobuffalo/validate v2.0.3+incompatible/go.mod h1:N+EtDe0J8252BgfzQUChBgfd6L93m9weay53EWFVsMM= -github.com/gobuffalo/x v0.0.0-20181003152136-452098b06085/go.mod h1:WevpGD+5YOreDJznWevcn8NTmQEW5STSBgIkpkjzqXc= -github.com/gobuffalo/x v0.0.0-20181007152206-913e47c59ca7/go.mod h1:9rDPXaB3kXdKWzMc4odGQQdG2e2DIEmANy5aSJ9yesY= -github.com/gofrs/uuid v3.1.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= -github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/pat v0.0.0-20180118222023-199c85a7f6d1/go.mod h1:YeAe0gNeiNT5hoiZRI4yiOky6jVdNvfO2N6Kav/HmxY= -github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= -github.com/gorilla/sessions v1.1.2/go.mod h1:8KCfur6+4Mqcc6S0FEfKuN15Vl5MgXW92AE8ovaJD0w= -github.com/gorilla/sessions v1.1.3/go.mod h1:8KCfur6+4Mqcc6S0FEfKuN15Vl5MgXW92AE8ovaJD0w= -github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/jackc/fake v0.0.0-20150926172116-812a484cc733/go.mod h1:WrMFNQdiFJ80sQsxDoMokWK1W5TQtxBFNpzWTD84ibQ= -github.com/jackc/pgx v3.2.0+incompatible/go.mod h1:0ZGrqGqkRlliWnWB4zKnWtjbSWbGkVEFm4TeybAXq+I= -github.com/jmoiron/sqlx v0.0.0-20180614180643-0dae4fefe7c0/go.mod h1:IiEW3SEiiErVyFdH8NTuWjSifiEQKUoyK3LNqr2kCHU= -github.com/joho/godotenv v1.2.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= -github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= -github.com/karrick/godirwalk v1.7.5/go.mod h1:2c9FRhkDxdIbgkOnCEvnSWs71Bhugbl46shStcFDJ34= -github.com/karrick/godirwalk v1.7.7/go.mod h1:2c9FRhkDxdIbgkOnCEvnSWs71Bhugbl46shStcFDJ34= -github.com/karrick/godirwalk v1.7.8/go.mod h1:2c9FRhkDxdIbgkOnCEvnSWs71Bhugbl46shStcFDJ34= -github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= -github.com/konsorten/go-windows-terminal-sequences v0.0.0-20180402223658-b729f2633dfe/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/pty v1.1.3/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/markbates/deplist v1.0.4/go.mod h1:gRRbPbbuA8TmMiRvaOzUlRfzfjeCCBqX2A6arxN01MM= -github.com/markbates/deplist v1.0.5/go.mod h1:gRRbPbbuA8TmMiRvaOzUlRfzfjeCCBqX2A6arxN01MM= -github.com/markbates/going v1.0.2/go.mod h1:UWCk3zm0UKefHZ7l8BNqi26UyiEMniznk8naLdTcy6c= -github.com/markbates/grift v1.0.4/go.mod h1:wbmtW74veyx+cgfwFhlnnMWqhoz55rnHR47oMXzsyVs= -github.com/markbates/hmax v1.0.0/go.mod h1:cOkR9dktiESxIMu+65oc/r/bdY4bE8zZw3OLhLx0X2c= -github.com/markbates/inflect v1.0.0/go.mod h1:oTeZL2KHA7CUX6X+fovmK9OvIOFuqu0TwdQrZjLTh88= -github.com/markbates/inflect v1.0.1/go.mod h1:uv3UVNBe5qBIfCm8O8Q+DW+S1EopeyINj+Ikhc7rnCk= -github.com/markbates/inflect v1.0.3/go.mod h1:1fR9+pO2KHEO9ZRtto13gDwwZaAKstQzferVeWqbgNs= -github.com/markbates/inflect v1.0.4/go.mod h1:1fR9+pO2KHEO9ZRtto13gDwwZaAKstQzferVeWqbgNs= -github.com/markbates/oncer v0.0.0-20180924031910-e862a676800b/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= -github.com/markbates/oncer v0.0.0-20180924034138-723ad0170a46/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= -github.com/markbates/oncer v0.0.0-20181014194634-05fccaae8fc4/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= -github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= -github.com/markbates/refresh v1.4.10/go.mod h1:NDPHvotuZmTmesXxr95C9bjlw1/0frJwtME2dzcVKhc= -github.com/markbates/safe v1.0.0/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= -github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= -github.com/markbates/sigtx v1.0.0/go.mod h1:QF1Hv6Ic6Ca6W+T+DL0Y/ypborFKyvUY9HmuCD4VeTc= -github.com/markbates/willie v1.0.9/go.mod h1:fsrFVWl91+gXpx/6dv715j7i11fYPfZ9ZGfH0DQzY7w= -github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= -github.com/microcosm-cc/bluemonday v1.0.1/go.mod h1:hsXNsILzKxV+sX77C5b8FSuKF00vh2OMYv+xgHpAMF4= -github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc= -github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/mapstructure v1.0.0/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/monoculum/formam v0.0.0-20180901015400-4e68be1d79ba/go.mod h1:RKgILGEJq24YyJ2ban8EO0RUVSJlF1pGsEvoLEACr/Q= -github.com/nicksnyder/go-i18n v1.10.0/go.mod h1:HrK7VCrbOvQoUAQ7Vpy7i87N7JZZZ7R2xBGjv0j365Q= -github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= -github.com/onsi/gomega v1.4.2/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/rogpeppe/go-internal v1.0.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.1.0 h1:g0fH8RicVgNl+zVZDCDfbdWxAWoAEJyI7I3TZYXFiig= -github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= -github.com/serenize/snaker v0.0.0-20171204205717-a683aaf2d516/go.mod h1:Yow6lPLSAXx2ifx470yD/nUe22Dv5vBvxK/UK9UUTVs= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= -github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= -github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= -github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ= -github.com/shurcooL/highlight_diff v0.0.0-20170515013008-09bb4053de1b/go.mod h1:ZpfEhSmds4ytuByIcDnOLkTHGUI6KNqRNPDLHDk+mUU= -github.com/shurcooL/highlight_go v0.0.0-20170515013102-78fb10f4a5f8/go.mod h1:UDKB5a1T23gOMUJrI+uSuH0VRDStOiUVSjBTRDVBVag= -github.com/shurcooL/octicon v0.0.0-20180602230221-c42b0e3b24d9/go.mod h1:eWdoE5JD4R5UVWDucdOPg1g2fqQRq78IQa9zlOV1vpQ= -github.com/shurcooL/sanitized_anchor_name v0.0.0-20170918181015-86672fcb3f95/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= -github.com/sirupsen/logrus v1.1.0/go.mod h1:zrgwTnHtNr00buQ1vSptGe8m1f/BbgsPukg8qsT7A+A= -github.com/sirupsen/logrus v1.1.1/go.mod h1:zrgwTnHtNr00buQ1vSptGe8m1f/BbgsPukg8qsT7A+A= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.3.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d/go.mod h1:UdhH50NIW0fCiwBSr0co2m7BnFLdv4fQTgdqdJTHFeE= -github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e/go.mod h1:HuIsMU8RRBOtsCgI77wP899iHVBQpCmg4ErYMZB+2IA= -github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.2.0/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= -github.com/spf13/cast v1.2.0/go.mod h1:r2rcYCSwa1IExKTDiTfzaxqT2FNHs8hODu4LnUfgKEg= -github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/pflag v1.0.2/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/viper v1.2.1/go.mod h1:P4AexN0a+C9tGAnUFNwDMYYZv3pjFuvmeiMyKRaNVlI= -github.com/spf13/viper v1.3.1/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/unrolled/secure v0.0.0-20180918153822-f340ee86eb8b/go.mod h1:mnPT77IAdsi/kV7+Es7y+pXALeV3h7G6dQF6mNYjcLA= -github.com/unrolled/secure v0.0.0-20181005190816-ff9db2ff917f/go.mod h1:mnPT77IAdsi/kV7+Es7y+pXALeV3h7G6dQF6mNYjcLA= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20180910181607-0e37d006457b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181001203147-e3636079e1a4/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181009213950-7c1a557ab941/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181015023909-0c41d7ab0a0e/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181024171144-74cb1d3d52f4/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181025113841-85e1b3f9139a/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181025213731-e84da0312774/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181106171534-e4dc69e5b2fd/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181112202954-3d3f9f413869/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181127143415-eb0de9b17e85/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190102171810-8d7daa0c54b3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190103213133-ff983b9c42bc/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180816102801-aaf60122140d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180921000356-2f5d2388922f/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180926154720-4dfa2610cdf3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181011144130-49bb7cea24b1/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181017193950-04a2e542c03f/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181102091132-c10e9556a7bc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181106065722-10aee1819953/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181207154023-610586996380/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180816055513-1c9583448a9c/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180906133057-8cf3aee42992/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180921163948-d47a0f339242/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180927150500-dad3d9fb7b6e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181005133103-4497e2df6f9e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181011152604-fa43e7bc11ba/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181022134430-8a28ead16f52/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181024145615-5cd93ef61a7c/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181025063200-d989b31c8746/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181026064943-731415f00dce/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181106135930-3a76605856fd/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181206074257-70b957f3b65e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190102155601-82a175fd1598/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181003024731-2f84ea8ef872/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181006002542-f60d9635b16a/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181008205924-a2b3f7f249e9/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181013182035-5e66757b835f/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181017214349-06f26fdaaa28/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181024171208-a2dc47679d30/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181026183834-f60e5f99f081/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181105230042-78dc5bac0cac/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181107215632-34b416bd17b3/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181114190951-94339b83286c/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181119130350-139d099f6620/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181127195227-b4e97c0ed882/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181127232545-e782529d0ddd/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181203210056-e5f3ab76ea4b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181205224935-3576414c54a4/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181206194817-bcd4e47d0288/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181207183836-8bc39b988060/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181212172921-837e80568c09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190102213336-ca9055ed7d04/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190104182027-498d95493402/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190111214448-fc1d57b08d7b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= -gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc/go.mod h1:m7x9LTH6d71AHyAX77c9yqWCCa3UKHcVEj9y7hAtKDk= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= -gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df/go.mod h1:LRQQ+SO6ZHR7tOkpBDuZnXENFzX8qRjMDMyPD6BRkCw= -gopkg.in/mail.v2 v2.0.0-20180731213649-a0242b2233b4/go.mod h1:htwXN1Qh09vZJ1NVKxQqHPBaCBbzKhp5GzuJEA4VJWw= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/vendor/github.com/gobuffalo/meta/meta.go b/vendor/github.com/gobuffalo/meta/meta.go deleted file mode 100644 index 850c0b608..000000000 --- a/vendor/github.com/gobuffalo/meta/meta.go +++ /dev/null @@ -1,115 +0,0 @@ -package meta - -import ( - "bytes" - "fmt" - "io/ioutil" - "os" - "path/filepath" - "runtime" - "strings" - - "github.com/BurntSushi/toml" - "github.com/gobuffalo/envy" - fname "github.com/gobuffalo/flect/name" -) - -func Named(name string, root string) App { - pwd, _ := os.Getwd() - root = strings.TrimPrefix(root, "/private") - if root == "." { - root = pwd - } - - // Handle symlinks - var oldPwd = pwd - pwd = ResolveSymlinks(pwd) - os.Chdir(pwd) - if runtime.GOOS != "windows" { - // On Non-Windows OS, os.Getwd() uses PWD env var as a preferred - // way to get the working dir. - os.Setenv("PWD", pwd) - } - defer func() { - // Restore PWD - os.Chdir(oldPwd) - if runtime.GOOS != "windows" { - os.Setenv("PWD", oldPwd) - } - }() - - // Gather meta data - if len(name) == 0 || name == "." { - name = filepath.Base(root) - } - pp := resolvePackageName(name, pwd) - - app := App{ - Pwd: pwd, - Root: root, - GoPath: envy.GoPath(), - Name: fname.New(name), - WithModules: envy.Mods(), - AsAPI: false, - AsWeb: true, - } - app.PackageRoot(pp) - - app.Bin = filepath.Join("bin", app.Name.String()) - - if runtime.GOOS == "windows" { - app.Bin += ".exe" - } - - cf, err := os.Open(filepath.Join(app.Root, "config", "buffalo-app.toml")) - if err != nil { - return oldSchool(app) - } - defer cf.Close() - - if _, err := toml.DecodeReader(cf, &app); err != nil { - fmt.Println(err) - } - - return app -} - -// New App based on the details found at the provided root path -func New(root string) App { - return Named(filepath.Base(root), root) -} - -func oldSchool(app App) App { - root := app.Root - db := filepath.Join(root, "database.yml") - if _, err := os.Stat(db); err == nil { - app.WithPop = true - if b, err := ioutil.ReadFile(db); err == nil { - app.WithSQLite = bytes.Contains(bytes.ToLower(b), []byte("sqlite")) - } - } - if _, err := os.Stat(filepath.Join(root, "Gopkg.toml")); err == nil { - app.WithDep = true - } - if _, err := os.Stat(filepath.Join(root, "package.json")); err == nil { - app.WithNodeJs = true - } - if _, err := os.Stat(filepath.Join(root, "webpack.config.js")); err == nil { - app.WithWebpack = true - } - if _, err := os.Stat(filepath.Join(root, "yarn.lock")); err == nil { - app.WithYarn = true - } - if _, err := os.Stat(filepath.Join(root, "Dockerfile")); err == nil { - app.WithDocker = true - } - if _, err := os.Stat(filepath.Join(root, "grifts")); err == nil { - app.WithGrifts = true - } - if _, err := os.Stat(filepath.Join(root, ".git")); err == nil { - app.VCS = "git" - } else if _, err := os.Stat(filepath.Join(root, ".bzr")); err == nil { - app.VCS = "bzr" - } - return app -} diff --git a/vendor/github.com/gobuffalo/meta/tags.go b/vendor/github.com/gobuffalo/meta/tags.go deleted file mode 100644 index 82e89e413..000000000 --- a/vendor/github.com/gobuffalo/meta/tags.go +++ /dev/null @@ -1,39 +0,0 @@ -package meta - -import ( - "sort" - "strings" -) - -// BuildTags are tags used for building apps -type BuildTags []string - -// String returns the tags in the form of: -// "foo bar baz" (with the quotes!) -func (t BuildTags) String() string { - return strings.Join(t, " ") -} - -// BuildTags combines the passed in env, and any additional tags, -// with tags that Buffalo decides the build process requires. -// An example would be adding the "sqlite" build tag if using -// SQLite3. -func (a App) BuildTags(env string, tags ...string) BuildTags { - m := map[string]string{} - m[env] = env - for _, t := range tags { - m[t] = t - } - if a.WithSQLite { - m["sqlite"] = "sqlite" - } - var tt []string - for k := range m { - k = strings.TrimSpace(k) - if len(k) != 0 { - tt = append(tt, k) - } - } - sort.Strings(tt) - return BuildTags(tt) -} diff --git a/vendor/github.com/gobuffalo/meta/version.go b/vendor/github.com/gobuffalo/meta/version.go deleted file mode 100644 index b6a333a35..000000000 --- a/vendor/github.com/gobuffalo/meta/version.go +++ /dev/null @@ -1,3 +0,0 @@ -package meta - -const Version = "v0.0.1" diff --git a/vendor/github.com/gobuffalo/packd/.gitignore b/vendor/github.com/gobuffalo/packd/.gitignore index 08a5f35a8..368971859 100644 --- a/vendor/github.com/gobuffalo/packd/.gitignore +++ b/vendor/github.com/gobuffalo/packd/.gitignore @@ -27,4 +27,3 @@ generated/ bin/* gin-bin .idea/ -Dockerfile.gocker diff --git a/vendor/github.com/gobuffalo/packd/.gometalinter.json b/vendor/github.com/gobuffalo/packd/.gometalinter.json deleted file mode 100644 index e4f65a36e..000000000 --- a/vendor/github.com/gobuffalo/packd/.gometalinter.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "Enable": ["vet", "golint", "goimports", "deadcode", "gotype", "ineffassign", "misspell", "nakedret", "unconvert", "megacheck", "varcheck"] -} diff --git a/vendor/github.com/gobuffalo/packd/LICENSE b/vendor/github.com/gobuffalo/packd/LICENSE index a538bcbf2..649efd437 100644 --- a/vendor/github.com/gobuffalo/packd/LICENSE +++ b/vendor/github.com/gobuffalo/packd/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2018 Mark Bates +Copyright (c) 2019 Mark Bates Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/github.com/gobuffalo/packd/Makefile b/vendor/github.com/gobuffalo/packd/Makefile index 399269e3e..0ac539f1c 100644 --- a/vendor/github.com/gobuffalo/packd/Makefile +++ b/vendor/github.com/gobuffalo/packd/Makefile @@ -1,8 +1,7 @@ -TAGS ?= "sqlite" -GO_BIN ?= go +TAGS ?= "" +GO_BIN ?= "go" -install: - packr +install: $(GO_BIN) install -tags ${TAGS} -v . make tidy @@ -14,44 +13,49 @@ else endif deps: - $(GO_BIN) get github.com/gobuffalo/release - $(GO_BIN) get github.com/gobuffalo/packr/packr $(GO_BIN) get -tags ${TAGS} -t ./... make tidy -build: - packr +build: $(GO_BIN) build -v . make tidy -test: - packr - $(GO_BIN) test -tags ${TAGS} ./... +test: + $(GO_BIN) test -cover -tags ${TAGS} ./... make tidy -ci-deps: - $(GO_BIN) get -v -tags ${TAGS} -t ./... +ci-deps: + $(GO_BIN) get -tags ${TAGS} -t ./... -ci-test: - $(GO_BIN) test -v -tags ${TAGS} -timeout=5s -race ./... +ci-test: + $(GO_BIN) test -tags ${TAGS} -race ./... lint: - gometalinter --vendor ./... --deadline=1m --skip=internal + go get github.com/golangci/golangci-lint/cmd/golangci-lint + golangci-lint run --enable-all make tidy update: +ifeq ($(GO111MODULE),on) + rm go.* + $(GO_BIN) mod init + $(GO_BIN) mod tidy +else $(GO_BIN) get -u -tags ${TAGS} - make tidy - packr +endif make test make install make tidy -release-test: +release-test: $(GO_BIN) test -tags ${TAGS} -race ./... make tidy release: + $(GO_BIN) get github.com/gobuffalo/release make tidy - release -y -f version.go + release -y -f version.go --skip-packr make tidy + + + diff --git a/vendor/github.com/gobuffalo/packd/SHOULDERS.md b/vendor/github.com/gobuffalo/packd/SHOULDERS.md new file mode 100644 index 000000000..076205ba1 --- /dev/null +++ b/vendor/github.com/gobuffalo/packd/SHOULDERS.md @@ -0,0 +1,10 @@ +# github.com/gobuffalo/packd Stands on the Shoulders of Giants + +github.com/gobuffalo/packd does not try to reinvent the wheel! Instead, it uses the already great wheels developed by the Go community and puts them all together in the best way possible. Without these giants, this project would not be possible. Please make sure to check them out and thank them for all of their hard work. + +Thank you to the following **GIANTS**: + + +* [github.com/davecgh/go-spew](https://godoc.org/github.com/davecgh/go-spew) + +* [github.com/stretchr/testify](https://godoc.org/github.com/stretchr/testify) diff --git a/vendor/github.com/gobuffalo/packd/file.go b/vendor/github.com/gobuffalo/packd/file.go index ee9f95c28..58fd86fea 100644 --- a/vendor/github.com/gobuffalo/packd/file.go +++ b/vendor/github.com/gobuffalo/packd/file.go @@ -6,8 +6,6 @@ import ( "io" "os" "time" - - "github.com/pkg/errors" ) var _ File = &virtualFile{} @@ -80,11 +78,11 @@ func (f *virtualFile) write(d interface{}) (c int, err error) { err = e } default: - err = errors.New("unknown type of argument") + err = fmt.Errorf("unknown type of argument") } if err != nil { - return c, errors.WithStack(err) + return c, err } f.info.size = int64(c) @@ -103,7 +101,7 @@ func NewFile(name string, r io.Reader) (File, error) { func NewDir(name string) (File, error) { v, err := buildFile(name, nil) if err != nil { - return v, errors.WithStack(err) + return v, err } v.info.isDir = true return v, nil @@ -124,5 +122,5 @@ func buildFile(name string, r io.Reader) (*virtualFile, error) { } else { _, err = vf.write([]byte{}) // for safety } - return vf, errors.Wrap(err, "could not make virtual file") + return vf, err } diff --git a/vendor/github.com/gobuffalo/packd/go.mod b/vendor/github.com/gobuffalo/packd/go.mod index 6732bbf59..8fe09370f 100644 --- a/vendor/github.com/gobuffalo/packd/go.mod +++ b/vendor/github.com/gobuffalo/packd/go.mod @@ -1,7 +1,5 @@ module github.com/gobuffalo/packd -require ( - github.com/gobuffalo/syncx v0.0.0-20181120194010-558ac7de985f - github.com/pkg/errors v0.8.0 - github.com/stretchr/testify v1.2.2 -) +go 1.13 + +require github.com/stretchr/testify v1.4.0 diff --git a/vendor/github.com/gobuffalo/packd/go.sum b/vendor/github.com/gobuffalo/packd/go.sum index 910029f15..8fdee5854 100644 --- a/vendor/github.com/gobuffalo/packd/go.sum +++ b/vendor/github.com/gobuffalo/packd/go.sum @@ -1,10 +1,11 @@ -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/gobuffalo/syncx v0.0.0-20181120194010-558ac7de985f h1:S5EeH1reN93KR0L6TQvkRpu9YggCYXrUqFh1iEgvdC0= -github.com/gobuffalo/syncx v0.0.0-20181120194010-558ac7de985f/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw= -github.com/pkg/errors v0.8.0 h1:WdK/asTD0HN+q6hsWO3/vpuAkAr+tw6aNJNDFFf0+qw= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/vendor/github.com/gobuffalo/envy/.gitignore b/vendor/github.com/gobuffalo/packd/internal/takeon/github.com/markbates/errx/.gitignore similarity index 100% rename from vendor/github.com/gobuffalo/envy/.gitignore rename to vendor/github.com/gobuffalo/packd/internal/takeon/github.com/markbates/errx/.gitignore diff --git a/vendor/github.com/gobuffalo/gogen/LICENSE b/vendor/github.com/gobuffalo/packd/internal/takeon/github.com/markbates/errx/LICENSE similarity index 100% rename from vendor/github.com/gobuffalo/gogen/LICENSE rename to vendor/github.com/gobuffalo/packd/internal/takeon/github.com/markbates/errx/LICENSE diff --git a/vendor/github.com/gobuffalo/gogen/Makefile b/vendor/github.com/gobuffalo/packd/internal/takeon/github.com/markbates/errx/Makefile similarity index 61% rename from vendor/github.com/gobuffalo/gogen/Makefile rename to vendor/github.com/gobuffalo/packd/internal/takeon/github.com/markbates/errx/Makefile index 2b893c0a2..0ac539f1c 100644 --- a/vendor/github.com/gobuffalo/gogen/Makefile +++ b/vendor/github.com/gobuffalo/packd/internal/takeon/github.com/markbates/errx/Makefile @@ -1,7 +1,7 @@ -TAGS ?= "sqlite" -GO_BIN ?= go +TAGS ?= "" +GO_BIN ?= "go" -install: +install: $(GO_BIN) install -tags ${TAGS} -v . make tidy @@ -13,40 +13,49 @@ else endif deps: - $(GO_BIN) get github.com/gobuffalo/release $(GO_BIN) get -tags ${TAGS} -t ./... make tidy -build: +build: $(GO_BIN) build -v . make tidy -test: - $(GO_BIN) test -tags ${TAGS} ./... +test: + $(GO_BIN) test -cover -tags ${TAGS} ./... make tidy -ci-deps: +ci-deps: $(GO_BIN) get -tags ${TAGS} -t ./... -ci-test: +ci-test: $(GO_BIN) test -tags ${TAGS} -race ./... lint: - gometalinter --vendor ./... --deadline=1m --skip=internal + go get github.com/golangci/golangci-lint/cmd/golangci-lint + golangci-lint run --enable-all make tidy update: +ifeq ($(GO111MODULE),on) + rm go.* + $(GO_BIN) mod init + $(GO_BIN) mod tidy +else $(GO_BIN) get -u -tags ${TAGS} - make tidy +endif make test make install make tidy -release-test: +release-test: $(GO_BIN) test -tags ${TAGS} -race ./... make tidy release: + $(GO_BIN) get github.com/gobuffalo/release make tidy - release -y -f version.go + release -y -f version.go --skip-packr make tidy + + + diff --git a/vendor/github.com/gobuffalo/packd/internal/takeon/github.com/markbates/errx/SHOULDERS.md b/vendor/github.com/gobuffalo/packd/internal/takeon/github.com/markbates/errx/SHOULDERS.md new file mode 100644 index 000000000..b19072e9f --- /dev/null +++ b/vendor/github.com/gobuffalo/packd/internal/takeon/github.com/markbates/errx/SHOULDERS.md @@ -0,0 +1,6 @@ +# github.com/markbates/errx Stands on the Shoulders of Giants + +github.com/markbates/errx does not try to reinvent the wheel! Instead, it uses the already great wheels developed by the Go community and puts them all together in the best way possible. Without these giants, this project would not be possible. Please make sure to check them out and thank them for all of their hard work. + +Thank you to the following **GIANTS**: + diff --git a/vendor/github.com/gobuffalo/gogen/azure-pipelines.yml b/vendor/github.com/gobuffalo/packd/internal/takeon/github.com/markbates/errx/azure-pipelines.yml similarity index 61% rename from vendor/github.com/gobuffalo/gogen/azure-pipelines.yml rename to vendor/github.com/gobuffalo/packd/internal/takeon/github.com/markbates/errx/azure-pipelines.yml index 144c4a209..417e2c579 100644 --- a/vendor/github.com/gobuffalo/gogen/azure-pipelines.yml +++ b/vendor/github.com/gobuffalo/packd/internal/takeon/github.com/markbates/errx/azure-pipelines.yml @@ -9,15 +9,19 @@ jobs: vmImage: "vs2017-win2016" strategy: matrix: - go 1.9: - go_version: "1.9" go 1.10: go_version: "1.10" go 1.11 (on): - go_version: "1.11" + go_version: "1.11.5" GO111MODULE: "on" go 1.11 (off): - go_version: "1.11" + go_version: "1.11.5" + GO111MODULE: "off" + go 1.12 (on): + go_version: "1.12" + GO111MODULE: "on" + go 1.12 (off): + go_version: "1.12" GO111MODULE: "off" steps: - template: azure-tests.yml @@ -27,15 +31,19 @@ jobs: vmImage: "macOS-10.13" strategy: matrix: - go 1.9: - go_version: "1.9" go 1.10: go_version: "1.10" go 1.11 (on): - go_version: "1.11" + go_version: "1.11.5" GO111MODULE: "on" go 1.11 (off): - go_version: "1.11" + go_version: "1.11.5" + GO111MODULE: "off" + go 1.12 (on): + go_version: "1.12" + GO111MODULE: "on" + go 1.12 (off): + go_version: "1.12" GO111MODULE: "off" steps: - template: azure-tests.yml @@ -45,15 +53,19 @@ jobs: vmImage: "ubuntu-16.04" strategy: matrix: - go 1.9: - go_version: "1.9" go 1.10: go_version: "1.10" go 1.11 (on): - go_version: "1.11" + go_version: "1.11.5" GO111MODULE: "on" go 1.11 (off): - go_version: "1.11" + go_version: "1.11.5" + GO111MODULE: "off" + go 1.12 (on): + go_version: "1.12" + GO111MODULE: "on" + go 1.12 (off): + go_version: "1.12" GO111MODULE: "off" steps: - template: azure-tests.yml diff --git a/vendor/github.com/gobuffalo/gogen/azure-tests.yml b/vendor/github.com/gobuffalo/packd/internal/takeon/github.com/markbates/errx/azure-tests.yml similarity index 100% rename from vendor/github.com/gobuffalo/gogen/azure-tests.yml rename to vendor/github.com/gobuffalo/packd/internal/takeon/github.com/markbates/errx/azure-tests.yml diff --git a/vendor/github.com/gobuffalo/packd/internal/takeon/github.com/markbates/errx/errx.go b/vendor/github.com/gobuffalo/packd/internal/takeon/github.com/markbates/errx/errx.go new file mode 100644 index 000000000..5a6f6398c --- /dev/null +++ b/vendor/github.com/gobuffalo/packd/internal/takeon/github.com/markbates/errx/errx.go @@ -0,0 +1,23 @@ +package errx + +// go2 errors +type Wrapper interface { + Unwrap() error +} + +// pkg/errors +type Causer interface { + Cause() error +} + +func Unwrap(err error) error { + switch e := err.(type) { + case Wrapper: + return e.Unwrap() + case Causer: + return e.Cause() + } + return err +} + +var Cause = Unwrap diff --git a/vendor/github.com/gobuffalo/packd/internal/takeon/github.com/markbates/errx/version.go b/vendor/github.com/gobuffalo/packd/internal/takeon/github.com/markbates/errx/version.go new file mode 100644 index 000000000..82e25a1a9 --- /dev/null +++ b/vendor/github.com/gobuffalo/packd/internal/takeon/github.com/markbates/errx/version.go @@ -0,0 +1,4 @@ +package errx + +// Version of errx +const Version = "v1.0.0" diff --git a/vendor/github.com/gobuffalo/syncx/byte_map.go b/vendor/github.com/gobuffalo/packd/map.go similarity index 85% rename from vendor/github.com/gobuffalo/syncx/byte_map.go rename to vendor/github.com/gobuffalo/packd/map.go index 39b7dae16..906b49e3e 100644 --- a/vendor/github.com/gobuffalo/syncx/byte_map.go +++ b/vendor/github.com/gobuffalo/packd/map.go @@ -1,7 +1,4 @@ -//go:generate mapgen -name "Byte" -zero "[]byte(``)" -go-type "[]byte" -pkg "" -a "[]byte(`A`)" -b "[]byte(`B`)" -c "[]byte(`C`)" -bb "[]byte(`BB`)" -destination "syncx" -// Code generated by github.com/gobuffalo/mapgen. DO NOT EDIT. - -package syncx +package packd import ( "sort" diff --git a/vendor/github.com/gobuffalo/packd/memory_box.go b/vendor/github.com/gobuffalo/packd/memory_box.go index ccc4590ad..7f3137cb4 100644 --- a/vendor/github.com/gobuffalo/packd/memory_box.go +++ b/vendor/github.com/gobuffalo/packd/memory_box.go @@ -8,8 +8,7 @@ import ( "sort" "strings" - "github.com/gobuffalo/syncx" - "github.com/pkg/errors" + "github.com/gobuffalo/packd/internal/takeon/github.com/markbates/errx" ) var _ Addable = NewMemoryBox() @@ -22,7 +21,7 @@ var _ Box = NewMemoryBox() // MemoryBox is a thread-safe, in-memory, implementation of the Box interface. type MemoryBox struct { - files *syncx.ByteMap + files *ByteMap } func (m *MemoryBox) Has(path string) bool { @@ -119,7 +118,7 @@ func (m *MemoryBox) Walk(wf WalkFunc) error { err = wf(path, f) if err != nil { - if errors.Cause(err) == filepath.SkipDir { + if errx.Unwrap(err) == filepath.SkipDir { err = nil return true } @@ -129,7 +128,7 @@ func (m *MemoryBox) Walk(wf WalkFunc) error { return true }) - if errors.Cause(err) == filepath.SkipDir { + if errx.Unwrap(err) == filepath.SkipDir { return nil } return err @@ -152,6 +151,6 @@ func (m *MemoryBox) Remove(path string) { // NewMemoryBox returns a configured *MemoryBox func NewMemoryBox() *MemoryBox { return &MemoryBox{ - files: &syncx.ByteMap{}, + files: &ByteMap{}, } } diff --git a/vendor/github.com/gobuffalo/packd/skip_walker.go b/vendor/github.com/gobuffalo/packd/skip_walker.go index 7a297af20..233c6dd6f 100644 --- a/vendor/github.com/gobuffalo/packd/skip_walker.go +++ b/vendor/github.com/gobuffalo/packd/skip_walker.go @@ -3,8 +3,6 @@ package packd import ( "path/filepath" "strings" - - "github.com/pkg/errors" ) var CommonSkipPrefixes = []string{".", "_", "node_modules", "vendor"} @@ -19,7 +17,7 @@ func SkipWalker(walker Walker, skipPrefixes []string, wf WalkFunc) error { return walker.Walk(func(path string, file File) error { fi, err := file.FileInfo() if err != nil { - return errors.WithStack(err) + return err } path = strings.Replace(path, "\\", "/", -1) diff --git a/vendor/github.com/gobuffalo/packd/version.go b/vendor/github.com/gobuffalo/packd/version.go index 4b359093a..082aaef29 100644 --- a/vendor/github.com/gobuffalo/packd/version.go +++ b/vendor/github.com/gobuffalo/packd/version.go @@ -1,4 +1,4 @@ package packd // Version of packd -const Version = "v0.0.1" +const Version = "v0.3.0" diff --git a/vendor/github.com/gobuffalo/packr/v2/.goreleaser.yml b/vendor/github.com/gobuffalo/packr/v2/.goreleaser.yml index a0c56e8e8..7a57ebbd3 100644 --- a/vendor/github.com/gobuffalo/packr/v2/.goreleaser.yml +++ b/vendor/github.com/gobuffalo/packr/v2/.goreleaser.yml @@ -34,8 +34,9 @@ changelog: - '^docs:' - '^test:' -brew: - github: - owner: gobuffalo - name: homebrew-tap +brews: + - + github: + owner: gobuffalo + name: homebrew-tap diff --git a/vendor/github.com/gobuffalo/packr/v2/.goreleaser.yml.plush b/vendor/github.com/gobuffalo/packr/v2/.goreleaser.yml.plush index 79e030def..6bd6ba9ea 100644 --- a/vendor/github.com/gobuffalo/packr/v2/.goreleaser.yml.plush +++ b/vendor/github.com/gobuffalo/packr/v2/.goreleaser.yml.plush @@ -31,8 +31,9 @@ changelog: - '^docs:' - '^test:' <%= if (brew) { %> -brew: - github: - owner: gobuffalo - name: homebrew-tap +brews: + - + github: + owner: gobuffalo + name: homebrew-tap <% } %> diff --git a/vendor/github.com/gobuffalo/packr/v2/Makefile b/vendor/github.com/gobuffalo/packr/v2/Makefile index 8de26c88b..0c87008a3 100644 --- a/vendor/github.com/gobuffalo/packr/v2/Makefile +++ b/vendor/github.com/gobuffalo/packr/v2/Makefile @@ -14,7 +14,6 @@ else endif deps: - $(GO_BIN) get github.com/gobuffalo/release $(GO_BIN) get -tags ${TAGS} -t ./... $(GO_BIN) install -v ./packr2 make tidy diff --git a/vendor/github.com/gobuffalo/packr/v2/README.md b/vendor/github.com/gobuffalo/packr/v2/README.md index 6b79c7d47..cb65f9b84 100644 --- a/vendor/github.com/gobuffalo/packr/v2/README.md +++ b/vendor/github.com/gobuffalo/packr/v2/README.md @@ -1,3 +1,7 @@ +**NOTICE: Please consider migrating your projects to github.com/markbates/pkger. It has an idiomatic API, minimal dependencies, a stronger test suite (tested directly against the std lib counterparts), transparent tooling, and more.** + +https://blog.gobuffalo.io/introducing-pkger-static-file-embedding-in-go-1ce76dc79c65 + # Packr (v2) [![GoDoc](https://godoc.org/github.com/gobuffalo/packr/v2?status.svg)](https://godoc.org/github.com/gobuffalo/packr/v2) @@ -26,7 +30,7 @@ In version `v2.0.0` the file format changed and is not backward compatible with #### Can `packr-v1.x` read the new format? -No, it can not. Because of the way the new file format works porting it to `packr-v1.x` would be difficult. PR's are welcome though. :) +No, it can not. Because of the way the new file format works porting it to `packr-v1.x` would be difficult. PRs are welcome though. :) #### Can `packr-v2.x` read `packr-v1.x` files? @@ -40,8 +44,6 @@ The `--legacy` command is available on all commands that generate `-packr.go` fi ```bash $ packr2 --legacy -$ packr2 install --legacy -$ packr2 build --legacy ``` ## Usage @@ -112,13 +114,13 @@ Packr uses the following resolution rules when looking for a file: Because Packr knows how to fall through to the file system, developers don't need to worry about constantly compiling their static files into a binary. They can work unimpeded. -Packr takes file resolution a step further. When declaring a new box you use a relative path, `./templates`. When Packr recieves this call it calculates out the absolute path to that directory. By doing this it means you can be guaranteed that Packr can find your files correctly, even if you're not running in the directory that the box was created in. This helps with the problem of testing, where Go changes the `pwd` for each package, making relative paths difficult to work with. This is not a problem when using Packr. +Packr takes file resolution a step further. When declaring a new box you use a relative path, `./templates`. When Packr receives this call it calculates out the absolute path to that directory. By doing this it means you can be guaranteed that Packr can find your files correctly, even if you're not running in the directory that the box was created in. This helps with the problem of testing, where Go changes the `pwd` for each package, making relative paths difficult to work with. This is not a problem when using Packr. --- ## Usage with HTTP -A box implements the [`http.FileSystem`](https://golang.org/pkg/net/http/#FileSystemhttps://golang.org/pkg/net/http/#FileSystem) interface, meaning it can be used to serve static files. +A box implements the [`http.FileSystem`](https://golang.org/pkg/net/http/#FileSystem) interface, meaning it can be used to serve static files. ```go package main @@ -139,11 +141,7 @@ func main() { --- -## Building a Binary (the easy way) - -When it comes time to build, or install, your Go binary, simply use `packr2 build` or `packr2 install` just as you would `go build` or `go install`. All flags for the `go` tool are supported and everything works the way you expect, the only difference is your static assets are now bundled in the generated binary. If you want more control over how this happens, looking at the following section on building binaries (the hard way). - -## Building a Binary (the hard way) +## Building a Binary Before you build your Go binary, run the `packr2` command first. It will look for all the boxes in your code and then generate `.go` files that pack the static files into bytes that can be bundled into the Go binary. @@ -170,3 +168,72 @@ Why do you want to do this? Packr first looks to the information stored in these ## Debugging The `packr2` command passes all arguments down to the underlying `go` command, this includes the `-v` flag to print out `go build` information. Packr looks for the `-v` flag, and will turn on its own verbose logging. This is very useful for trying to understand what the `packr` command is doing when it is run. + +--- + +## FAQ + +### Compilation Errors with Go Templates + +Q: I have a program with Go template files, those files are named `foo.go` and look like the following: + +``` +// Copyright {{.Year}} {{.Author}}. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package {{.Project}} +``` + +When I run `packr2` I get errors like: + +``` +expected 'IDENT', found '{' +``` + +A: Packr works by searching your `.go` files for [`github.com/gobuffalo/packr/v2#New`](https://godoc.org/github.com/gobuffalo/packr/v2#New) or [`github.com/gobuffalo/packr/v2#NewBox`](https://godoc.org/github.com/gobuffalo/packr/v2#NewBox) calls. Because those files aren't "proper" Go files, Packr can't parse them to find the box declarations. To fix this you need to tell Packr to ignore those files when searching for boxes. A couple solutions to this problem are: + +* Name the files something else. The `.tmpl` extension is the idiomatic way of naming these types of files. +* Rename the folder containing these files to start with an `_`, for example `_templates`. Packr, like Go, will ignore folders starting with the `_` character when searching for boxes. + +### Dynamic Box Paths + +Q: I need to set the path of a box using a variable, but `packr.New("foo", myVar)` doesn't work correctly. + +A: Packr attempts to "automagically" set it's resolution directory when using [`github.com/gobuffalo/packr/v2#New`](https://godoc.org/github.com/gobuffalo/packr/v2#New), however, for dynamic paths you need to set it manually: + +```go +box := packr.New("foo", "|") +box.ResolutionDir = myVar +``` + +### I don't want to pack files, but still use the Packr interface. + +Q: I want to write code that using the Packr tools, but doesn't actually pack the files into my binary. How can I do that? + +A: Using [`github.com/gobuffalo/packr/v2#Folder`](https://godoc.org/github.com/gobuffalo/packr/v2#Folder) gives you back a `*packr.Box` that can be used as normal, but is excluded by the Packr tool when compiling. + +### Packr Finds No Boxes + +Q: I run `packr2 -v` but it doesn't find my boxes: + +``` +DEBU[2019-03-18T18:48:52+01:00] *parser.Parser#NewFromRoots found prospects=0 +DEBU[2019-03-18T18:48:52+01:00] found 0 boxes +``` + +A: Packr works by parsing `.go` files to find [`github.com/gobuffalo/packr/v2#Box`](https://godoc.org/github.com/gobuffalo/packr/v2#Box) and [`github.com/gobuffalo/packr/v2#NewBox`](https://godoc.org/github.com/gobuffalo/packr/v2#NewBox) declarations. If there aren't any `.go` in the folder that `packr2` is run in it can not find those declarations. To fix this problem run the `packr2` command in the directory containing your `.go` files. + +### Box Interfaces + +Q: I want to be able to easily test my applications by passing in mock boxes. How do I do that? + +A: Packr boxes and files conform to the interfaces found at [`github.com/gobuffalo/packd`](https://godoc.org/github.com/gobuffalo/packd). Change your application to use those interfaces instead of the concrete Packr types. + +```go +// using concrete type +func myFunc(box *packr.Box) {} + +// using interfaces +func myFunc(box packd.Box) {} +``` diff --git a/vendor/github.com/gobuffalo/packr/v2/SHOULDERS.md b/vendor/github.com/gobuffalo/packr/v2/SHOULDERS.md index b1c980f6a..2f6f5c022 100644 --- a/vendor/github.com/gobuffalo/packr/v2/SHOULDERS.md +++ b/vendor/github.com/gobuffalo/packr/v2/SHOULDERS.md @@ -1,28 +1,24 @@ -# github.com/gobuffalo/packr/v2 Stands on the Shoulders of Giants +# /Users/smichalak/dev/packr/v2 Stands on the Shoulders of Giants -github.com/gobuffalo/packr/v2 does not try to reinvent the wheel! Instead, it uses the already great wheels developed by the Go community and puts them all together in the best way possible. Without these giants, this project would not be possible. Please make sure to check them out and thank them for all of their hard work. +/Users/smichalak/dev/packr/v2 does not try to reinvent the wheel! Instead, it uses the already great wheels developed by the Go community and puts them all together in the best way possible. Without these giants, this project would not be possible. Please make sure to check them out and thank them for all of their hard work. Thank you to the following **GIANTS**: -* [github.com/gobuffalo/envy](https://godoc.org/github.com/gobuffalo/envy) - -* [github.com/gobuffalo/genny](https://godoc.org/github.com/gobuffalo/genny) - -* [github.com/gobuffalo/gogen](https://godoc.org/github.com/gobuffalo/gogen) - * [github.com/gobuffalo/logger](https://godoc.org/github.com/gobuffalo/logger) * [github.com/gobuffalo/packd](https://godoc.org/github.com/gobuffalo/packd) * [github.com/karrick/godirwalk](https://godoc.org/github.com/karrick/godirwalk) +* [github.com/konsorten/go-windows-terminal-sequences](https://godoc.org/github.com/konsorten/go-windows-terminal-sequences) + +* [github.com/markbates/errx](https://godoc.org/github.com/markbates/errx) + * [github.com/markbates/oncer](https://godoc.org/github.com/markbates/oncer) * [github.com/markbates/safe](https://godoc.org/github.com/markbates/safe) -* [github.com/pkg/errors](https://godoc.org/github.com/pkg/errors) - * [github.com/rogpeppe/go-internal](https://godoc.org/github.com/rogpeppe/go-internal) * [github.com/sirupsen/logrus](https://godoc.org/github.com/sirupsen/logrus) diff --git a/vendor/github.com/gobuffalo/packr/v2/box.go b/vendor/github.com/gobuffalo/packr/v2/box.go index 3e4c74d22..a2636dee4 100644 --- a/vendor/github.com/gobuffalo/packr/v2/box.go +++ b/vendor/github.com/gobuffalo/packr/v2/box.go @@ -7,6 +7,7 @@ import ( "io/ioutil" "net/http" "os" + "path" "path/filepath" "sort" "strings" @@ -16,7 +17,6 @@ import ( "github.com/gobuffalo/packr/v2/file/resolver" "github.com/gobuffalo/packr/v2/plog" "github.com/markbates/oncer" - "github.com/pkg/errors" ) var _ packd.Box = &Box{} @@ -64,6 +64,13 @@ func New(name string, path string) *Box { return b } +// Folder returns a Box that will NOT be packed. +// This is useful for writing tests or tools that +// need to work with a folder at runtime. +func Folder(path string) *Box { + return New(path, path) +} + // SetResolver allows for the use of a custom resolver for // the specified file func (b *Box) SetResolver(file string, res resolver.Resolver) { @@ -83,7 +90,7 @@ func (b *Box) AddBytes(path string, t []byte) error { m := map[string]file.File{} f, err := file.NewFile(path, t) if err != nil { - return errors.WithStack(err) + return err } m[resolver.Key(path)] = f res := resolver.NewInMemory(m) @@ -118,10 +125,11 @@ func (b *Box) Has(name string) bool { // HasDir returns true if the directory exists in the box func (b *Box) HasDir(name string) bool { - oncer.Do("packr2/box/HasDir", func() { + oncer.Do("packr2/box/HasDir"+b.Name, func() { for _, f := range b.List() { - d := filepath.Dir(f) - b.dirs.Store(d, true) + for d := filepath.Dir(f); d != "."; d = filepath.Dir(d) { + b.dirs.Store(d, true) + } } }) if name == "/" { @@ -134,16 +142,11 @@ func (b *Box) HasDir(name string) bool { // Open returns a File using the http.File interface func (b *Box) Open(name string) (http.File, error) { plog.Debug(b, "Open", "name", name) - if len(filepath.Ext(name)) == 0 { - if !b.HasDir(name) { - return nil, os.ErrNotExist - } - d, err := file.NewDir(name) - plog.Debug(b, "Open", "name", name, "dir", d) - return d, err - } f, err := b.Resolve(name) if err != nil { + if len(filepath.Ext(name)) == 0 { + return b.openWoExt(name) + } return f, err } f, err = file.NewFileR(name, f) @@ -151,6 +154,19 @@ func (b *Box) Open(name string) (http.File, error) { return f, err } +func (b *Box) openWoExt(name string) (http.File, error) { + if !b.HasDir(name) { + id := path.Join(name, "index.html") + if b.Has(id) { + return b.Open(id) + } + return nil, os.ErrNotExist + } + d, err := file.NewDir(name) + plog.Debug(b, "Open", "name", name, "dir", d) + return d, err +} + // List shows "What's in the box?" func (b *Box) List() []string { var keys []string @@ -191,7 +207,7 @@ func (b *Box) Resolve(key string) (file.File, error) { if r == nil { r = resolver.DefaultResolver if r == nil { - return nil, errors.New("resolver.DefaultResolver is nil") + return nil, fmt.Errorf("resolver.DefaultResolver is nil") } } } @@ -199,7 +215,12 @@ func (b *Box) Resolve(key string) (file.File, error) { f, err := r.Resolve(b.Name, key) if err != nil { - z := filepath.Join(resolver.OsPath(b.ResolutionDir), resolver.OsPath(key)) + z, err := resolver.ResolvePathInBase(resolver.OsPath(b.ResolutionDir), filepath.FromSlash(path.Clean("/"+resolver.OsPath(key)))) + if err != nil { + plog.Debug(r, "Resolve", "box", b.Name, "key", key, "err", err) + return f, err + } + f, err = r.Resolve(b.Name, z) if err != nil { plog.Debug(r, "Resolve", "box", b.Name, "key", z, "err", err) @@ -207,11 +228,11 @@ func (b *Box) Resolve(key string) (file.File, error) { } b, err := ioutil.ReadAll(f) if err != nil { - return f, errors.WithStack(err) + return f, err } f, err = file.NewFile(key, b) if err != nil { - return f, errors.WithStack(err) + return f, err } } plog.Debug(r, "Resolve", "box", b.Name, "key", key, "file", f.Name()) diff --git a/vendor/github.com/gobuffalo/packr/v2/deprecated.go b/vendor/github.com/gobuffalo/packr/v2/deprecated.go index 409341068..0da220181 100644 --- a/vendor/github.com/gobuffalo/packr/v2/deprecated.go +++ b/vendor/github.com/gobuffalo/packr/v2/deprecated.go @@ -2,7 +2,7 @@ package packr import ( "encoding/json" - "errors" + "fmt" "github.com/gobuffalo/packr/v2/file" "github.com/gobuffalo/packr/v2/file/resolver" @@ -15,7 +15,7 @@ type File = file.File var ( // ErrResOutsideBox gets returned in case of the requested resources being outside the box // Deprecated - ErrResOutsideBox = errors.New("can't find a resource outside the box") + ErrResOutsideBox = fmt.Errorf("can't find a resource outside the box") ) // PackBytes packs bytes for a file into a box. diff --git a/vendor/github.com/gobuffalo/packr/v2/file/resolver/disk.go b/vendor/github.com/gobuffalo/packr/v2/file/resolver/disk.go index 2a431179a..8c3c1e707 100644 --- a/vendor/github.com/gobuffalo/packr/v2/file/resolver/disk.go +++ b/vendor/github.com/gobuffalo/packr/v2/file/resolver/disk.go @@ -10,7 +10,6 @@ import ( "github.com/gobuffalo/packr/v2/file" "github.com/gobuffalo/packr/v2/plog" "github.com/karrick/godirwalk" - "github.com/pkg/errors" ) var _ Resolver = &Disk{} @@ -24,16 +23,21 @@ func (d Disk) String() string { } func (d *Disk) Resolve(box string, name string) (file.File, error) { + var err error path := OsPath(name) if !filepath.IsAbs(path) { - path = filepath.Join(OsPath(d.Root), path) + path, err = ResolvePathInBase(OsPath(d.Root), path) + if err != nil { + return nil, err + } } + fi, err := os.Stat(path) if err != nil { return nil, err } if fi.IsDir() { - return file.NewDir(OsPath(name)) + return nil, os.ErrNotExist } if bb, err := ioutil.ReadFile(path); err == nil { return file.NewFile(OsPath(name), bb) @@ -41,6 +45,32 @@ func (d *Disk) Resolve(box string, name string) (file.File, error) { return nil, os.ErrNotExist } +// ResolvePathInBase returns a path that is guaranteed to be inside of the base directory or an error +func ResolvePathInBase(base, path string) (string, error) { + // Determine the absolute file path of the base directory + d, err := filepath.Abs(base) + if err != nil { + return "", err + } + + // Return the base directory if no file was requested + if path == "/" || path == "\\" { + return d, nil + } + + // Resolve the absolute file path after combining the key with base + p, err := filepath.Abs(filepath.Join(d, path)) + if err != nil { + return "", err + } + + // Verify that the resolved path is inside of the base directory + if !strings.HasPrefix(p, d+string(filepath.Separator)) { + return "", os.ErrNotExist + } + return p, nil +} + var _ file.FileMappable = &Disk{} func (d *Disk) FileMap() map[string]file.File { @@ -61,11 +91,11 @@ func (d *Disk) FileMap() map[string]file.File { name := strings.TrimPrefix(path, root+string(filepath.Separator)) b, err := ioutil.ReadFile(path) if err != nil { - return errors.WithStack(err) + return err } m[name], err = file.NewFile(name, b) if err != nil { - return errors.WithStack(err) + return err } moot.Unlock() return nil diff --git a/vendor/github.com/gobuffalo/packr/v2/file/resolver/encoding/hex/hex.go b/vendor/github.com/gobuffalo/packr/v2/file/resolver/encoding/hex/hex.go index aee5aecb1..f4fda4e18 100644 --- a/vendor/github.com/gobuffalo/packr/v2/file/resolver/encoding/hex/hex.go +++ b/vendor/github.com/gobuffalo/packr/v2/file/resolver/encoding/hex/hex.go @@ -7,7 +7,6 @@ package hex import ( "bytes" - "errors" "fmt" "io" ) @@ -34,7 +33,7 @@ func Encode(dst, src []byte) int { // ErrLength reports an attempt to decode an odd-length input // using Decode or DecodeString. // The stream-based Decoder returns io.ErrUnexpectedEOF instead of ErrLength. -var ErrLength = errors.New("encoding/hex: odd length hex string") +var ErrLength = fmt.Errorf("encoding/hex: odd length hex string") // InvalidByteError values describe errors resulting from an invalid byte in a hex string. type InvalidByteError byte @@ -223,7 +222,7 @@ func toChar(b byte) byte { func (h *dumper) Write(data []byte) (n int, err error) { if h.closed { - return 0, errors.New("encoding/hex: dumper closed") + return 0, fmt.Errorf("encoding/hex: dumper closed") } // Output lines look like: diff --git a/vendor/github.com/gobuffalo/packr/v2/file/resolver/hex_gzip.go b/vendor/github.com/gobuffalo/packr/v2/file/resolver/hex_gzip.go index 0fc5b7d6e..b72de0ef7 100644 --- a/vendor/github.com/gobuffalo/packr/v2/file/resolver/hex_gzip.go +++ b/vendor/github.com/gobuffalo/packr/v2/file/resolver/hex_gzip.go @@ -13,7 +13,6 @@ import ( "github.com/gobuffalo/packr/v2/plog" "github.com/gobuffalo/packr/v2/file" - "github.com/pkg/errors" ) var _ Resolver = &HexGzip{} @@ -61,12 +60,12 @@ func (hg *HexGzip) Resolve(box string, name string) (file.File, error) { unpacked, err := UnHexGzipString(packed) if err != nil { - return nil, errors.WithStack(err) + return nil, err } f, err := file.NewFile(OsPath(name), []byte(unpacked)) if err != nil { - return nil, errors.WithStack(err) + return nil, err } hg.unpacked[name] = f.String() return f, nil @@ -101,13 +100,13 @@ func UnHexGzipString(packed string) (string, error) { dec := hex.NewDecoder(br) zr, err := gzip.NewReader(dec) if err != nil { - return "", errors.WithStack(err) + return "", err } defer zr.Close() b, err := ioutil.ReadAll(zr) if err != nil { - return "", errors.WithStack(err) + return "", err } return string(b), nil } diff --git a/vendor/github.com/gobuffalo/packr/v2/file/resolver/in_memory.go b/vendor/github.com/gobuffalo/packr/v2/file/resolver/in_memory.go index aa37297e6..9b11a4e87 100644 --- a/vendor/github.com/gobuffalo/packr/v2/file/resolver/in_memory.go +++ b/vendor/github.com/gobuffalo/packr/v2/file/resolver/in_memory.go @@ -6,7 +6,6 @@ import ( "github.com/gobuffalo/packd" "github.com/gobuffalo/packr/v2/file" "github.com/gobuffalo/packr/v2/plog" - "github.com/pkg/errors" ) var _ Resolver = &InMemory{} @@ -31,7 +30,7 @@ func (d *InMemory) Pack(name string, f file.File) error { plog.Debug(d, "Pack", "name", name) b, err := ioutil.ReadAll(f) if err != nil { - return errors.WithStack(err) + return err } d.AddBytes(name, b) return nil diff --git a/vendor/github.com/gobuffalo/packr/v2/go.mod b/vendor/github.com/gobuffalo/packr/v2/go.mod index aeef9591e..82bf27a34 100644 --- a/vendor/github.com/gobuffalo/packr/v2/go.mod +++ b/vendor/github.com/gobuffalo/packr/v2/go.mod @@ -1,19 +1,19 @@ module github.com/gobuffalo/packr/v2 +go 1.13 + require ( - github.com/gobuffalo/envy v1.6.15 - github.com/gobuffalo/genny v0.0.0-20190219203444-c95082806342 - github.com/gobuffalo/gogen v0.0.0-20190224213239-1c6076128bbc - github.com/gobuffalo/logger v0.0.0-20190224201004-be78ebfea0fa - github.com/gobuffalo/packd v0.0.0-20190224160250-d04dd98aca5b - github.com/karrick/godirwalk v1.7.8 - github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2 + github.com/gobuffalo/logger v1.0.3 + github.com/gobuffalo/packd v1.0.0 + github.com/karrick/godirwalk v1.15.8 + github.com/konsorten/go-windows-terminal-sequences v1.0.2 // indirect + github.com/markbates/errx v1.1.0 + github.com/markbates/oncer v1.0.0 github.com/markbates/safe v1.0.1 - github.com/pkg/errors v0.8.1 - github.com/rogpeppe/go-internal v1.2.2 - github.com/sirupsen/logrus v1.3.0 - github.com/spf13/cobra v0.0.3 - github.com/stretchr/testify v1.3.0 - golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 - golang.org/x/tools v0.0.0-20190221204921-83362c3779f5 + github.com/rogpeppe/go-internal v1.5.2 + github.com/sirupsen/logrus v1.4.2 + github.com/spf13/cobra v0.0.6 + github.com/stretchr/testify v1.5.1 + golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e + golang.org/x/tools v0.0.0-20200308013534-11ec41452d41 ) diff --git a/vendor/github.com/gobuffalo/packr/v2/go.sum b/vendor/github.com/gobuffalo/packr/v2/go.sum index 7c49ea0f0..86abdab8c 100644 --- a/vendor/github.com/gobuffalo/packr/v2/go.sum +++ b/vendor/github.com/gobuffalo/packr/v2/go.sum @@ -1,556 +1,180 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.31.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.36.0/go.mod h1:RUoy9p/M4ge0HzT8L+SDZ8jg+Q6fth0CiBuhFJpSV40= -dmitri.shuralyov.com/app/changes v0.0.0-20180602232624-0a106ad413e3/go.mod h1:Yl+fi1br7+Rr3LqpNJf1/uxUdtRUV+Tnj0o93V2B9MU= -dmitri.shuralyov.com/html/belt v0.0.0-20180602232347-f7d459c86be0/go.mod h1:JLBrvjyP0v+ecvNYvCpyZgu5/xkfAUhi6wJj28eUfSU= -dmitri.shuralyov.com/service/change v0.0.0-20181023043359-a85b471d5412/go.mod h1:a1inKt/atXimZ4Mv927x+r7UpyzRUf4emIoiiSC2TN4= -dmitri.shuralyov.com/state v0.0.0-20180228185332-28bcc343414c/go.mod h1:0PRwlb0D6DFvNNtx+9ybjezNCa8XF0xaYcETyp6rHWU= -git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg= -github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/Masterminds/semver v1.4.2 h1:WBLTQ37jOCzSLtXNdoo8bNM8876KhNqOKvrlGITgsTc= -github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= -github.com/ajg/form v0.0.0-20160822230020-523a5da1a92f/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= -github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625/go.mod h1:HYsPBTaaSFSlLx/70C2HPIMNZpVV8+vt/A+FMnYP11g= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= -github.com/cockroachdb/cockroach-go v0.0.0-20181001143604-e0a95dfd547c/go.mod h1:XGLbWH/ujMcbPbhZq52Nv6UrCghb1yGn//133kEsvDk= -github.com/codegangsta/negroni v1.0.0/go.mod h1:v0y3T5G7Y1UlFfyxFn/QLRU4a2EuNau2iZY63YTKWo0= +github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dustin/go-humanize v0.0.0-20180713052910-9f541cc9db5d/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/structs v1.0.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= -github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= -github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= -github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= +github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= -github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= -github.com/gobuffalo/attrs v0.0.0-20190219185331-f338c9388485/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0= -github.com/gobuffalo/buffalo v0.12.8-0.20181004233540-fac9bb505aa8/go.mod h1:sLyT7/dceRXJUxSsE813JTQtA3Eb1vjxWfo/N//vXIY= -github.com/gobuffalo/buffalo v0.13.0/go.mod h1:Mjn1Ba9wpIbpbrD+lIDMy99pQ0H0LiddMIIDGse7qT4= -github.com/gobuffalo/buffalo-plugins v1.0.2/go.mod h1:pOp/uF7X3IShFHyobahTkTLZaeUXwb0GrUTb9ngJWTs= -github.com/gobuffalo/buffalo-plugins v1.0.4/go.mod h1:pWS1vjtQ6uD17MVFWf7i3zfThrEKWlI5+PYLw/NaDB4= -github.com/gobuffalo/buffalo-plugins v1.4.3/go.mod h1:uCzTY0woez4nDMdQjkcOYKanngeUVRO2HZi7ezmAjWY= -github.com/gobuffalo/buffalo-plugins v1.5.1/go.mod h1:jbmwSZK5+PiAP9cC09VQOrGMZFCa/P0UMlIS3O12r5w= -github.com/gobuffalo/buffalo-plugins v1.6.4/go.mod h1:/+N1aophkA2jZ1ifB2O3Y9yGwu6gKOVMtUmJnbg+OZI= -github.com/gobuffalo/buffalo-plugins v1.6.5/go.mod h1:0HVkbgrVs/MnPZ/FOseDMVanCTm2RNcdM0PuXcL1NNI= -github.com/gobuffalo/buffalo-plugins v1.6.7/go.mod h1:ZGZRkzz2PiKWHs0z7QsPBOTo2EpcGRArMEym6ghKYgk= -github.com/gobuffalo/buffalo-plugins v1.6.9/go.mod h1:yYlYTrPdMCz+6/+UaXg5Jm4gN3xhsvsQ2ygVatZV5vw= -github.com/gobuffalo/buffalo-plugins v1.6.11/go.mod h1:eAA6xJIL8OuynJZ8amXjRmHND6YiusVAaJdHDN1Lu8Q= -github.com/gobuffalo/buffalo-plugins v1.8.2/go.mod h1:9te6/VjEQ7pKp7lXlDIMqzxgGpjlKoAcAANdCgoR960= -github.com/gobuffalo/buffalo-plugins v1.8.3/go.mod h1:IAWq6vjZJVXebIq2qGTLOdlXzmpyTZ5iJG5b59fza5U= -github.com/gobuffalo/buffalo-plugins v1.9.4/go.mod h1:grCV6DGsQlVzQwk6XdgcL3ZPgLm9BVxlBmXPMF8oBHI= -github.com/gobuffalo/buffalo-plugins v1.10.0/go.mod h1:4osg8d9s60txLuGwXnqH+RCjPHj9K466cDFRl3PErHI= -github.com/gobuffalo/buffalo-plugins v1.11.0/go.mod h1:rtIvAYRjYibgmWhnjKmo7OadtnxuMG5ZQLr25ozAzjg= -github.com/gobuffalo/buffalo-plugins v1.12.0 h1:5rvYQ7mwfPwUW9zqcMd9ahWtPVOOouMKZjv88q45Z7c= -github.com/gobuffalo/buffalo-plugins v1.12.0/go.mod h1:kw4Mj2vQXqe4X5TI36PEQgswbL30heGQwJEeDKd1v+4= -github.com/gobuffalo/buffalo-pop v1.0.5/go.mod h1:Fw/LfFDnSmB/vvQXPvcXEjzP98Tc+AudyNWUBWKCwQ8= -github.com/gobuffalo/depgen v0.0.0-20190219190223-ba8c93fa0c2c/go.mod h1:CE/HUV4vDCXtJayRf6WoMWgezb1yH4QHg8GNK8FL0JI= -github.com/gobuffalo/envy v1.6.4/go.mod h1:Abh+Jfw475/NWtYMEt+hnJWRiC8INKWibIMyNt1w2Mc= -github.com/gobuffalo/envy v1.6.5/go.mod h1:N+GkhhZ/93bGZc6ZKhJLP6+m+tCNPKwgSpH9kaifseQ= -github.com/gobuffalo/envy v1.6.6/go.mod h1:N+GkhhZ/93bGZc6ZKhJLP6+m+tCNPKwgSpH9kaifseQ= -github.com/gobuffalo/envy v1.6.7/go.mod h1:N+GkhhZ/93bGZc6ZKhJLP6+m+tCNPKwgSpH9kaifseQ= -github.com/gobuffalo/envy v1.6.8/go.mod h1:N+GkhhZ/93bGZc6ZKhJLP6+m+tCNPKwgSpH9kaifseQ= -github.com/gobuffalo/envy v1.6.9/go.mod h1:N+GkhhZ/93bGZc6ZKhJLP6+m+tCNPKwgSpH9kaifseQ= -github.com/gobuffalo/envy v1.6.10/go.mod h1:X0CFllQjTV5ogsnUrg+Oks2yTI+PU2dGYBJOEI2D1Uo= -github.com/gobuffalo/envy v1.6.11/go.mod h1:Fiq52W7nrHGDggFPhn2ZCcHw4u/rqXkqo+i7FB6EAcg= -github.com/gobuffalo/envy v1.6.12/go.mod h1:qJNrJhKkZpEW0glh5xP2syQHH5kgdmgsKss2Kk8PTP0= -github.com/gobuffalo/envy v1.6.13/go.mod h1:w9DJppgl51JwUFWWd/M/6/otrPtWV3WYMa+NNLunqKA= -github.com/gobuffalo/envy v1.6.15 h1:OsV5vOpHYUpP7ZLS6sem1y40/lNX1BZj+ynMiRi21lQ= -github.com/gobuffalo/envy v1.6.15/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= -github.com/gobuffalo/events v1.0.3/go.mod h1:Txo8WmqScapa7zimEQIwgiJBvMECMe9gJjsKNPN3uZw= -github.com/gobuffalo/events v1.0.7/go.mod h1:z8txf6H9jWhQ5Scr7YPLWg/cgXBRj8Q4uYI+rsVCCSQ= -github.com/gobuffalo/events v1.0.8/go.mod h1:A5KyqT1sA+3GJiBE4QKZibse9mtOcI9nw8gGrDdqYGs= -github.com/gobuffalo/events v1.1.3/go.mod h1:9yPGWYv11GENtzrIRApwQRMYSbUgCsZ1w6R503fCfrk= -github.com/gobuffalo/events v1.1.4/go.mod h1:09/YRRgZHEOts5Isov+g9X2xajxdvOAcUuAHIX/O//A= -github.com/gobuffalo/events v1.1.5/go.mod h1:3YUSzgHfYctSjEjLCWbkXP6djH2M+MLaVRzb4ymbAK0= -github.com/gobuffalo/events v1.1.7/go.mod h1:6fGqxH2ing5XMb3EYRq9LEkVlyPGs4oO/eLzh+S8CxY= -github.com/gobuffalo/events v1.1.8/go.mod h1:UFy+W6X6VbCWS8k2iT81HYX65dMtiuVycMy04cplt/8= -github.com/gobuffalo/events v1.1.9/go.mod h1:/0nf8lMtP5TkgNbzYxR6Bl4GzBy5s5TebgNTdRfRbPM= -github.com/gobuffalo/events v1.2.0 h1:YovlMNcwNTfIm/3OdB+KemDOm8yUz4XIH+4kbMhGXWw= -github.com/gobuffalo/events v1.2.0/go.mod h1:pxvpvsKXKZNPtHuIxUV3K+g+KP5o4forzaeFj++bh68= -github.com/gobuffalo/fizz v1.0.12/go.mod h1:C0sltPxpYK8Ftvf64kbsQa2yiCZY4RZviurNxXdAKwc= -github.com/gobuffalo/flect v0.0.0-20180907193754-dc14d8acaf9f/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA= -github.com/gobuffalo/flect v0.0.0-20181002182613-4571df4b1daf/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA= -github.com/gobuffalo/flect v0.0.0-20181007231023-ae7ed6bfe683/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA= -github.com/gobuffalo/flect v0.0.0-20181018182602-fd24a256709f/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA= -github.com/gobuffalo/flect v0.0.0-20181019110701-3d6f0b585514/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA= -github.com/gobuffalo/flect v0.0.0-20181024204909-8f6be1a8c6c2/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA= -github.com/gobuffalo/flect v0.0.0-20181104133451-1f6e9779237a/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA= -github.com/gobuffalo/flect v0.0.0-20181114183036-47375f6d8328/go.mod h1:0HvNbHdfh+WOvDSIASqJOSxTOWSxCCUF++k/Y53v9rI= -github.com/gobuffalo/flect v0.0.0-20181210151238-24a2b68e0316/go.mod h1:en58vff74S9b99Eg42Dr+/9yPu437QjlNsO/hBYPuOk= -github.com/gobuffalo/flect v0.0.0-20190104192022-4af577e09bf2/go.mod h1:en58vff74S9b99Eg42Dr+/9yPu437QjlNsO/hBYPuOk= -github.com/gobuffalo/flect v0.0.0-20190117212819-a62e61d96794/go.mod h1:397QT6v05LkZkn07oJXXT6y9FCfwC8Pug0WA2/2mE9k= -github.com/gobuffalo/flect v0.1.0 h1:EJvbvZlo9exJk5UK02lz5pTs3XEpIM5/4o691KfvtkM= -github.com/gobuffalo/flect v0.1.0/go.mod h1:d2ehjJqGOH/Kjqcoz+F7jHTBbmDb38yXA598Hb50EGs= -github.com/gobuffalo/genny v0.0.0-20180924032338-7af3a40f2252/go.mod h1:tUTQOogrr7tAQnhajMSH6rv1BVev34H2sa1xNHMy94g= -github.com/gobuffalo/genny v0.0.0-20181003150629-3786a0744c5d/go.mod h1:WAd8HmjMVrnkAZbmfgH5dLBUchsZfqzp/WS5sQz+uTM= -github.com/gobuffalo/genny v0.0.0-20181005145118-318a41a134cc/go.mod h1:WAd8HmjMVrnkAZbmfgH5dLBUchsZfqzp/WS5sQz+uTM= -github.com/gobuffalo/genny v0.0.0-20181007153042-b8de7d566757/go.mod h1:+oG5Ljrw04czAHbPXREwaFojJbpUvcIy4DiOnbEJFTA= -github.com/gobuffalo/genny v0.0.0-20181012161047-33e5f43d83a6/go.mod h1:+oG5Ljrw04czAHbPXREwaFojJbpUvcIy4DiOnbEJFTA= -github.com/gobuffalo/genny v0.0.0-20181017160347-90a774534246/go.mod h1:+oG5Ljrw04czAHbPXREwaFojJbpUvcIy4DiOnbEJFTA= -github.com/gobuffalo/genny v0.0.0-20181024195656-51392254bf53/go.mod h1:o9GEH5gn5sCKLVB5rHFC4tq40rQ3VRUzmx6WwmaqISE= -github.com/gobuffalo/genny v0.0.0-20181025145300-af3f81d526b8/go.mod h1:uZ1fFYvdcP8mu0B/Ynarf6dsGvp7QFIpk/QACUuFUVI= -github.com/gobuffalo/genny v0.0.0-20181027191429-94d6cfb5c7fc/go.mod h1:x7SkrQQBx204Y+O9EwRXeszLJDTaWN0GnEasxgLrQTA= -github.com/gobuffalo/genny v0.0.0-20181027195209-3887b7171c4f/go.mod h1:JbKx8HSWICu5zyqWOa0dVV1pbbXOHusrSzQUprW6g+w= -github.com/gobuffalo/genny v0.0.0-20181106193839-7dcb0924caf1/go.mod h1:x61yHxvbDCgQ/7cOAbJCacZQuHgB0KMSzoYcw5debjU= -github.com/gobuffalo/genny v0.0.0-20181107223128-f18346459dbe/go.mod h1:utQD3aKKEsdb03oR+Vi/6ztQb1j7pO10N3OBoowRcSU= -github.com/gobuffalo/genny v0.0.0-20181114215459-0a4decd77f5d/go.mod h1:kN2KZ8VgXF9VIIOj/GM0Eo7YK+un4Q3tTreKOf0q1ng= -github.com/gobuffalo/genny v0.0.0-20181119162812-e8ff4adce8bb/go.mod h1:BA9htSe4bZwBDJLe8CUkoqkypq3hn3+CkoHqVOW718E= -github.com/gobuffalo/genny v0.0.0-20181127225641-2d959acc795b/go.mod h1:l54xLXNkteX/PdZ+HlgPk1qtcrgeOr3XUBBPDbH+7CQ= -github.com/gobuffalo/genny v0.0.0-20181128191930-77e34f71ba2a/go.mod h1:FW/D9p7cEEOqxYA71/hnrkOWm62JZ5ZNxcNIVJEaWBU= -github.com/gobuffalo/genny v0.0.0-20181203165245-fda8bcce96b1/go.mod h1:wpNSANu9UErftfiaAlz1pDZclrYzLtO5lALifODyjuM= -github.com/gobuffalo/genny v0.0.0-20181203201232-849d2c9534ea/go.mod h1:wpNSANu9UErftfiaAlz1pDZclrYzLtO5lALifODyjuM= -github.com/gobuffalo/genny v0.0.0-20181206121324-d6fb8a0dbe36/go.mod h1:wpNSANu9UErftfiaAlz1pDZclrYzLtO5lALifODyjuM= -github.com/gobuffalo/genny v0.0.0-20181207164119-84844398a37d/go.mod h1:y0ysCHGGQf2T3vOhCrGHheYN54Y/REj0ayd0Suf4C/8= -github.com/gobuffalo/genny v0.0.0-20181211165820-e26c8466f14d/go.mod h1:sHnK+ZSU4e2feXP3PA29ouij6PUEiN+RCwECjCTB3yM= -github.com/gobuffalo/genny v0.0.0-20190104222617-a71664fc38e7/go.mod h1:QPsQ1FnhEsiU8f+O0qKWXz2RE4TiDqLVChWkBuh1WaY= -github.com/gobuffalo/genny v0.0.0-20190112155932-f31a84fcacf5/go.mod h1:CIaHCrSIuJ4il6ka3Hub4DR4adDrGoXGEEt2FbBxoIo= -github.com/gobuffalo/genny v0.0.0-20190124191459-3310289fa4b4/go.mod h1:yIRqxhZV2sAzb+B3iPUMLauTRrYP8tJUlZ1zV9teKik= -github.com/gobuffalo/genny v0.0.0-20190131150032-1045e97d19fb/go.mod h1:yIRqxhZV2sAzb+B3iPUMLauTRrYP8tJUlZ1zV9teKik= -github.com/gobuffalo/genny v0.0.0-20190131190646-008a76242145/go.mod h1:NJvPZJxb9M4z790P6N2SMZKSUYpASpEvLuUWnHGKzb4= -github.com/gobuffalo/genny v0.0.0-20190219203444-c95082806342 h1:ewzWZ+TT9/3wYSnUPQRU7YFzqWAx4dgUXdgvJVTVLCA= -github.com/gobuffalo/genny v0.0.0-20190219203444-c95082806342/go.mod h1:3BLT+Vs94EEz3fKR8WWOkYpL6c1tdJcZUNCe3LZAnvQ= -github.com/gobuffalo/gitgen v0.0.0-20190219185555-91c2c5f0aad5 h1:TKLkvMd0sYNEsoVsoIGUzjFNtM7eMlQqLf/4JwlKVaE= -github.com/gobuffalo/gitgen v0.0.0-20190219185555-91c2c5f0aad5/go.mod h1:ZzGIrxBvCJEluaU4i3CN0GFlu1Qmb3yK8ziV02evJ1E= -github.com/gobuffalo/github_flavored_markdown v1.0.4/go.mod h1:uRowCdK+q8d/RF0Kt3/DSalaIXbb0De/dmTqMQdkQ4I= -github.com/gobuffalo/github_flavored_markdown v1.0.5/go.mod h1:U0643QShPF+OF2tJvYNiYDLDGDuQmJZXsf/bHOJPsMY= -github.com/gobuffalo/github_flavored_markdown v1.0.7 h1:Vjvz4wqOnviiLEfTh5bh270b3lhpJiwwQEWOWmHMwY8= -github.com/gobuffalo/github_flavored_markdown v1.0.7/go.mod h1:w93Pd9Lz6LvyQXEG6DktTPHkOtCbr+arAD5mkwMzXLI= -github.com/gobuffalo/gogen v0.0.0-20190219194924-d32a17ad9761/go.mod h1:v47C8sid+ZM2qK+YpQ2MGJKssKAqyTsH1wl/pTCPdz8= -github.com/gobuffalo/gogen v0.0.0-20190224213239-1c6076128bbc h1:GjmMs2PLx+rH9In421AR1RkHV5AG9lLnRpIPhWauvoI= -github.com/gobuffalo/gogen v0.0.0-20190224213239-1c6076128bbc/go.mod h1:tQqPADZKflmJCR4FHRHYNPP79cXPICyxUiUHyhuXtqg= -github.com/gobuffalo/httptest v1.0.2/go.mod h1:7T1IbSrg60ankme0aDLVnEY0h056g9M1/ZvpVThtB7E= -github.com/gobuffalo/licenser v0.0.0-20180924033006-eae28e638a42/go.mod h1:Ubo90Np8gpsSZqNScZZkVXXAo5DGhTb+WYFIjlnog8w= -github.com/gobuffalo/licenser v0.0.0-20181025145548-437d89de4f75/go.mod h1:x3lEpYxkRG/XtGCUNkio+6RZ/dlOvLzTI9M1auIwFcw= -github.com/gobuffalo/licenser v0.0.0-20181027200154-58051a75da95/go.mod h1:BzhaaxGd1tq1+OLKObzgdCV9kqVhbTulxOpYbvMQWS0= -github.com/gobuffalo/licenser v0.0.0-20181109171355-91a2a7aac9a7/go.mod h1:m+Ygox92pi9bdg+gVaycvqE8RVSjZp7mWw75+K5NPHk= -github.com/gobuffalo/licenser v0.0.0-20181128165715-cc7305f8abed/go.mod h1:oU9F9UCE+AzI/MueCKZamsezGOOHfSirltllOVeRTAE= -github.com/gobuffalo/licenser v0.0.0-20181203160806-fe900bbede07/go.mod h1:ph6VDNvOzt1CdfaWC+9XwcBnlSTBz2j49PBwum6RFaU= -github.com/gobuffalo/licenser v0.0.0-20181211173111-f8a311c51159 h1:bbR/354ALkf/k/CoHxgPPAToVU38WZVwXcxF/UgT7V4= -github.com/gobuffalo/licenser v0.0.0-20181211173111-f8a311c51159/go.mod h1:ve/Ue99DRuvnTaLq2zKa6F4KtHiYf7W046tDjuGYPfM= -github.com/gobuffalo/logger v0.0.0-20181022175615-46cfb361fc27/go.mod h1:8sQkgyhWipz1mIctHF4jTxmJh1Vxhp7mP8IqbljgJZo= -github.com/gobuffalo/logger v0.0.0-20181027144941-73d08d2bb969/go.mod h1:7uGg2duHKpWnN4+YmyKBdLXfhopkAdVM6H3nKbyFbz8= -github.com/gobuffalo/logger v0.0.0-20181027193913-9cf4dd0efe46/go.mod h1:7uGg2duHKpWnN4+YmyKBdLXfhopkAdVM6H3nKbyFbz8= -github.com/gobuffalo/logger v0.0.0-20181109185836-3feeab578c17/go.mod h1:oNErH0xLe+utO+OW8ptXMSA5DkiSEDW1u3zGIt8F9Ew= -github.com/gobuffalo/logger v0.0.0-20181117211126-8e9b89b7c264/go.mod h1:5etB91IE0uBlw9k756fVKZJdS+7M7ejVhmpXXiSFj0I= -github.com/gobuffalo/logger v0.0.0-20181127160119-5b956e21995c/go.mod h1:+HxKANrR9VGw9yN3aOAppJKvhO05ctDi63w4mDnKv2U= -github.com/gobuffalo/logger v0.0.0-20190224201004-be78ebfea0fa h1:26mAf6lQ2m1PSrYlsC16sFAaocXAM+jnCkpj3qKmDmU= -github.com/gobuffalo/logger v0.0.0-20190224201004-be78ebfea0fa/go.mod h1:+HxKANrR9VGw9yN3aOAppJKvhO05ctDi63w4mDnKv2U= -github.com/gobuffalo/makr v1.1.5/go.mod h1:Y+o0btAH1kYAMDJW/TX3+oAXEu0bmSLLoC9mIFxtzOw= -github.com/gobuffalo/mapi v1.0.0/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= -github.com/gobuffalo/mapi v1.0.1 h1:JRuTiZzDEZhBHkFiHTxJkYRT6CbYuL0K/rn+1byJoEA= -github.com/gobuffalo/mapi v1.0.1/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= -github.com/gobuffalo/meta v0.0.0-20181018155829-df62557efcd3/go.mod h1:XTTOhwMNryif3x9LkTTBO/Llrveezd71u3quLd0u7CM= -github.com/gobuffalo/meta v0.0.0-20181018192820-8c6cef77dab3/go.mod h1:E94EPzx9NERGCY69UWlcj6Hipf2uK/vnfrF4QD0plVE= -github.com/gobuffalo/meta v0.0.0-20181025145500-3a985a084b0a/go.mod h1:YDAKBud2FP7NZdruCSlmTmDOZbVSa6bpK7LJ/A/nlKg= -github.com/gobuffalo/meta v0.0.0-20181114191255-b130ebedd2f7/go.mod h1:K6cRZ29ozr4Btvsqkjvg5nDFTLOgTqf03KA70Ks0ypE= -github.com/gobuffalo/meta v0.0.0-20181127070345-0d7e59dd540b/go.mod h1:RLO7tMvE0IAKAM8wny1aN12pvEKn7EtkBLkUZR00Qf8= -github.com/gobuffalo/meta v0.0.0-20190120163247-50bbb1fa260d/go.mod h1:KKsH44nIK2gA8p0PJmRT9GvWJUdphkDUA8AJEvFWiqM= -github.com/gobuffalo/meta v0.0.0-20190121163014-ecaa953cbfb3 h1:JzhweLavqD8ZNLOIBRvE5IPyp+sw/wYQmL9c5XwZuHI= -github.com/gobuffalo/meta v0.0.0-20190121163014-ecaa953cbfb3/go.mod h1:KLfkGnS+Tucc+iTkUcAUBtxpwOJGfhw2pHRLddPxMQY= -github.com/gobuffalo/mw-basicauth v1.0.3/go.mod h1:dg7+ilMZOKnQFHDefUzUHufNyTswVUviCBgF244C1+0= -github.com/gobuffalo/mw-contenttype v0.0.0-20180802152300-74f5a47f4d56/go.mod h1:7EvcmzBbeCvFtQm5GqF9ys6QnCxz2UM1x0moiWLq1No= -github.com/gobuffalo/mw-csrf v0.0.0-20180802151833-446ff26e108b/go.mod h1:sbGtb8DmDZuDUQoxjr8hG1ZbLtZboD9xsn6p77ppcHo= -github.com/gobuffalo/mw-forcessl v0.0.0-20180802152810-73921ae7a130/go.mod h1:JvNHRj7bYNAMUr/5XMkZaDcw3jZhUZpsmzhd//FFWmQ= -github.com/gobuffalo/mw-i18n v0.0.0-20180802152014-e3060b7e13d6/go.mod h1:91AQfukc52A6hdfIfkxzyr+kpVYDodgAeT5cjX1UIj4= -github.com/gobuffalo/mw-paramlogger v0.0.0-20181005191442-d6ee392ec72e/go.mod h1:6OJr6VwSzgJMqWMj7TYmRUqzNe2LXu/W1rRW4MAz/ME= -github.com/gobuffalo/mw-tokenauth v0.0.0-20181001105134-8545f626c189/go.mod h1:UqBF00IfKvd39ni5+yI5MLMjAf4gX7cDKN/26zDOD6c= -github.com/gobuffalo/packd v0.0.0-20181027182251-01ad393492c8/go.mod h1:SmdBdhj6uhOsg1Ui4SFAyrhuc7U4VCildosO5IDJ3lc= -github.com/gobuffalo/packd v0.0.0-20181027190505-aafc0d02c411/go.mod h1:SmdBdhj6uhOsg1Ui4SFAyrhuc7U4VCildosO5IDJ3lc= -github.com/gobuffalo/packd v0.0.0-20181027194105-7ae579e6d213/go.mod h1:SmdBdhj6uhOsg1Ui4SFAyrhuc7U4VCildosO5IDJ3lc= -github.com/gobuffalo/packd v0.0.0-20181031195726-c82734870264/go.mod h1:Yf2toFaISlyQrr5TfO3h6DB9pl9mZRmyvBGQb/aQ/pI= -github.com/gobuffalo/packd v0.0.0-20181104210303-d376b15f8e96/go.mod h1:Yf2toFaISlyQrr5TfO3h6DB9pl9mZRmyvBGQb/aQ/pI= -github.com/gobuffalo/packd v0.0.0-20181111195323-b2e760a5f0ff/go.mod h1:Yf2toFaISlyQrr5TfO3h6DB9pl9mZRmyvBGQb/aQ/pI= -github.com/gobuffalo/packd v0.0.0-20181114190715-f25c5d2471d7/go.mod h1:Yf2toFaISlyQrr5TfO3h6DB9pl9mZRmyvBGQb/aQ/pI= -github.com/gobuffalo/packd v0.0.0-20181124090624-311c6248e5fb/go.mod h1:Foenia9ZvITEvG05ab6XpiD5EfBHPL8A6hush8SJ0o8= -github.com/gobuffalo/packd v0.0.0-20181207120301-c49825f8f6f4/go.mod h1:LYc0TGKFBBFTRC9dg2pcRcMqGCTMD7T2BIMP7OBuQAA= -github.com/gobuffalo/packd v0.0.0-20181212173646-eca3b8fd6687/go.mod h1:LYc0TGKFBBFTRC9dg2pcRcMqGCTMD7T2BIMP7OBuQAA= -github.com/gobuffalo/packd v0.0.0-20190224160250-d04dd98aca5b h1:QlU2UkP7c/XJ994sM1Z8YN9tHsKeIOp7dyMqiLvyNt0= -github.com/gobuffalo/packd v0.0.0-20190224160250-d04dd98aca5b/go.mod h1:LYc0TGKFBBFTRC9dg2pcRcMqGCTMD7T2BIMP7OBuQAA= -github.com/gobuffalo/packr v1.13.7/go.mod h1:KkinLIn/n6+3tVXMwg6KkNvWwVsrRAz4ph+jgpk3Z24= -github.com/gobuffalo/packr v1.15.0/go.mod h1:t5gXzEhIviQwVlNx/+3SfS07GS+cZ2hn76WLzPp6MGI= -github.com/gobuffalo/packr v1.15.1/go.mod h1:IeqicJ7jm8182yrVmNbM6PR4g79SjN9tZLH8KduZZwE= -github.com/gobuffalo/packr v1.19.0/go.mod h1:MstrNkfCQhd5o+Ct4IJ0skWlxN8emOq8DsoT1G98VIU= -github.com/gobuffalo/packr v1.20.0/go.mod h1:JDytk1t2gP+my1ig7iI4NcVaXr886+N0ecUga6884zw= -github.com/gobuffalo/packr v1.21.0/go.mod h1:H00jGfj1qFKxscFJSw8wcL4hpQtPe1PfU2wa6sg/SR0= -github.com/gobuffalo/packr/v2 v2.0.0-rc.8/go.mod h1:y60QCdzwuMwO2R49fdQhsjCPv7tLQFR0ayzxxla9zes= -github.com/gobuffalo/packr/v2 v2.0.0-rc.9/go.mod h1:fQqADRfZpEsgkc7c/K7aMew3n4aF1Kji7+lIZeR98Fc= -github.com/gobuffalo/packr/v2 v2.0.0-rc.10/go.mod h1:4CWWn4I5T3v4c1OsJ55HbHlUEKNWMITG5iIkdr4Px4w= -github.com/gobuffalo/packr/v2 v2.0.0-rc.11/go.mod h1:JoieH/3h3U4UmatmV93QmqyPUdf4wVM9HELaHEu+3fk= -github.com/gobuffalo/packr/v2 v2.0.0-rc.12/go.mod h1:FV1zZTsVFi1DSCboO36Xgs4pzCZBjB/tDV9Cz/lSaR8= -github.com/gobuffalo/packr/v2 v2.0.0-rc.13/go.mod h1:2Mp7GhBFMdJlOK8vGfl7SYtfMP3+5roE39ejlfjw0rA= -github.com/gobuffalo/packr/v2 v2.0.0-rc.14/go.mod h1:06otbrNvDKO1eNQ3b8hst+1010UooI2MFg+B2Ze4MV8= -github.com/gobuffalo/packr/v2 v2.0.0-rc.15/go.mod h1:IMe7H2nJvcKXSF90y4X1rjYIRlNMJYCxEhssBXNZwWs= -github.com/gobuffalo/packr/v2 v2.0.0/go.mod h1:7McfLpSxaPUoSQm7gYpTZRQSK63mX8EKzzYSEFKvfkM= -github.com/gobuffalo/packr/v2 v2.0.1/go.mod h1:tp5/5A2e67F1lUGTiNadtA2ToP045+mvkWzaqMCsZr4= -github.com/gobuffalo/plush v3.7.16+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= -github.com/gobuffalo/plush v3.7.20+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= -github.com/gobuffalo/plush v3.7.21+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= -github.com/gobuffalo/plush v3.7.22+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= -github.com/gobuffalo/plush v3.7.23+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= -github.com/gobuffalo/plush v3.7.30+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= -github.com/gobuffalo/plush v3.7.31+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= -github.com/gobuffalo/plush v3.7.32+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= -github.com/gobuffalo/plush v3.7.33+incompatible h1:wpCuypoZo1UlvYsLx+ERYpo0YhF+DSo2SSanVgRpMOg= -github.com/gobuffalo/plush v3.7.33+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= -github.com/gobuffalo/plushgen v0.0.0-20181128164830-d29dcb966cb2/go.mod h1:r9QwptTFnuvSaSRjpSp4S2/4e2D3tJhARYbvEBcKSb4= -github.com/gobuffalo/plushgen v0.0.0-20181203163832-9fc4964505c2/go.mod h1:opEdT33AA2HdrIwK1aibqnTJDVVKXC02Bar/GT1YRVs= -github.com/gobuffalo/plushgen v0.0.0-20181207152837-eedb135bd51b/go.mod h1:Lcw7HQbEVm09sAQrCLzIxuhFbB3nAgp4c55E+UlynR0= -github.com/gobuffalo/plushgen v0.0.0-20190104222512-177cd2b872b3 h1:y+xgpBg0jHuTTDOE65FahfUgugBDpOp4C0RXXtGiSB0= -github.com/gobuffalo/plushgen v0.0.0-20190104222512-177cd2b872b3/go.mod h1:tYxCozi8X62bpZyKXYHw1ncx2ZtT2nFvG42kuLwYjoc= -github.com/gobuffalo/pop v4.8.2+incompatible/go.mod h1:DwBz3SD5SsHpTZiTubcsFWcVDpJWGsxjVjMPnkiThWg= -github.com/gobuffalo/pop v4.8.3+incompatible/go.mod h1:DwBz3SD5SsHpTZiTubcsFWcVDpJWGsxjVjMPnkiThWg= -github.com/gobuffalo/pop v4.8.4+incompatible/go.mod h1:DwBz3SD5SsHpTZiTubcsFWcVDpJWGsxjVjMPnkiThWg= -github.com/gobuffalo/release v1.0.35/go.mod h1:VtHFAKs61vO3wboCec5xr9JPTjYyWYcvaM3lclkc4x4= -github.com/gobuffalo/release v1.0.38/go.mod h1:VtHFAKs61vO3wboCec5xr9JPTjYyWYcvaM3lclkc4x4= -github.com/gobuffalo/release v1.0.42/go.mod h1:RPs7EtafH4oylgetOJpGP0yCZZUiO4vqHfTHJjSdpug= -github.com/gobuffalo/release v1.0.52/go.mod h1:RPs7EtafH4oylgetOJpGP0yCZZUiO4vqHfTHJjSdpug= -github.com/gobuffalo/release v1.0.53/go.mod h1:FdF257nd8rqhNaqtDWFGhxdJ/Ig4J7VcS3KL7n/a+aA= -github.com/gobuffalo/release v1.0.54/go.mod h1:Pe5/RxRa/BE8whDpGfRqSI7D1a0evGK1T4JDm339tJc= -github.com/gobuffalo/release v1.0.61/go.mod h1:mfIO38ujUNVDlBziIYqXquYfBF+8FDHUjKZgYC1Hj24= -github.com/gobuffalo/release v1.0.72/go.mod h1:NP5NXgg/IX3M5XmHmWR99D687/3Dt9qZtTK/Lbwc1hU= -github.com/gobuffalo/release v1.1.1/go.mod h1:Sluak1Xd6kcp6snkluR1jeXAogdJZpFFRzTYRs/2uwg= -github.com/gobuffalo/release v1.1.3/go.mod h1:CuXc5/m+4zuq8idoDt1l4va0AXAn/OSs08uHOfMVr8E= -github.com/gobuffalo/release v1.1.6/go.mod h1:18naWa3kBsqO0cItXZNJuefCKOENpbbUIqRL1g+p6z0= -github.com/gobuffalo/shoulders v1.0.1/go.mod h1:V33CcVmaQ4gRUmHKwq1fiTXuf8Gp/qjQBUL5tHPmvbA= -github.com/gobuffalo/syncx v0.0.0-20181120191700-98333ab04150/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw= -github.com/gobuffalo/syncx v0.0.0-20181120194010-558ac7de985f h1:S5EeH1reN93KR0L6TQvkRpu9YggCYXrUqFh1iEgvdC0= -github.com/gobuffalo/syncx v0.0.0-20181120194010-558ac7de985f/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw= -github.com/gobuffalo/tags v2.0.11+incompatible/go.mod h1:9XmhOkyaB7UzvuY4UoZO4s67q8/xRMVJEaakauVQYeY= -github.com/gobuffalo/tags v2.0.14+incompatible/go.mod h1:9XmhOkyaB7UzvuY4UoZO4s67q8/xRMVJEaakauVQYeY= -github.com/gobuffalo/tags v2.0.15+incompatible h1:qc5hMXPsXD+zYPSlNgqzlpVW7z/+GJEVCqn245BEUIY= -github.com/gobuffalo/tags v2.0.15+incompatible/go.mod h1:9XmhOkyaB7UzvuY4UoZO4s67q8/xRMVJEaakauVQYeY= -github.com/gobuffalo/uuid v2.0.3+incompatible/go.mod h1:ErhIzkRhm0FtRuiE/PeORqcw4cVi1RtSpnwYrxuvkfE= -github.com/gobuffalo/uuid v2.0.4+incompatible/go.mod h1:ErhIzkRhm0FtRuiE/PeORqcw4cVi1RtSpnwYrxuvkfE= -github.com/gobuffalo/uuid v2.0.5+incompatible h1:c5uWRuEnYggYCrT9AJm0U2v1QTG7OVDAvxhj8tIV5Gc= -github.com/gobuffalo/uuid v2.0.5+incompatible/go.mod h1:ErhIzkRhm0FtRuiE/PeORqcw4cVi1RtSpnwYrxuvkfE= -github.com/gobuffalo/validate v2.0.3+incompatible h1:6f4JCEz11Zi6iIlexMv7Jz10RBPvgI795AOaubtCwTE= -github.com/gobuffalo/validate v2.0.3+incompatible/go.mod h1:N+EtDe0J8252BgfzQUChBgfd6L93m9weay53EWFVsMM= -github.com/gobuffalo/x v0.0.0-20181003152136-452098b06085/go.mod h1:WevpGD+5YOreDJznWevcn8NTmQEW5STSBgIkpkjzqXc= -github.com/gobuffalo/x v0.0.0-20181007152206-913e47c59ca7/go.mod h1:9rDPXaB3kXdKWzMc4odGQQdG2e2DIEmANy5aSJ9yesY= -github.com/gofrs/uuid v3.1.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/gofrs/uuid v3.2.0+incompatible h1:y12jRkkFxsd7GpqdSZ+/KCs/fJbqpEXSGd4+jfEaewE= -github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/gobuffalo/logger v1.0.3 h1:YaXOTHNPCvkqqA7w05A4v0k2tCdpr+sgFlgINbQ6gqc= +github.com/gobuffalo/logger v1.0.3/go.mod h1:SoeejUwldiS7ZsyCBphOGURmWdwUFXs0J7TCjEhjKxM= +github.com/gobuffalo/packd v1.0.0 h1:6ERZvJHfe24rfFmA9OaoKBdC7+c9sydrytMg8SdFGBM= +github.com/gobuffalo/packd v1.0.0/go.mod h1:6VTc4htmJRFB7u1m/4LeMTWjFoYrUiBkU9Fdec9hrhI= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:tluoj9z5200jBnyusfRPU2LqT6J+DAorxEvtC7LHB+E= +github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/gomodule/redigo v2.0.0+incompatible/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= -github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/googleapis/gax-go v2.0.0+incompatible/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY= -github.com/googleapis/gax-go/v2 v2.0.3/go.mod h1:LLvjysVCY1JZeum8Z6l8qUty8fiNwE08qbEPm1M08qg= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= -github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/pat v0.0.0-20180118222023-199c85a7f6d1/go.mod h1:YeAe0gNeiNT5hoiZRI4yiOky6jVdNvfO2N6Kav/HmxY= -github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= -github.com/gorilla/sessions v1.1.2/go.mod h1:8KCfur6+4Mqcc6S0FEfKuN15Vl5MgXW92AE8ovaJD0w= -github.com/gorilla/sessions v1.1.3/go.mod h1:8KCfur6+4Mqcc6S0FEfKuN15Vl5MgXW92AE8ovaJD0w= -github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= -github.com/grpc-ecosystem/grpc-gateway v1.5.0/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= +github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/jackc/fake v0.0.0-20150926172116-812a484cc733/go.mod h1:WrMFNQdiFJ80sQsxDoMokWK1W5TQtxBFNpzWTD84ibQ= -github.com/jackc/pgx v3.2.0+incompatible/go.mod h1:0ZGrqGqkRlliWnWB4zKnWtjbSWbGkVEFm4TeybAXq+I= -github.com/jellevandenhooff/dkim v0.0.0-20150330215556-f50fe3d243e1/go.mod h1:E0B/fFc00Y+Rasa88328GlI/XbtyysCtTHZS8h7IrBU= -github.com/jmoiron/sqlx v0.0.0-20180614180643-0dae4fefe7c0/go.mod h1:IiEW3SEiiErVyFdH8NTuWjSifiEQKUoyK3LNqr2kCHU= -github.com/joho/godotenv v1.2.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= -github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc= -github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= -github.com/karrick/godirwalk v1.7.5/go.mod h1:2c9FRhkDxdIbgkOnCEvnSWs71Bhugbl46shStcFDJ34= -github.com/karrick/godirwalk v1.7.7/go.mod h1:2c9FRhkDxdIbgkOnCEvnSWs71Bhugbl46shStcFDJ34= -github.com/karrick/godirwalk v1.7.8 h1:VfG72pyIxgtC7+3X9CMHI0AOl4LwyRAg98WAgsvffi8= -github.com/karrick/godirwalk v1.7.8/go.mod h1:2c9FRhkDxdIbgkOnCEvnSWs71Bhugbl46shStcFDJ34= -github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= +github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/karrick/godirwalk v1.15.8 h1:7+rWAZPn9zuRxaIqqT8Ohs2Q2Ac0msBqwRdxNCr2VVs= +github.com/karrick/godirwalk v1.15.8/go.mod h1:j4mkqPuvaLI8mp1DroR3P6ad7cyYd4c1qeJ3RV7ULlk= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/konsorten/go-windows-terminal-sequences v0.0.0-20180402223658-b729f2633dfe/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.2 h1:DB17ag19krx9CFsz4o3enTrPXyIXCl+2iCXH/aMAp9s= +github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/pty v1.1.3/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/markbates/deplist v1.0.4/go.mod h1:gRRbPbbuA8TmMiRvaOzUlRfzfjeCCBqX2A6arxN01MM= -github.com/markbates/deplist v1.0.5/go.mod h1:gRRbPbbuA8TmMiRvaOzUlRfzfjeCCBqX2A6arxN01MM= -github.com/markbates/going v1.0.2/go.mod h1:UWCk3zm0UKefHZ7l8BNqi26UyiEMniznk8naLdTcy6c= -github.com/markbates/going v1.0.3/go.mod h1:fQiT6v6yQar9UD6bd/D4Z5Afbk9J6BBVBtLiyY4gp2o= -github.com/markbates/grift v1.0.4/go.mod h1:wbmtW74veyx+cgfwFhlnnMWqhoz55rnHR47oMXzsyVs= -github.com/markbates/hmax v1.0.0/go.mod h1:cOkR9dktiESxIMu+65oc/r/bdY4bE8zZw3OLhLx0X2c= -github.com/markbates/inflect v1.0.0/go.mod h1:oTeZL2KHA7CUX6X+fovmK9OvIOFuqu0TwdQrZjLTh88= -github.com/markbates/inflect v1.0.1/go.mod h1:uv3UVNBe5qBIfCm8O8Q+DW+S1EopeyINj+Ikhc7rnCk= -github.com/markbates/inflect v1.0.3/go.mod h1:1fR9+pO2KHEO9ZRtto13gDwwZaAKstQzferVeWqbgNs= -github.com/markbates/inflect v1.0.4 h1:5fh1gzTFhfae06u3hzHYO9xe3l3v3nW5Pwt3naLTP5g= -github.com/markbates/inflect v1.0.4/go.mod h1:1fR9+pO2KHEO9ZRtto13gDwwZaAKstQzferVeWqbgNs= -github.com/markbates/oncer v0.0.0-20180924031910-e862a676800b/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= -github.com/markbates/oncer v0.0.0-20180924034138-723ad0170a46/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= -github.com/markbates/oncer v0.0.0-20181014194634-05fccaae8fc4/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= -github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2 h1:JgVTCPf0uBVcUSWpyXmGpgOc62nK5HWUBKAGc3Qqa5k= -github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= -github.com/markbates/refresh v1.4.10/go.mod h1:NDPHvotuZmTmesXxr95C9bjlw1/0frJwtME2dzcVKhc= -github.com/markbates/safe v1.0.0/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= +github.com/markbates/errx v1.1.0 h1:QDFeR+UP95dO12JgW+tgi2UVfo0V8YBHiUIOaeBPiEI= +github.com/markbates/errx v1.1.0/go.mod h1:PLa46Oex9KNbVDZhKel8v1OT7hD5JZ2eI7AHhA0wswc= +github.com/markbates/oncer v1.0.0 h1:E83IaVAHygyndzPimgUYJjbshhDTALZyXxvk9FOlQRY= +github.com/markbates/oncer v1.0.0/go.mod h1:Z59JA581E9GP6w96jai+TGqafHPW+cPfRxz2aSZ0mcI= github.com/markbates/safe v1.0.1 h1:yjZkbvRM6IzKj9tlu/zMJLS0n/V351OZWRnF3QfaUxI= github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= -github.com/markbates/sigtx v1.0.0/go.mod h1:QF1Hv6Ic6Ca6W+T+DL0Y/ypborFKyvUY9HmuCD4VeTc= -github.com/markbates/willie v1.0.9/go.mod h1:fsrFVWl91+gXpx/6dv715j7i11fYPfZ9ZGfH0DQzY7w= -github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/microcosm-cc/bluemonday v1.0.1/go.mod h1:hsXNsILzKxV+sX77C5b8FSuKF00vh2OMYv+xgHpAMF4= -github.com/microcosm-cc/bluemonday v1.0.2 h1:5lPfLTTAvAbtS0VqT+94yOtFnGfUWYyx0+iToC3Os3s= -github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc= -github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/mapstructure v1.0.0/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/monoculum/formam v0.0.0-20180901015400-4e68be1d79ba/go.mod h1:RKgILGEJq24YyJ2ban8EO0RUVSJlF1pGsEvoLEACr/Q= -github.com/neelance/astrewrite v0.0.0-20160511093645-99348263ae86/go.mod h1:kHJEU3ofeGjhHklVoIGuVj85JJwZ6kWPaJwCIxgnFmo= -github.com/neelance/sourcemap v0.0.0-20151028013722-8c68805598ab/go.mod h1:Qr6/a/Q4r9LP1IltGz7tA7iOK1WonHEYhu1HRBA7ZiM= -github.com/nicksnyder/go-i18n v1.10.0/go.mod h1:HrK7VCrbOvQoUAQ7Vpy7i87N7JZZZ7R2xBGjv0j365Q= -github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= -github.com/onsi/gomega v1.4.2/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/rogpeppe/go-internal v1.0.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.2.2 h1:J7U/N7eRtzjhs26d6GqMh2HBuXP8/Z64Densiiieafo= -github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= -github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= -github.com/serenize/snaker v0.0.0-20171204205717-a683aaf2d516 h1:ofR1ZdrNSkiWcMsRrubK9tb2/SlZVWttAfqUjJi6QYc= -github.com/serenize/snaker v0.0.0-20171204205717-a683aaf2d516/go.mod h1:Yow6lPLSAXx2ifx470yD/nUe22Dv5vBvxK/UK9UUTVs= -github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= -github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= -github.com/shurcooL/component v0.0.0-20170202220835-f88ec8f54cc4/go.mod h1:XhFIlyj5a1fBNx5aJTbKoIq0mNaPvOagO+HjB3EtxrY= -github.com/shurcooL/events v0.0.0-20181021180414-410e4ca65f48/go.mod h1:5u70Mqkb5O5cxEA8nxTsgrgLehJeAw6Oc4Ab1c/P1HM= -github.com/shurcooL/github_flavored_markdown v0.0.0-20181002035957-2122de532470/go.mod h1:2dOwnU2uBioM+SGy2aZoq1f/Sd1l9OkAeAUvjSyvgU0= -github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= -github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ= -github.com/shurcooL/gofontwoff v0.0.0-20180329035133-29b52fc0a18d/go.mod h1:05UtEgK5zq39gLST6uB0cf3NEHjETfB4Fgr3Gx5R9Vw= -github.com/shurcooL/gopherjslib v0.0.0-20160914041154-feb6d3990c2c/go.mod h1:8d3azKNyqcHP1GaQE/c6dDgjkgSx2BZ4IoEi4F1reUI= -github.com/shurcooL/highlight_diff v0.0.0-20170515013008-09bb4053de1b/go.mod h1:ZpfEhSmds4ytuByIcDnOLkTHGUI6KNqRNPDLHDk+mUU= -github.com/shurcooL/highlight_go v0.0.0-20170515013102-78fb10f4a5f8/go.mod h1:UDKB5a1T23gOMUJrI+uSuH0VRDStOiUVSjBTRDVBVag= -github.com/shurcooL/highlight_go v0.0.0-20181028180052-98c3abbbae20/go.mod h1:UDKB5a1T23gOMUJrI+uSuH0VRDStOiUVSjBTRDVBVag= -github.com/shurcooL/home v0.0.0-20181020052607-80b7ffcb30f9/go.mod h1:+rgNQw2P9ARFAs37qieuu7ohDNQ3gds9msbT2yn85sg= -github.com/shurcooL/htmlg v0.0.0-20170918183704-d01228ac9e50/go.mod h1:zPn1wHpTIePGnXSHpsVPWEktKXHr6+SS6x/IKRb7cpw= -github.com/shurcooL/httperror v0.0.0-20170206035902-86b7830d14cc/go.mod h1:aYMfkZ6DWSJPJ6c4Wwz3QtW22G7mf/PEgaB9k/ik5+Y= -github.com/shurcooL/httpfs v0.0.0-20171119174359-809beceb2371/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg= -github.com/shurcooL/httpgzip v0.0.0-20180522190206-b1c53ac65af9/go.mod h1:919LwcH0M7/W4fcZ0/jy0qGght1GIhqyS/EgWGH2j5Q= -github.com/shurcooL/issues v0.0.0-20181008053335-6292fdc1e191/go.mod h1:e2qWDig5bLteJ4fwvDAc2NHzqFEthkqn7aOZAOpj+PQ= -github.com/shurcooL/issuesapp v0.0.0-20180602232740-048589ce2241/go.mod h1:NPpHK2TI7iSaM0buivtFUc9offApnI0Alt/K8hcHy0I= -github.com/shurcooL/notifications v0.0.0-20181007000457-627ab5aea122/go.mod h1:b5uSkrEVM1jQUspwbixRBhaIjIzL2xazXp6kntxYle0= -github.com/shurcooL/octicon v0.0.0-20180602230221-c42b0e3b24d9/go.mod h1:eWdoE5JD4R5UVWDucdOPg1g2fqQRq78IQa9zlOV1vpQ= -github.com/shurcooL/octicon v0.0.0-20181028054416-fa4f57f9efb2/go.mod h1:eWdoE5JD4R5UVWDucdOPg1g2fqQRq78IQa9zlOV1vpQ= -github.com/shurcooL/reactions v0.0.0-20181006231557-f2e0b4ca5b82/go.mod h1:TCR1lToEk4d2s07G3XGfz2QrgHXg4RJBvjrOozvoWfk= -github.com/shurcooL/sanitized_anchor_name v0.0.0-20170918181015-86672fcb3f95/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/shurcooL/users v0.0.0-20180125191416-49c67e49c537/go.mod h1:QJTqeLYEDaXHZDBsXlPCDqdhQuJkuw4NOtaxYe3xii4= -github.com/shurcooL/webdavfs v0.0.0-20170829043945-18c3829fa133/go.mod h1:hKmq5kWdCj2z2KEozexVbfEZIWiTjhE0+UjmZgPqehw= -github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= -github.com/sirupsen/logrus v1.1.0/go.mod h1:zrgwTnHtNr00buQ1vSptGe8m1f/BbgsPukg8qsT7A+A= -github.com/sirupsen/logrus v1.1.1/go.mod h1:zrgwTnHtNr00buQ1vSptGe8m1f/BbgsPukg8qsT7A+A= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/rogpeppe/go-internal v1.5.2 h1:qLvObTrvO/XRCqmkKxUlOBc48bI3efyDuAZe25QiF0w= +github.com/rogpeppe/go-internal v1.5.2/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.3.0 h1:hI/7Q+DtNZ2kINb6qt/lS+IyXnHQe9e90POfeewL/ME= -github.com/sirupsen/logrus v1.3.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d h1:yKm7XZV6j9Ev6lojP2XaIshpT4ymkqhMeSghO5Ps00E= -github.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d/go.mod h1:UdhH50NIW0fCiwBSr0co2m7BnFLdv4fQTgdqdJTHFeE= -github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e h1:qpG93cPwA5f7s/ZPBJnGOYQNK/vKsaDaseuKT5Asee8= -github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e/go.mod h1:HuIsMU8RRBOtsCgI77wP899iHVBQpCmg4ErYMZB+2IA= +github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.2.0/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= -github.com/spf13/cast v1.2.0/go.mod h1:r2rcYCSwa1IExKTDiTfzaxqT2FNHs8hODu4LnUfgKEg= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v0.0.3 h1:ZlrZ4XsMRm04Fr5pSFxBgfND2EBVa1nLpiy1stUsX/8= -github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/cobra v0.0.6 h1:breEStsVwemnKh2/s6gMvSdMEkwW0sK8vGStnlVBMCs= +github.com/spf13/cobra v0.0.6/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/pflag v1.0.2/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/viper v1.2.1/go.mod h1:P4AexN0a+C9tGAnUFNwDMYYZv3pjFuvmeiMyKRaNVlI= -github.com/spf13/viper v1.3.1/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= +github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA= -github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/unrolled/secure v0.0.0-20180918153822-f340ee86eb8b/go.mod h1:mnPT77IAdsi/kV7+Es7y+pXALeV3h7G6dQF6mNYjcLA= -github.com/unrolled/secure v0.0.0-20181005190816-ff9db2ff917f/go.mod h1:mnPT77IAdsi/kV7+Es7y+pXALeV3h7G6dQF6mNYjcLA= +github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= -go.opencensus.io v0.18.0/go.mod h1:vKdFvxhtzZ9onBp9VKHK8z/sRpBMnKAsufL7wlDrCOA= -go4.org v0.0.0-20180809161055-417644f6feb5/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE= -golang.org/x/build v0.0.0-20190111050920-041ab4dc3f9d/go.mod h1:OWs+y06UdEOHN4y+MfF/py+xQ/tYqIWW03b70/CG9Rw= +go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20180910181607-0e37d006457b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181001203147-e3636079e1a4/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181009213950-7c1a557ab941/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181015023909-0c41d7ab0a0e/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181024171144-74cb1d3d52f4/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181025113841-85e1b3f9139a/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181025213731-e84da0312774/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181106171534-e4dc69e5b2fd/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181112202954-3d3f9f413869/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181127143415-eb0de9b17e85/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190102171810-8d7daa0c54b3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190103213133-ff983b9c42bc/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67 h1:ng3VDlRp5/DHpSWl02R4rM9I+8M2rhmsuLwAMmkLQWE= -golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191122220453-ac88ee75c92c h1:/nJuwDLoL/zrqY6gf57vxC+Pi+pZ8bfhpPkicO5H7W4= +golang.org/x/crypto v0.0.0-20191122220453-ac88ee75c92c/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180816102801-aaf60122140d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180921000356-2f5d2388922f/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180926154720-4dfa2610cdf3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181011144130-49bb7cea24b1/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181017193950-04a2e542c03f/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181029044818-c44066c5c816/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181102091132-c10e9556a7bc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181106065722-10aee1819953/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181207154023-610586996380/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd h1:HuTn7WObtcDo9uEEU7rEqL0jYthdXAmZ6PP+meazmaU= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859 h1:R/3boaszxrf1GEUWTVDzSKVwLmSJpwZ1yqXm8j0v2QI= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/perf v0.0.0-20180704124530-6e6d33e29852/go.mod h1:JLpeXjPJfIyPr5TlbXLkXWLhP8nz10XfvxElABhCtcw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180816055513-1c9583448a9c/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e h1:vcxGaoTs7kV8m5Np9uUNQin4BrLOthgV7252N8V+FwY= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180906133057-8cf3aee42992/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180921163948-d47a0f339242/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180927150500-dad3d9fb7b6e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181005133103-4497e2df6f9e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181011152604-fa43e7bc11ba/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181022134430-8a28ead16f52/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181024145615-5cd93ef61a7c/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181025063200-d989b31c8746/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181026064943-731415f00dce/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181029174526-d69651ed3497/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181106135930-3a76605856fd/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181206074257-70b957f3b65e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190102155601-82a175fd1598/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190116161447-11f53e031339 h1:g/Jesu8+QLnA0CPzF3E1pURg0Byr7i6jLoX5sqjcAh0= -golang.org/x/sys v0.0.0-20190116161447-11f53e031339/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894 h1:Cz4ceDQGXuKRnVBDTS23GTn/pU5OE2C0WrNTOYK1Uuc= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181003024731-2f84ea8ef872/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181006002542-f60d9635b16a/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181008205924-a2b3f7f249e9/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181013182035-5e66757b835f/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181017214349-06f26fdaaa28/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181024171208-a2dc47679d30/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181026183834-f60e5f99f081/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181030000716-a0a13e073c7b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181105230042-78dc5bac0cac/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181107215632-34b416bd17b3/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181114190951-94339b83286c/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181119130350-139d099f6620/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181127195227-b4e97c0ed882/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181127232545-e782529d0ddd/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181203210056-e5f3ab76ea4b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181205224935-3576414c54a4/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181206194817-bcd4e47d0288/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181207183836-8bc39b988060/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181212172921-837e80568c09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190102213336-ca9055ed7d04/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190104182027-498d95493402/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190111214448-fc1d57b08d7b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190118193359-16909d206f00/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190124004107-78ee07aa9465/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190131142011-8dbcc66f33bb/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190206221403-44bcb96178d3/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190219185102-9394956cfdc5/go.mod h1:E6PF97AdD6v0s+fPshSmumCW1S1Ne85RbPQxELkKa44= -golang.org/x/tools v0.0.0-20190221204921-83362c3779f5 h1:ev5exjGDsOo0NPTB0qdCcE53BfWl1IICJlhgXgfT9fM= -golang.org/x/tools v0.0.0-20190221204921-83362c3779f5/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -google.golang.org/api v0.0.0-20180910000450-7ca32eb868bf/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= -google.golang.org/api v0.0.0-20181030000543-1d582fd0359e/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= -google.golang.org/api v0.1.0/go.mod h1:UGEZY7KEX120AnNLIHFMKIo4obdJhkp2tPbaPlQx13Y= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200308013534-11ec41452d41 h1:9Di9iYgOt9ThCipBxChBVhgNipDoE5mxO84rQV7D0FE= +golang.org/x/tools v0.0.0-20200308013534-11ec41452d41/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20181029155118-b69ba1387ce2/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20181202183823-bd91e49a0898/go.mod h1:7Ep/1NZk928CDR8SjdVbjWNpdIf6nzjE3BTgJDr2Atg= -google.golang.org/genproto v0.0.0-20190201180003-4b09977fb922/go.mod h1:L3J43x8/uS+qIUoksaLKe6OS3nUKxOKuIFz1sl2/jx4= -google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= -google.golang.org/grpc v1.16.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio= -google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= -gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= -gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc/go.mod h1:m7x9LTH6d71AHyAX77c9yqWCCa3UKHcVEj9y7hAtKDk= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= -gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df/go.mod h1:LRQQ+SO6ZHR7tOkpBDuZnXENFzX8qRjMDMyPD6BRkCw= -gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/mail.v2 v2.0.0-20180731213649-a0242b2233b4/go.mod h1:htwXN1Qh09vZJ1NVKxQqHPBaCBbzKhp5GzuJEA4VJWw= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -grpc.go4.org v0.0.0-20170609214715-11d0a25b4919/go.mod h1:77eQGdRu53HpSqPFJFmuJdjuHRquDANNeA4x7B8WQ9o= -honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -sourcegraph.com/sourcegraph/go-diff v0.5.0/go.mod h1:kuch7UrkMzY0X+p9CRK03kfuPQ2zzQcaEFbx8wA8rck= -sourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4/go.mod h1:ketZ/q3QxT9HOBeFhu6RdvsftgpsbFHBF5Cas6cDKZ0= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/vendor/github.com/gobuffalo/packr/v2/helpers.go b/vendor/github.com/gobuffalo/packr/v2/helpers.go index 3654dffa8..70dd07adf 100644 --- a/vendor/github.com/gobuffalo/packr/v2/helpers.go +++ b/vendor/github.com/gobuffalo/packr/v2/helpers.go @@ -6,7 +6,6 @@ import ( "runtime" "strings" - "github.com/gobuffalo/envy" "github.com/gobuffalo/packr/v2/plog" ) @@ -31,7 +30,7 @@ func resolutionDirTestFilename(filename, og string) (string, bool) { return ng, true } - ng = filepath.Join(envy.GoPath(), "src", ng) + ng = filepath.Join(os.Getenv("GOPATH"), "src", ng) if resolutionDirExists(ng, og) { return ng, true } diff --git a/vendor/github.com/gobuffalo/packr/v2/jam/parser/args.go b/vendor/github.com/gobuffalo/packr/v2/jam/parser/args.go index 5f042d15e..00ee164c7 100644 --- a/vendor/github.com/gobuffalo/packr/v2/jam/parser/args.go +++ b/vendor/github.com/gobuffalo/packr/v2/jam/parser/args.go @@ -2,8 +2,7 @@ package parser import ( "encoding/json" - - "github.com/pkg/errors" + "fmt" ) // FromArgs is useful when writing packr store-cmd binaries. @@ -36,11 +35,11 @@ import ( */ func FromArgs(args []string, fn func(Boxes) error) error { if len(args) == 0 { - return errors.New("you must supply a payload") + return fmt.Errorf("you must supply a payload") } payload := args[0] if len(payload) == 0 { - return errors.New("you must supply a payload") + return fmt.Errorf("you must supply a payload") } var boxes Boxes diff --git a/vendor/github.com/gobuffalo/packr/v2/jam/parser/finder.go b/vendor/github.com/gobuffalo/packr/v2/jam/parser/finder.go index 164638829..2ad808ea5 100644 --- a/vendor/github.com/gobuffalo/packr/v2/jam/parser/finder.go +++ b/vendor/github.com/gobuffalo/packr/v2/jam/parser/finder.go @@ -3,14 +3,15 @@ package parser import ( "fmt" "go/build" + "os" "path/filepath" "strings" "time" "github.com/gobuffalo/packr/v2/plog" "github.com/karrick/godirwalk" + "github.com/markbates/errx" "github.com/markbates/oncer" - "github.com/pkg/errors" ) type finder struct { @@ -33,6 +34,16 @@ func (fd *finder) findAllGoFiles(dir string) ([]string, error) { if ext != ".go" { return nil } + //check if path is a dir + fi, err := os.Stat(path) + if err != nil { + return nil + } + + if fi.IsDir() { + return nil + } + names = append(names, path) return nil } @@ -52,7 +63,7 @@ func (fd *finder) findAllGoFilesImports(dir string) ([]string, error) { ctx := build.Default if len(ctx.SrcDirs()) == 0 { - err = errors.New("no src directories found") + err = fmt.Errorf("no src directories found") return } @@ -63,8 +74,8 @@ func (fd *finder) findAllGoFilesImports(dir string) ([]string, error) { if err != nil { if !strings.Contains(err.Error(), "cannot find package") { - if _, ok := errors.Cause(err).(*build.NoGoError); !ok { - err = errors.WithStack(err) + if _, ok := errx.Unwrap(err).(*build.NoGoError); !ok { + err = err return } } diff --git a/vendor/github.com/gobuffalo/gogen/parsed_file.go b/vendor/github.com/gobuffalo/packr/v2/jam/parser/gogen.go similarity index 53% rename from vendor/github.com/gobuffalo/gogen/parsed_file.go rename to vendor/github.com/gobuffalo/packr/v2/jam/parser/gogen.go index 3fc330c16..5ba95de18 100644 --- a/vendor/github.com/gobuffalo/gogen/parsed_file.go +++ b/vendor/github.com/gobuffalo/packr/v2/jam/parser/gogen.go @@ -1,4 +1,4 @@ -package gogen +package parser import ( "go/ast" @@ -7,18 +7,20 @@ import ( "io" "strings" - "github.com/gobuffalo/genny" - "github.com/pkg/errors" + "github.com/gobuffalo/packd" + "github.com/markbates/errx" ) +// ParsedFile ... type ParsedFile struct { - File genny.File + File packd.SimpleFile FileSet *token.FileSet Ast *ast.File Lines []string } -func ParseFileMode(gf genny.File, mode parser.Mode) (ParsedFile, error) { +// ParseFileMode ... +func ParseFileMode(gf packd.SimpleFile, mode parser.Mode) (ParsedFile, error) { pf := ParsedFile{ FileSet: token.NewFileSet(), File: gf, @@ -26,8 +28,8 @@ func ParseFileMode(gf genny.File, mode parser.Mode) (ParsedFile, error) { src := gf.String() f, err := parser.ParseFile(pf.FileSet, gf.Name(), src, mode) - if err != nil && errors.Cause(err) != io.EOF { - return pf, errors.WithStack(err) + if err != nil && errx.Unwrap(err) != io.EOF { + return pf, err } pf.Ast = f @@ -35,6 +37,7 @@ func ParseFileMode(gf genny.File, mode parser.Mode) (ParsedFile, error) { return pf, nil } -func ParseFile(gf genny.File) (ParsedFile, error) { +// ParseFile ... +func ParseFile(gf packd.SimpleFile) (ParsedFile, error) { return ParseFileMode(gf, 0) } diff --git a/vendor/github.com/gobuffalo/packr/v2/jam/parser/parser.go b/vendor/github.com/gobuffalo/packr/v2/jam/parser/parser.go index 17c1516d8..fd5681d38 100644 --- a/vendor/github.com/gobuffalo/packr/v2/jam/parser/parser.go +++ b/vendor/github.com/gobuffalo/packr/v2/jam/parser/parser.go @@ -6,7 +6,6 @@ import ( "strings" "github.com/gobuffalo/packr/v2/plog" - "github.com/pkg/errors" ) // Parser to find boxes @@ -23,7 +22,7 @@ func (p *Parser) Run() (Boxes, error) { v := NewVisitor(pros) pbr, err := v.Run() if err != nil { - return boxes, errors.WithStack(err) + return boxes, err } for _, b := range pbr { plog.Debug(p, "Run", "file", pros.Name(), "box", b.Name) diff --git a/vendor/github.com/gobuffalo/packr/v2/jam/parser/prospect.go b/vendor/github.com/gobuffalo/packr/v2/jam/parser/prospect.go index d5421cc1d..652db5b3f 100644 --- a/vendor/github.com/gobuffalo/packr/v2/jam/parser/prospect.go +++ b/vendor/github.com/gobuffalo/packr/v2/jam/parser/prospect.go @@ -9,7 +9,7 @@ import ( "github.com/gobuffalo/packr/v2/plog" ) -var DefaultIgnoredFolders = []string{".", "_", "vendor", "node_modules", "_fixtures"} +var DefaultIgnoredFolders = []string{".", "_", "vendor", "node_modules", "_fixtures", "testdata"} func IsProspect(path string, ignore ...string) (status bool) { // plog.Debug("parser", "IsProspect", "path", path, "ignore", ignore) diff --git a/vendor/github.com/gobuffalo/packr/v2/jam/parser/roots.go b/vendor/github.com/gobuffalo/packr/v2/jam/parser/roots.go index 777f535de..a55018225 100644 --- a/vendor/github.com/gobuffalo/packr/v2/jam/parser/roots.go +++ b/vendor/github.com/gobuffalo/packr/v2/jam/parser/roots.go @@ -10,7 +10,6 @@ import ( "github.com/gobuffalo/packr/v2/plog" "github.com/karrick/godirwalk" - "github.com/pkg/errors" ) type RootsOptions struct { @@ -57,7 +56,7 @@ func NewFromRoots(roots []string, opts *RootsOptions) (*Parser, error) { plog.Debug(p, "NewFromRoots", "walking", root) err := godirwalk.Walk(root, wopts) if err != nil { - return p, errors.WithStack(err) + return p, err } } @@ -81,7 +80,7 @@ func NewFromRoots(roots []string, opts *RootsOptions) (*Parser, error) { plog.Debug(p, "NewFromRoots", "reading file", path) b, err := ioutil.ReadFile(path) if err != nil { - return nil, errors.WithStack(err) + return nil, err } p.Prospects = append(p.Prospects, NewFile(path, bytes.NewReader(b))) } diff --git a/vendor/github.com/gobuffalo/packr/v2/jam/parser/visitor.go b/vendor/github.com/gobuffalo/packr/v2/jam/parser/visitor.go index 47b0c9ecf..d41ac498b 100644 --- a/vendor/github.com/gobuffalo/packr/v2/jam/parser/visitor.go +++ b/vendor/github.com/gobuffalo/packr/v2/jam/parser/visitor.go @@ -8,13 +8,11 @@ import ( "sort" "strings" - "github.com/gobuffalo/genny" - "github.com/gobuffalo/gogen" - "github.com/pkg/errors" + "github.com/gobuffalo/packd" ) type Visitor struct { - File genny.File + File packd.SimpleFile Package string boxes map[string]*Box errors []error @@ -30,9 +28,9 @@ func NewVisitor(f *File) *Visitor { func (v *Visitor) Run() (Boxes, error) { var boxes Boxes - pf, err := gogen.ParseFile(v.File) + pf, err := ParseFile(v.File) if err != nil { - return boxes, errors.Wrap(err, v.File.Name()) + return boxes, err } v.Package = pf.Ast.Name.Name @@ -51,7 +49,7 @@ func (v *Visitor) Run() (Boxes, error) { for i, e := range v.errors { s[i] = e.Error() } - return boxes, errors.Wrap(errors.New(strings.Join(s, "\n")), v.File.Name()) + return boxes, err } return boxes, nil } @@ -76,7 +74,7 @@ func (v *Visitor) eval(node ast.Node) error { case *ast.GenDecl: for _, n := range t.Specs { if err := v.eval(n); err != nil { - return errors.WithStack(err) + return err } } case *ast.FuncDecl: @@ -85,14 +83,14 @@ func (v *Visitor) eval(node ast.Node) error { } for _, b := range t.Body.List { if err := v.evalStmt(b); err != nil { - return errors.WithStack(err) + return err } } return nil case *ast.ValueSpec: for _, e := range t.Values { if err := v.evalExpr(e); err != nil { - return errors.WithStack(err) + return err } } } @@ -106,7 +104,7 @@ func (v *Visitor) evalStmt(stmt ast.Stmt) error { case *ast.AssignStmt: for _, e := range t.Rhs { if err := v.evalArgs(e); err != nil { - return errors.WithStack(err) + return err } } } @@ -127,12 +125,12 @@ func (v *Visitor) evalExpr(expr ast.Expr) error { } if err := v.evalArgs(at); err != nil { - return errors.WithStack(err) + return err } case *ast.CompositeLit: for _, e := range at.Elts { if err := v.evalExpr(e); err != nil { - return errors.WithStack(err) + return err } } } @@ -151,7 +149,7 @@ func (v *Visitor) evalArgs(expr ast.Expr) error { case *ast.CompositeLit: for _, e := range at.Elts { if err := v.evalExpr(e); err != nil { - return errors.WithStack(err) + return err } } case *ast.CallExpr: @@ -161,14 +159,14 @@ func (v *Visitor) evalArgs(expr ast.Expr) error { switch st := at.Fun.(type) { case *ast.SelectorExpr: if err := v.evalSelector(at, st); err != nil { - return errors.WithStack(err) + return err } case *ast.Ident: return v.evalIdent(st) } for _, a := range at.Args { if err := v.evalArgs(a); err != nil { - return errors.WithStack(err) + return err } } } @@ -184,7 +182,7 @@ func (v *Visitor) evalSelector(expr *ast.CallExpr, sel *ast.SelectorExpr) error switch sel.Sel.Name { case "New": if len(expr.Args) != 2 { - return errors.New("`New` requires two arguments") + return fmt.Errorf("`New` requires two arguments") } zz := func(e ast.Expr) (string, error) { @@ -206,16 +204,16 @@ func (v *Visitor) evalSelector(expr *ast.CallExpr, sel *ast.SelectorExpr) error case *ast.CallExpr: return "", v.evalExpr(at) } - return "", errors.Errorf("can't handle %T", e) + return "", fmt.Errorf("can't handle %T", e) } k1, err := zz(expr.Args[0]) if err != nil { - return errors.WithStack(err) + return err } k2, err := zz(expr.Args[1]) if err != nil { - return errors.WithStack(err) + return err } v.addBox(k1, k2) @@ -288,7 +286,7 @@ func (v *Visitor) fromVariable(as *ast.AssignStmt) (string, error) { return bs.Value, nil } } - return "", errors.Wrap(errors.New("unable to find value from variable"), fmt.Sprint(as)) + return "", fmt.Errorf("unable to find value from variable %v", as) } func (v *Visitor) addVariable(bn string, as *ast.AssignStmt) error { @@ -309,7 +307,7 @@ func (v *Visitor) fromConstant(vs *ast.ValueSpec) (string, error) { return bs.Value, nil } } - return "", errors.Wrap(errors.New("unable to find value from constant"), fmt.Sprint(vs)) + return "", fmt.Errorf("unable to find value from constant %v", vs) } func (v *Visitor) addConstant(bn string, vs *ast.ValueSpec) error { diff --git a/vendor/github.com/gobuffalo/packr/v2/packr.go b/vendor/github.com/gobuffalo/packr/v2/packr.go index fc43f9d37..f0f88f12f 100644 --- a/vendor/github.com/gobuffalo/packr/v2/packr.go +++ b/vendor/github.com/gobuffalo/packr/v2/packr.go @@ -1,11 +1,12 @@ package packr import ( + "fmt" + "github.com/gobuffalo/packr/v2/file/resolver" "github.com/gobuffalo/packr/v2/jam/parser" "github.com/gobuffalo/packr/v2/plog" "github.com/markbates/safe" - "github.com/pkg/errors" ) var boxes = &boxMap{} @@ -39,7 +40,7 @@ func findBox(name string) (*Box, error) { b, ok := boxes.Load(key) if !ok { plog.Debug("packr", "findBox", "name", name, "key", key, "found", ok) - return nil, errors.Errorf("could not find box %s", name) + return nil, fmt.Errorf("could not find box %s", name) } plog.Debug(b, "found", "box", b) diff --git a/vendor/github.com/gobuffalo/packr/v2/pointer.go b/vendor/github.com/gobuffalo/packr/v2/pointer.go index 10ef1cd05..6e839dc1a 100644 --- a/vendor/github.com/gobuffalo/packr/v2/pointer.go +++ b/vendor/github.com/gobuffalo/packr/v2/pointer.go @@ -4,7 +4,6 @@ import ( "github.com/gobuffalo/packr/v2/file" "github.com/gobuffalo/packr/v2/file/resolver" "github.com/gobuffalo/packr/v2/plog" - "github.com/pkg/errors" ) // Pointer is a resolvr which resolves @@ -22,11 +21,11 @@ func (p Pointer) Resolve(box string, path string) (file.File, error) { plog.Debug(p, "Resolve", "box", box, "path", path, "forward-box", p.ForwardBox, "forward-path", p.ForwardPath) b, err := findBox(p.ForwardBox) if err != nil { - return nil, errors.WithStack(err) + return nil, err } f, err := b.Resolve(p.ForwardPath) if err != nil { - return f, errors.WithStack(errors.Wrap(err, path)) + return f, err } plog.Debug(p, "Resolve", "box", box, "path", path, "file", f) return file.NewFileR(path, f) diff --git a/vendor/github.com/gobuffalo/packr/v2/version.go b/vendor/github.com/gobuffalo/packr/v2/version.go index f42e20d08..58e006556 100644 --- a/vendor/github.com/gobuffalo/packr/v2/version.go +++ b/vendor/github.com/gobuffalo/packr/v2/version.go @@ -1,4 +1,4 @@ package packr // Version of Packr -const Version = "v2.0.2" +const Version = "v2.8.1" diff --git a/vendor/github.com/gobuffalo/packr/v2/walk.go b/vendor/github.com/gobuffalo/packr/v2/walk.go index 40cd1f375..514631c26 100644 --- a/vendor/github.com/gobuffalo/packr/v2/walk.go +++ b/vendor/github.com/gobuffalo/packr/v2/walk.go @@ -8,7 +8,6 @@ import ( "github.com/gobuffalo/packr/v2/file" "github.com/gobuffalo/packr/v2/file/resolver" "github.com/gobuffalo/packr/v2/plog" - "github.com/pkg/errors" ) // WalkFunc is used to walk a box @@ -47,7 +46,7 @@ func (b *Box) Walk(wf WalkFunc) error { return true }) if err != nil { - return errors.WithStack(err) + return err } var keys = make([]string, 0, len(m)) @@ -60,7 +59,7 @@ func (b *Box) Walk(wf WalkFunc) error { osPath := resolver.OsPath(k) plog.Debug(b, "Walk", "path", k, "osPath", osPath) if err := wf(osPath, m[k]); err != nil { - return errors.WithStack(err) + return err } } return nil @@ -73,7 +72,7 @@ func (b *Box) WalkPrefix(prefix string, wf WalkFunc) error { ipath := resolver.OsPath(path) if strings.HasPrefix(ipath, ipref) { if err := wf(path, f); err != nil { - return errors.WithStack(err) + return err } } return nil diff --git a/vendor/github.com/gobuffalo/syncx/.gitignore b/vendor/github.com/gobuffalo/syncx/.gitignore deleted file mode 100644 index 368971859..000000000 --- a/vendor/github.com/gobuffalo/syncx/.gitignore +++ /dev/null @@ -1,29 +0,0 @@ -*.log -.DS_Store -doc -tmp -pkg -*.gem -*.pid -coverage -coverage.data -build/* -*.pbxuser -*.mode1v3 -.svn -profile -.console_history -.sass-cache/* -.rake_tasks~ -*.log.lck -solr/ -.jhw-cache/ -jhw.* -*.sublime* -node_modules/ -dist/ -generated/ -.vendor/ -bin/* -gin-bin -.idea/ diff --git a/vendor/github.com/gobuffalo/syncx/.gometalinter.json b/vendor/github.com/gobuffalo/syncx/.gometalinter.json deleted file mode 100644 index e4f65a36e..000000000 --- a/vendor/github.com/gobuffalo/syncx/.gometalinter.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "Enable": ["vet", "golint", "goimports", "deadcode", "gotype", "ineffassign", "misspell", "nakedret", "unconvert", "megacheck", "varcheck"] -} diff --git a/vendor/github.com/gobuffalo/syncx/.travis.yml b/vendor/github.com/gobuffalo/syncx/.travis.yml deleted file mode 100644 index 1fb041a25..000000000 --- a/vendor/github.com/gobuffalo/syncx/.travis.yml +++ /dev/null @@ -1,36 +0,0 @@ -language: go - -sudo: false - -matrix: - include: - - os: linux - go: "1.9.x" - - os: windows - go: "1.9.x" - - os: linux - go: "1.10.x" - - os: windows - go: "1.10.x" - - os: linux - go: "1.11.x" - env: - - GO111MODULE=off - - os: windows - go: "1.11.x" - env: - - GO111MODULE=off - - os: linux - go: "1.11.x" - env: - - GO111MODULE=on - - os: windows - go: "1.11.x" - env: - - GO111MODULE=on - -install: false - -script: - - go get -v -t ./... - - go test -v -timeout=5s -race ./... diff --git a/vendor/github.com/gobuffalo/syncx/LICENSE b/vendor/github.com/gobuffalo/syncx/LICENSE deleted file mode 100644 index a538bcbf2..000000000 --- a/vendor/github.com/gobuffalo/syncx/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2018 Mark Bates - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/vendor/github.com/gobuffalo/syncx/README.md b/vendor/github.com/gobuffalo/syncx/README.md deleted file mode 100644 index 0f0d02b20..000000000 --- a/vendor/github.com/gobuffalo/syncx/README.md +++ /dev/null @@ -1,18 +0,0 @@ -

    - -

    -GoDoc -Go Report Card -

    - -# github.com/gobuffalo/syncx - -This package provides a set of types and tools for working in current environments. - -See [https://godoc.org/github.com/gobuffalo/syncx](https://godoc.org/github.com/gobuffalo/syncx) for more details. - -# Installation - -```bash -$ go get github.com/gobuffalo/syncx -``` diff --git a/vendor/github.com/gobuffalo/syncx/go.mod b/vendor/github.com/gobuffalo/syncx/go.mod deleted file mode 100644 index 7474082fa..000000000 --- a/vendor/github.com/gobuffalo/syncx/go.mod +++ /dev/null @@ -1,7 +0,0 @@ -module github.com/gobuffalo/syncx - -require ( - github.com/davecgh/go-spew v1.1.1 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/stretchr/testify v1.2.2 -) diff --git a/vendor/github.com/gobuffalo/syncx/go.sum b/vendor/github.com/gobuffalo/syncx/go.sum deleted file mode 100644 index e03ee77d9..000000000 --- a/vendor/github.com/gobuffalo/syncx/go.sum +++ /dev/null @@ -1,6 +0,0 @@ -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= diff --git a/vendor/github.com/gobuffalo/syncx/int_map.go b/vendor/github.com/gobuffalo/syncx/int_map.go deleted file mode 100644 index f6eba4dce..000000000 --- a/vendor/github.com/gobuffalo/syncx/int_map.go +++ /dev/null @@ -1,73 +0,0 @@ -//go:generate mapgen -name "Int" -zero "0" -go-type "int" -pkg "" -a "0" -b "1" -c "2" -bb "-1" -destination "syncx" -// Code generated by github.com/gobuffalo/mapgen. DO NOT EDIT. - -package syncx - -import ( - "sort" - "sync" -) - -// IntMap wraps sync.Map and uses the following types: -// key: string -// value: int -type IntMap struct { - data sync.Map -} - -// Delete the key from the map -func (m *IntMap) Delete(key string) { - m.data.Delete(key) -} - -// Load the key from the map. -// Returns int or bool. -// A false return indicates either the key was not found -// or the value is not of type int -func (m *IntMap) Load(key string) (int, bool) { - i, ok := m.data.Load(key) - if !ok { - return 0, false - } - s, ok := i.(int) - return s, ok -} - -// LoadOrStore will return an existing key or -// store the value if not already in the map -func (m *IntMap) LoadOrStore(key string, value int) (int, bool) { - i, _ := m.data.LoadOrStore(key, value) - s, ok := i.(int) - return s, ok -} - -// Range over the int values in the map -func (m *IntMap) Range(f func(key string, value int) bool) { - m.data.Range(func(k, v interface{}) bool { - key, ok := k.(string) - if !ok { - return false - } - value, ok := v.(int) - if !ok { - return false - } - return f(key, value) - }) -} - -// Store a int in the map -func (m *IntMap) Store(key string, value int) { - m.data.Store(key, value) -} - -// Keys returns a list of keys in the map -func (m *IntMap) Keys() []string { - var keys []string - m.Range(func(key string, value int) bool { - keys = append(keys, key) - return true - }) - sort.Strings(keys) - return keys -} diff --git a/vendor/github.com/gobuffalo/syncx/interface_map.go b/vendor/github.com/gobuffalo/syncx/interface_map.go deleted file mode 100644 index 93376135d..000000000 --- a/vendor/github.com/gobuffalo/syncx/interface_map.go +++ /dev/null @@ -1,73 +0,0 @@ -//go:generate mapgen -name "" -zero "nil" -go-type "interface{}" -pkg "" -a "0" -b "1" -c "2" -bb "-1" -destination "syncx" -// Code generated by github.com/gobuffalo/mapgen. DO NOT EDIT. - -package syncx - -import ( - "sort" - "sync" -) - -// Map wraps sync.Map and uses the following types: -// key: string -// value: interface{} -type Map struct { - data sync.Map -} - -// Delete the key from the map -func (m *Map) Delete(key string) { - m.data.Delete(key) -} - -// Load the key from the map. -// Returns interface{} or bool. -// A false return indicates either the key was not found -// or the value is not of type interface{} -func (m *Map) Load(key string) (interface{}, bool) { - i, ok := m.data.Load(key) - if !ok { - return nil, false - } - s, ok := i.(interface{}) - return s, ok -} - -// LoadOrStore will return an existing key or -// store the value if not already in the map -func (m *Map) LoadOrStore(key string, value interface{}) (interface{}, bool) { - i, _ := m.data.LoadOrStore(key, value) - s, ok := i.(interface{}) - return s, ok -} - -// Range over the interface{} values in the map -func (m *Map) Range(f func(key string, value interface{}) bool) { - m.data.Range(func(k, v interface{}) bool { - key, ok := k.(string) - if !ok { - return false - } - value, ok := v.(interface{}) - if !ok { - return false - } - return f(key, value) - }) -} - -// Store a interface{} in the map -func (m *Map) Store(key string, value interface{}) { - m.data.Store(key, value) -} - -// Keys returns a list of keys in the map -func (m *Map) Keys() []string { - var keys []string - m.Range(func(key string, value interface{}) bool { - keys = append(keys, key) - return true - }) - sort.Strings(keys) - return keys -} diff --git a/vendor/github.com/gobuffalo/syncx/string_map.go b/vendor/github.com/gobuffalo/syncx/string_map.go deleted file mode 100644 index 2bb37cf4b..000000000 --- a/vendor/github.com/gobuffalo/syncx/string_map.go +++ /dev/null @@ -1,73 +0,0 @@ -//go:generate mapgen -name "String" -zero "``" -go-type "string" -pkg "" -a "`A`" -b "`B`" -c "`C`" -bb "`BB`" -destination "syncx" -// Code generated by github.com/gobuffalo/mapgen. DO NOT EDIT. - -package syncx - -import ( - "sort" - "sync" -) - -// StringMap wraps sync.Map and uses the following types: -// key: string -// value: string -type StringMap struct { - data sync.Map -} - -// Delete the key from the map -func (m *StringMap) Delete(key string) { - m.data.Delete(key) -} - -// Load the key from the map. -// Returns string or bool. -// A false return indicates either the key was not found -// or the value is not of type string -func (m *StringMap) Load(key string) (string, bool) { - i, ok := m.data.Load(key) - if !ok { - return ``, false - } - s, ok := i.(string) - return s, ok -} - -// LoadOrStore will return an existing key or -// store the value if not already in the map -func (m *StringMap) LoadOrStore(key string, value string) (string, bool) { - i, _ := m.data.LoadOrStore(key, value) - s, ok := i.(string) - return s, ok -} - -// Range over the string values in the map -func (m *StringMap) Range(f func(key string, value string) bool) { - m.data.Range(func(k, v interface{}) bool { - key, ok := k.(string) - if !ok { - return false - } - value, ok := v.(string) - if !ok { - return false - } - return f(key, value) - }) -} - -// Store a string in the map -func (m *StringMap) Store(key string, value string) { - m.data.Store(key, value) -} - -// Keys returns a list of keys in the map -func (m *StringMap) Keys() []string { - var keys []string - m.Range(func(key string, value string) bool { - keys = append(keys, key) - return true - }) - sort.Strings(keys) - return keys -} diff --git a/vendor/github.com/gobuffalo/syncx/version.go b/vendor/github.com/gobuffalo/syncx/version.go deleted file mode 100644 index 97ee3e4ca..000000000 --- a/vendor/github.com/gobuffalo/syncx/version.go +++ /dev/null @@ -1,4 +0,0 @@ -package syncx - -// Version of syncx -const Version = "v0.0.1" diff --git a/vendor/github.com/joho/godotenv/.gitignore b/vendor/github.com/joho/godotenv/.gitignore deleted file mode 100644 index e43b0f988..000000000 --- a/vendor/github.com/joho/godotenv/.gitignore +++ /dev/null @@ -1 +0,0 @@ -.DS_Store diff --git a/vendor/github.com/joho/godotenv/.travis.yml b/vendor/github.com/joho/godotenv/.travis.yml deleted file mode 100644 index f0db1adcd..000000000 --- a/vendor/github.com/joho/godotenv/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: go - -go: - - 1.x - -os: - - linux - - osx diff --git a/vendor/github.com/joho/godotenv/LICENCE b/vendor/github.com/joho/godotenv/LICENCE deleted file mode 100644 index e7ddd51be..000000000 --- a/vendor/github.com/joho/godotenv/LICENCE +++ /dev/null @@ -1,23 +0,0 @@ -Copyright (c) 2013 John Barton - -MIT License - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/vendor/github.com/joho/godotenv/README.md b/vendor/github.com/joho/godotenv/README.md deleted file mode 100644 index 4e8fcf2e9..000000000 --- a/vendor/github.com/joho/godotenv/README.md +++ /dev/null @@ -1,163 +0,0 @@ -# GoDotEnv [![Build Status](https://travis-ci.org/joho/godotenv.svg?branch=master)](https://travis-ci.org/joho/godotenv) [![Build status](https://ci.appveyor.com/api/projects/status/9v40vnfvvgde64u4?svg=true)](https://ci.appveyor.com/project/joho/godotenv) [![Go Report Card](https://goreportcard.com/badge/github.com/joho/godotenv)](https://goreportcard.com/report/github.com/joho/godotenv) - -A Go (golang) port of the Ruby dotenv project (which loads env vars from a .env file) - -From the original Library: - -> Storing configuration in the environment is one of the tenets of a twelve-factor app. Anything that is likely to change between deployment environments–such as resource handles for databases or credentials for external services–should be extracted from the code into environment variables. -> -> But it is not always practical to set environment variables on development machines or continuous integration servers where multiple projects are run. Dotenv load variables from a .env file into ENV when the environment is bootstrapped. - -It can be used as a library (for loading in env for your own daemons etc) or as a bin command. - -There is test coverage and CI for both linuxish and windows environments, but I make no guarantees about the bin version working on windows. - -## Installation - -As a library - -```shell -go get github.com/joho/godotenv -``` - -or if you want to use it as a bin command -```shell -go get github.com/joho/godotenv/cmd/godotenv -``` - -## Usage - -Add your application configuration to your `.env` file in the root of your project: - -```shell -S3_BUCKET=YOURS3BUCKET -SECRET_KEY=YOURSECRETKEYGOESHERE -``` - -Then in your Go app you can do something like - -```go -package main - -import ( - "github.com/joho/godotenv" - "log" - "os" -) - -func main() { - err := godotenv.Load() - if err != nil { - log.Fatal("Error loading .env file") - } - - s3Bucket := os.Getenv("S3_BUCKET") - secretKey := os.Getenv("SECRET_KEY") - - // now do something with s3 or whatever -} -``` - -If you're even lazier than that, you can just take advantage of the autoload package which will read in `.env` on import - -```go -import _ "github.com/joho/godotenv/autoload" -``` - -While `.env` in the project root is the default, you don't have to be constrained, both examples below are 100% legit - -```go -_ = godotenv.Load("somerandomfile") -_ = godotenv.Load("filenumberone.env", "filenumbertwo.env") -``` - -If you want to be really fancy with your env file you can do comments and exports (below is a valid env file) - -```shell -# I am a comment and that is OK -SOME_VAR=someval -FOO=BAR # comments at line end are OK too -export BAR=BAZ -``` - -Or finally you can do YAML(ish) style - -```yaml -FOO: bar -BAR: baz -``` - -as a final aside, if you don't want godotenv munging your env you can just get a map back instead - -```go -var myEnv map[string]string -myEnv, err := godotenv.Read() - -s3Bucket := myEnv["S3_BUCKET"] -``` - -... or from an `io.Reader` instead of a local file - -```go -reader := getRemoteFile() -myEnv, err := godotenv.Parse(reader) -``` - -... or from a `string` if you so desire - -```go -content := getRemoteFileContent() -myEnv, err := godotenv.Unmarshal(content) -``` - -### Command Mode - -Assuming you've installed the command as above and you've got `$GOPATH/bin` in your `$PATH` - -``` -godotenv -f /some/path/to/.env some_command with some args -``` - -If you don't specify `-f` it will fall back on the default of loading `.env` in `PWD` - -### Writing Env Files - -Godotenv can also write a map representing the environment to a correctly-formatted and escaped file - -```go -env, err := godotenv.Unmarshal("KEY=value") -err := godotenv.Write(env, "./.env") -``` - -... or to a string - -```go -env, err := godotenv.Unmarshal("KEY=value") -content, err := godotenv.Marshal(env) -``` - -## Contributing - -Contributions are most welcome! The parser itself is pretty stupidly naive and I wouldn't be surprised if it breaks with edge cases. - -*code changes without tests will not be accepted* - -1. Fork it -2. Create your feature branch (`git checkout -b my-new-feature`) -3. Commit your changes (`git commit -am 'Added some feature'`) -4. Push to the branch (`git push origin my-new-feature`) -5. Create new Pull Request - -## Releases - -Releases should follow [Semver](http://semver.org/) though the first couple of releases are `v1` and `v1.1`. - -Use [annotated tags for all releases](https://github.com/joho/godotenv/issues/30). Example `git tag -a v1.2.1` - -## CI - -Linux: [![Build Status](https://travis-ci.org/joho/godotenv.svg?branch=master)](https://travis-ci.org/joho/godotenv) Windows: [![Build status](https://ci.appveyor.com/api/projects/status/9v40vnfvvgde64u4)](https://ci.appveyor.com/project/joho/godotenv) - -## Who? - -The original library [dotenv](https://github.com/bkeepers/dotenv) was written by [Brandon Keepers](http://opensoul.org/), and this port was done by [John Barton](https://johnbarton.co/) based off the tests/fixtures in the original library. diff --git a/vendor/github.com/joho/godotenv/godotenv.go b/vendor/github.com/joho/godotenv/godotenv.go deleted file mode 100644 index 29b436c77..000000000 --- a/vendor/github.com/joho/godotenv/godotenv.go +++ /dev/null @@ -1,346 +0,0 @@ -// Package godotenv is a go port of the ruby dotenv library (https://github.com/bkeepers/dotenv) -// -// Examples/readme can be found on the github page at https://github.com/joho/godotenv -// -// The TL;DR is that you make a .env file that looks something like -// -// SOME_ENV_VAR=somevalue -// -// and then in your go code you can call -// -// godotenv.Load() -// -// and all the env vars declared in .env will be available through os.Getenv("SOME_ENV_VAR") -package godotenv - -import ( - "bufio" - "errors" - "fmt" - "io" - "os" - "os/exec" - "regexp" - "sort" - "strings" -) - -const doubleQuoteSpecialChars = "\\\n\r\"!$`" - -// Load will read your env file(s) and load them into ENV for this process. -// -// Call this function as close as possible to the start of your program (ideally in main) -// -// If you call Load without any args it will default to loading .env in the current path -// -// You can otherwise tell it which files to load (there can be more than one) like -// -// godotenv.Load("fileone", "filetwo") -// -// It's important to note that it WILL NOT OVERRIDE an env variable that already exists - consider the .env file to set dev vars or sensible defaults -func Load(filenames ...string) (err error) { - filenames = filenamesOrDefault(filenames) - - for _, filename := range filenames { - err = loadFile(filename, false) - if err != nil { - return // return early on a spazout - } - } - return -} - -// Overload will read your env file(s) and load them into ENV for this process. -// -// Call this function as close as possible to the start of your program (ideally in main) -// -// If you call Overload without any args it will default to loading .env in the current path -// -// You can otherwise tell it which files to load (there can be more than one) like -// -// godotenv.Overload("fileone", "filetwo") -// -// It's important to note this WILL OVERRIDE an env variable that already exists - consider the .env file to forcefilly set all vars. -func Overload(filenames ...string) (err error) { - filenames = filenamesOrDefault(filenames) - - for _, filename := range filenames { - err = loadFile(filename, true) - if err != nil { - return // return early on a spazout - } - } - return -} - -// Read all env (with same file loading semantics as Load) but return values as -// a map rather than automatically writing values into env -func Read(filenames ...string) (envMap map[string]string, err error) { - filenames = filenamesOrDefault(filenames) - envMap = make(map[string]string) - - for _, filename := range filenames { - individualEnvMap, individualErr := readFile(filename) - - if individualErr != nil { - err = individualErr - return // return early on a spazout - } - - for key, value := range individualEnvMap { - envMap[key] = value - } - } - - return -} - -// Parse reads an env file from io.Reader, returning a map of keys and values. -func Parse(r io.Reader) (envMap map[string]string, err error) { - envMap = make(map[string]string) - - var lines []string - scanner := bufio.NewScanner(r) - for scanner.Scan() { - lines = append(lines, scanner.Text()) - } - - if err = scanner.Err(); err != nil { - return - } - - for _, fullLine := range lines { - if !isIgnoredLine(fullLine) { - var key, value string - key, value, err = parseLine(fullLine, envMap) - - if err != nil { - return - } - envMap[key] = value - } - } - return -} - -//Unmarshal reads an env file from a string, returning a map of keys and values. -func Unmarshal(str string) (envMap map[string]string, err error) { - return Parse(strings.NewReader(str)) -} - -// Exec loads env vars from the specified filenames (empty map falls back to default) -// then executes the cmd specified. -// -// Simply hooks up os.Stdin/err/out to the command and calls Run() -// -// If you want more fine grained control over your command it's recommended -// that you use `Load()` or `Read()` and the `os/exec` package yourself. -func Exec(filenames []string, cmd string, cmdArgs []string) error { - Load(filenames...) - - command := exec.Command(cmd, cmdArgs...) - command.Stdin = os.Stdin - command.Stdout = os.Stdout - command.Stderr = os.Stderr - return command.Run() -} - -// Write serializes the given environment and writes it to a file -func Write(envMap map[string]string, filename string) error { - content, error := Marshal(envMap) - if error != nil { - return error - } - file, error := os.Create(filename) - if error != nil { - return error - } - _, err := file.WriteString(content) - return err -} - -// Marshal outputs the given environment as a dotenv-formatted environment file. -// Each line is in the format: KEY="VALUE" where VALUE is backslash-escaped. -func Marshal(envMap map[string]string) (string, error) { - lines := make([]string, 0, len(envMap)) - for k, v := range envMap { - lines = append(lines, fmt.Sprintf(`%s="%s"`, k, doubleQuoteEscape(v))) - } - sort.Strings(lines) - return strings.Join(lines, "\n"), nil -} - -func filenamesOrDefault(filenames []string) []string { - if len(filenames) == 0 { - return []string{".env"} - } - return filenames -} - -func loadFile(filename string, overload bool) error { - envMap, err := readFile(filename) - if err != nil { - return err - } - - currentEnv := map[string]bool{} - rawEnv := os.Environ() - for _, rawEnvLine := range rawEnv { - key := strings.Split(rawEnvLine, "=")[0] - currentEnv[key] = true - } - - for key, value := range envMap { - if !currentEnv[key] || overload { - os.Setenv(key, value) - } - } - - return nil -} - -func readFile(filename string) (envMap map[string]string, err error) { - file, err := os.Open(filename) - if err != nil { - return - } - defer file.Close() - - return Parse(file) -} - -func parseLine(line string, envMap map[string]string) (key string, value string, err error) { - if len(line) == 0 { - err = errors.New("zero length string") - return - } - - // ditch the comments (but keep quoted hashes) - if strings.Contains(line, "#") { - segmentsBetweenHashes := strings.Split(line, "#") - quotesAreOpen := false - var segmentsToKeep []string - for _, segment := range segmentsBetweenHashes { - if strings.Count(segment, "\"") == 1 || strings.Count(segment, "'") == 1 { - if quotesAreOpen { - quotesAreOpen = false - segmentsToKeep = append(segmentsToKeep, segment) - } else { - quotesAreOpen = true - } - } - - if len(segmentsToKeep) == 0 || quotesAreOpen { - segmentsToKeep = append(segmentsToKeep, segment) - } - } - - line = strings.Join(segmentsToKeep, "#") - } - - firstEquals := strings.Index(line, "=") - firstColon := strings.Index(line, ":") - splitString := strings.SplitN(line, "=", 2) - if firstColon != -1 && (firstColon < firstEquals || firstEquals == -1) { - //this is a yaml-style line - splitString = strings.SplitN(line, ":", 2) - } - - if len(splitString) != 2 { - err = errors.New("Can't separate key from value") - return - } - - // Parse the key - key = splitString[0] - if strings.HasPrefix(key, "export") { - key = strings.TrimPrefix(key, "export") - } - key = strings.Trim(key, " ") - - // Parse the value - value = parseValue(splitString[1], envMap) - return -} - -func parseValue(value string, envMap map[string]string) string { - - // trim - value = strings.Trim(value, " ") - - // check if we've got quoted values or possible escapes - if len(value) > 1 { - rs := regexp.MustCompile(`\A'(.*)'\z`) - singleQuotes := rs.FindStringSubmatch(value) - - rd := regexp.MustCompile(`\A"(.*)"\z`) - doubleQuotes := rd.FindStringSubmatch(value) - - if singleQuotes != nil || doubleQuotes != nil { - // pull the quotes off the edges - value = value[1 : len(value)-1] - } - - if doubleQuotes != nil { - // expand newlines - escapeRegex := regexp.MustCompile(`\\.`) - value = escapeRegex.ReplaceAllStringFunc(value, func(match string) string { - c := strings.TrimPrefix(match, `\`) - switch c { - case "n": - return "\n" - case "r": - return "\r" - default: - return match - } - }) - // unescape characters - e := regexp.MustCompile(`\\([^$])`) - value = e.ReplaceAllString(value, "$1") - } - - if singleQuotes == nil { - value = expandVariables(value, envMap) - } - } - - return value -} - -func expandVariables(v string, m map[string]string) string { - r := regexp.MustCompile(`(\\)?(\$)(\()?\{?([A-Z0-9_]+)?\}?`) - - return r.ReplaceAllStringFunc(v, func(s string) string { - submatch := r.FindStringSubmatch(s) - - if submatch == nil { - return s - } - if submatch[1] == "\\" || submatch[2] == "(" { - return submatch[0][1:] - } else if submatch[4] != "" { - return m[submatch[4]] - } - return s - }) -} - -func isIgnoredLine(line string) bool { - trimmedLine := strings.Trim(line, " \n\t") - return len(trimmedLine) == 0 || strings.HasPrefix(trimmedLine, "#") -} - -func doubleQuoteEscape(line string) string { - for _, c := range doubleQuoteSpecialChars { - toReplace := "\\" + string(c) - if c == '\n' { - toReplace = `\n` - } - if c == '\r' { - toReplace = `\r` - } - line = strings.Replace(line, string(c), toReplace, -1) - } - return line -} diff --git a/vendor/github.com/karrick/godirwalk/.gitignore b/vendor/github.com/karrick/godirwalk/.gitignore index a1338d685..ea2d9ece6 100644 --- a/vendor/github.com/karrick/godirwalk/.gitignore +++ b/vendor/github.com/karrick/godirwalk/.gitignore @@ -12,3 +12,8 @@ # Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736 .glide/ + +examples/remove-empty-directories/remove-empty-directories +examples/sizes/sizes +examples/walk-fast/walk-fast +examples/walk-stdlib/walk-stdlib diff --git a/vendor/github.com/karrick/godirwalk/README.md b/vendor/github.com/karrick/godirwalk/README.md index 4f9922fef..0902cce5c 100644 --- a/vendor/github.com/karrick/godirwalk/README.md +++ b/vendor/github.com/karrick/godirwalk/README.md @@ -3,6 +3,8 @@ `godirwalk` is a library for traversing a directory tree on a file system. +[![GoDoc](https://godoc.org/github.com/karrick/godirwalk?status.svg)](https://godoc.org/github.com/karrick/godirwalk) [![Build Status](https://dev.azure.com/microsoft0235/microsoft/_apis/build/status/karrick.godirwalk?branchName=master)](https://dev.azure.com/microsoft0235/microsoft/_build/latest?definitionId=1&branchName=master) + In short, why do I use this library? 1. It's faster than `filepath.Walk`. @@ -24,6 +26,12 @@ provided callback function. dirname := "some/directory/root" err := godirwalk.Walk(dirname, &godirwalk.Options{ Callback: func(osPathname string, de *godirwalk.Dirent) error { + // Following string operation is not most performant way + // of doing this, but common enough to warrant a simple + // example here: + if strings.Contains(osPathname, ".git") { + return godirwalk.SkipThis + } fmt.Printf("%s %s\n", de.ModeType(), osPathname) return nil }, @@ -36,9 +44,6 @@ directory tree, but also for obtaining a list of immediate descendants of a particular directory, typically much more quickly than using `os.ReadDir` or `os.ReadDirnames`. -Documentation is available via -[![GoDoc](https://godoc.org/github.com/karrick/godirwalk?status.svg)](https://godoc.org/github.com/karrick/godirwalk). - ## Description Here's why I use `godirwalk` in preference to `filepath.Walk`, @@ -48,24 +53,24 @@ Here's why I use `godirwalk` in preference to `filepath.Walk`, When compared against `filepath.Walk` in benchmarks, it has been observed to run between five and ten times the speed on darwin, at -speeds comparable to the that of the unix `find` utility; about twice -the speed on linux; and about four times the speed on Windows. +speeds comparable to the that of the unix `find` utility; and about +twice the speed on linux; and about four times the speed on Windows. How does it obtain this performance boost? It does less work to give you nearly the same output. This library calls the same `syscall` functions to do the work, but it makes fewer calls, does not throw away information that it might need, and creates less memory churn -along the way by reusing the same scratch buffer rather than -reallocating a new buffer every time it reads data from the operating -system. +along the way by reusing the same scratch buffer for reading from a +directory rather than reallocating a new buffer every time it reads +file system entry data from the operating system. While traversing a file system directory tree, `filepath.Walk` obtains the list of immediate descendants of a directory, and throws away the -file system node type information provided by the operating system -that comes with the node's name. Then, immediately prior to invoking -the callback function, `filepath.Walk` invokes `os.Stat` for each -node, and passes the returned `os.FileInfo` information to the -callback. +node type information for the file system entry that is provided by +the operating system that comes with the node's name. Then, +immediately prior to invoking the callback function, `filepath.Walk` +invokes `os.Stat` for each node, and passes the returned `os.FileInfo` +information to the callback. While the `os.FileInfo` information provided by `os.Stat` is extremely helpful--and even includes the `os.FileMode` data--providing it @@ -86,31 +91,37 @@ entire `os.FileInfo` data structure, the callback can easiy invoke ##### macOS ```Bash -go test -bench=. +$ go test -bench=. -benchmem goos: darwin goarch: amd64 pkg: github.com/karrick/godirwalk -BenchmarkFilepathWalk-8 1 3001274570 ns/op -BenchmarkGoDirWalk-8 3 465573172 ns/op -BenchmarkFlameGraphFilepathWalk-8 1 6957916936 ns/op -BenchmarkFlameGraphGoDirWalk-8 1 4210582571 ns/op +BenchmarkReadDirnamesStandardLibrary-12 50000 26250 ns/op 10360 B/op 16 allocs/op +BenchmarkReadDirnamesThisLibrary-12 50000 24372 ns/op 5064 B/op 20 allocs/op +BenchmarkFilepathWalk-12 1 1099524875 ns/op 228415912 B/op 416952 allocs/op +BenchmarkGodirwalk-12 2 526754589 ns/op 103110464 B/op 451442 allocs/op +BenchmarkGodirwalkUnsorted-12 3 509219296 ns/op 100751400 B/op 378800 allocs/op +BenchmarkFlameGraphFilepathWalk-12 1 7478618820 ns/op 2284138176 B/op 4169453 allocs/op +BenchmarkFlameGraphGodirwalk-12 1 4977264058 ns/op 1031105328 B/op 4514423 allocs/op PASS -ok github.com/karrick/godirwalk 16.822s +ok github.com/karrick/godirwalk 21.219s ``` ##### Linux ```Bash -go test -bench=. +$ go test -bench=. -benchmem goos: linux goarch: amd64 pkg: github.com/karrick/godirwalk -BenchmarkFilepathWalk-12 1 1609189170 ns/op -BenchmarkGoDirWalk-12 5 211336628 ns/op -BenchmarkFlameGraphFilepathWalk-12 1 3968119932 ns/op -BenchmarkFlameGraphGoDirWalk-12 1 2139598998 ns/op +BenchmarkReadDirnamesStandardLibrary-12 100000 15458 ns/op 10360 B/op 16 allocs/op +BenchmarkReadDirnamesThisLibrary-12 100000 14646 ns/op 5064 B/op 20 allocs/op +BenchmarkFilepathWalk-12 2 631034745 ns/op 228210216 B/op 416939 allocs/op +BenchmarkGodirwalk-12 3 358714883 ns/op 102988664 B/op 451437 allocs/op +BenchmarkGodirwalkUnsorted-12 3 355363915 ns/op 100629234 B/op 378796 allocs/op +BenchmarkFlameGraphFilepathWalk-12 1 6086913991 ns/op 2282104720 B/op 4169417 allocs/op +BenchmarkFlameGraphGodirwalk-12 1 3456398824 ns/op 1029886400 B/op 4514373 allocs/op PASS -ok github.com/karrick/godirwalk 9.007s +ok github.com/karrick/godirwalk 19.179s ``` ### It's more correct on Windows than `filepath.Walk` @@ -136,13 +147,20 @@ The takeaway is that behavior is different based on which platform until it is fixed in the standard library, it presents a compatibility problem. -This library correctly identifies symbolic links that point to -directories and will only follow them when `FollowSymbolicLinks` is -set to true. Behavior on Windows and other operating systems is -identical. +This library fixes the above problem such that it will never follow +logical file sytem loops on either unix or Windows. Furthermore, it +will only follow symbolic links when `FollowSymbolicLinks` is set to +true. Behavior on Windows and other operating systems is identical. ### It's more easy to use than `filepath.Walk` +While this library strives to mimic the behavior of the incredibly +well-written `filepath.Walk` standard library, there are places where +it deviates a bit in order to provide a more easy or intuitive caller +interface. + +#### Callback interface does not send you an error to check + Since this library does not invoke `os.Stat` on every file system node it encounters, there is no possible error event for the callback function to filter on. The third argument in the `filepath.WalkFunc` @@ -150,23 +168,105 @@ function signature to pass the error from `os.Stat` to the callback function is no longer necessary, and thus eliminated from signature of the callback function from this library. -Also, `filepath.Walk` invokes the callback function with a solidus -delimited pathname regardless of the os-specific path separator. This -library invokes the callback function with the os-specific pathname -separator, obviating a call to `filepath.Clean` in the callback -function for each node prior to actually using the provided pathname. +Furthermore, this slight interface difference between +`filepath.WalkFunc` and this library's `WalkFunc` eliminates the +boilerplate code that callback handlers must write when they use +`filepath.Walk`. Rather than every callback function needing to check +the error value passed into it and branch accordingly, users of this +library do not even have an error value to check immediately upon +entry into the callback function. This is an improvement both in +runtime performance and code clarity. + +#### Callback function is invoked with OS specific file system path separator + +On every OS platform `filepath.Walk` invokes the callback function +with a solidus (`/`) delimited pathname. By contrast this library +invokes the callback with the os-specific pathname separator, +obviating a call to `filepath.Clean` in the callback function for each +node prior to actually using the provided pathname. In other words, even on Windows, `filepath.Walk` will invoke the callback with `some/path/to/foo.txt`, requiring well written clients to perform pathname normalization for every file prior to working with -the specified file. In truth, many clients developed on unix and not -tested on Windows neglect this subtlety, and will result in software -bugs when running on Windows. This library would invoke the callback -function with `some\path\to\foo.txt` for the same file when running on -Windows, eliminating the need to normalize the pathname by the client, -and lessen the likelyhood that a client will work on unix but not on +the specified file. This is a hidden boilerplate requirement to create +truly os agnostic callback functions. In truth, many clients developed +on unix and not tested on Windows neglect this subtlety, and will +result in software bugs when someone tries to run that software on Windows. +This library invokes the callback function with `some\path\to\foo.txt` +for the same file when running on Windows, eliminating the need to +normalize the pathname by the client, and lessen the likelyhood that a +client will work on unix but not on Windows. + +This enhancement eliminates necessity for some more boilerplate code +in callback functions while improving the runtime performance of this +library. + +#### `godirwalk.SkipThis` is more intuitive to use than `filepath.SkipDir` + +One arguably confusing aspect of the `filepath.WalkFunc` interface +that this library must emulate is how a caller tells the `Walk` +function to skip file system entries. With both `filepath.Walk` and +this library's `Walk`, when a callback function wants to skip a +directory and not descend into its children, it returns +`filepath.SkipDir`. If the callback function returns +`filepath.SkipDir` for a non-directory, `filepath.Walk` and this +library will stop processing any more entries in the current +directory. This is not necessarily what most developers want or +expect. If you want to simply skip a particular non-directory entry +but continue processing entries in the directory, the callback +function must return nil. + +The implications of this interface design is when you want to walk a +file system hierarchy and skip an entry, you have to return a +different value based on what type of file system entry that node +is. To skip an entry, if the entry is a directory, you must return +`filepath.SkipDir`, and if entry is not a directory, you must return +`nil`. This is an unfortunate hurdle I have observed many developers +struggling with, simply because it is not an intuitive interface. + +Here is an example callback function that adheres to +`filepath.WalkFunc` interface to have it skip any file system entry +whose full pathname includes a particular substring, `optSkip`. Note +that this library still supports identical behavior of `filepath.Walk` +when the callback function returns `filepath.SkipDir`. + +```Go + func callback1(osPathname string, de *godirwalk.Dirent) error { + if optSkip != "" && strings.Contains(osPathname, optSkip) { + if b, err := de.IsDirOrSymlinkToDir(); b == true && err == nil { + return filepath.SkipDir + } + return nil + } + // Process file like normal... + return nil + } +``` + +This library attempts to eliminate some of that logic boilerplate +required in callback functions by providing a new token error value, +`SkipThis`, which a callback function may return to skip the current +file system entry regardless of what type of entry it is. If the +current entry is a directory, its children will not be enumerated, +exactly as if the callback had returned `filepath.SkipDir`. If the +current entry is a non-directory, the next file system entry in the +current directory will be enumerated, exactly as if the callback +returned `nil`. The following example callback function has identical +behavior as the previous, but has less boilerplate, and admittedly +logic that I find more simple to follow. + +```Go + func callback2(osPathname string, de *godirwalk.Dirent) error { + if optSkip != "" && strings.Contains(osPathname, optSkip) { + return godirwalk.SkipThis + } + // Process file like normal... + return nil + } +``` + ### It's more flexible than `filepath.Walk` #### Configurable Handling of Symbolic Links @@ -177,26 +277,38 @@ does. However, it does invoke the callback function with each node it finds, including symbolic links. If a particular use case exists to follow symbolic links when traversing a directory tree, this library can be invoked in manner to do so, by setting the -`FollowSymbolicLinks` parameter to true. +`FollowSymbolicLinks` config parameter to `true`. #### Configurable Sorting of Directory Children The default behavior of this library is to always sort the immediate descendants of a directory prior to visiting each node, just like `filepath.Walk` does. This is usually the desired behavior. However, -this does come at a performance penalty to sort the names when a -directory node has many entries. If a particular use case exists that -does not require sorting the directory's immediate descendants prior -to visiting its nodes, this library will skip the sorting step when -the `Unsorted` parameter is set to true. +this does come at slight performance and memory penalties required to +sort the names when a directory node has many entries. Additionally if +caller specifies `Unsorted` enumeration in the configuration +parameter, reading directories is lazily performed as the caller +consumes entries. If a particular use case exists that does not +require sorting the directory's immediate descendants prior to +visiting its nodes, this library will skip the sorting step when the +`Unsorted` parameter is set to `true`. + +Here's an interesting read of the potential hazzards of traversing a +file system hierarchy in a non-deterministic order. If you know the +problem you are solving is not affected by the order files are +visited, then I encourage you to use `Unsorted`. Otherwise skip +setting this option. + +[Researchers find bug in Python script may have affected hundreds of studies](https://arstechnica.com/information-technology/2019/10/chemists-discover-cross-platform-python-scripts-not-so-cross-platform/) #### Configurable Post Children Callback This library provides upstream code with the ability to specify a -callback to be invoked for each directory after its children are -processed. This has been used to recursively delete empty directories -after traversing the file system in a more efficient manner. See the -`examples/clean-empties` directory for an example of this usage. +callback function to be invoked for each directory after its children +are processed. This has been used to recursively delete empty +directories after traversing the file system in a more efficient +manner. See the `examples/clean-empties` directory for an example of +this usage. #### Configurable Error Callback diff --git a/vendor/github.com/karrick/godirwalk/azure-pipelines.yml b/vendor/github.com/karrick/godirwalk/azure-pipelines.yml new file mode 100644 index 000000000..d56f2484d --- /dev/null +++ b/vendor/github.com/karrick/godirwalk/azure-pipelines.yml @@ -0,0 +1,53 @@ +# Go +# Build your Go project. +# Add steps that test, save build artifacts, deploy, and more: +# https://docs.microsoft.com/azure/devops/pipelines/languages/go + +trigger: +- master + +variables: + GOVERSION: 1.13 + +jobs: + - job: Linux + pool: + vmImage: 'ubuntu-latest' + steps: + - task: GoTool@0 + displayName: 'Use Go $(GOVERSION)' + inputs: + version: $(GOVERSION) + - task: Go@0 + inputs: + command: test + arguments: -race -v ./... + displayName: 'Execute Tests' + + - job: Mac + pool: + vmImage: 'macos-latest' + steps: + - task: GoTool@0 + displayName: 'Use Go $(GOVERSION)' + inputs: + version: $(GOVERSION) + - task: Go@0 + inputs: + command: test + arguments: -race -v ./... + displayName: 'Execute Tests' + + - job: Windows + pool: + vmImage: 'windows-latest' + steps: + - task: GoTool@0 + displayName: 'Use Go $(GOVERSION)' + inputs: + version: $(GOVERSION) + - task: Go@0 + inputs: + command: test + arguments: -race -v ./... + displayName: 'Execute Tests' diff --git a/vendor/github.com/karrick/godirwalk/bench.sh b/vendor/github.com/karrick/godirwalk/bench.sh new file mode 100644 index 000000000..b2ba374cf --- /dev/null +++ b/vendor/github.com/karrick/godirwalk/bench.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +# for version in v1.9.1 v1.10.0 v1.10.3 v1.10.12 v1.11.2 v1.11.3 v1.12.0 v1.13.1 v1.14.0 v1.14.1 ; do +for version in v1.10.12 v1.14.1 v1.15.2 ; do + echo "### $version" > $version.txt + git checkout -- go.mod && git checkout $version && go test -run=NONE -bench=Benchmark2 >> $version.txt || exit 1 +done diff --git a/vendor/github.com/karrick/godirwalk/debug_development.go b/vendor/github.com/karrick/godirwalk/debug_development.go new file mode 100644 index 000000000..6e1cb0bf7 --- /dev/null +++ b/vendor/github.com/karrick/godirwalk/debug_development.go @@ -0,0 +1,14 @@ +// +build godirwalk_debug + +package godirwalk + +import ( + "fmt" + "os" +) + +// debug formats and prints arguments to stderr for development builds +func debug(f string, a ...interface{}) { + // fmt.Fprintf(os.Stderr, f, a...) + os.Stderr.Write([]byte("godirwalk: " + fmt.Sprintf(f, a...))) +} diff --git a/vendor/github.com/karrick/godirwalk/debug_release.go b/vendor/github.com/karrick/godirwalk/debug_release.go new file mode 100644 index 000000000..986178731 --- /dev/null +++ b/vendor/github.com/karrick/godirwalk/debug_release.go @@ -0,0 +1,6 @@ +// +build !godirwalk_debug + +package godirwalk + +// debug is a no-op for release builds +func debug(_ string, _ ...interface{}) {} diff --git a/vendor/github.com/karrick/godirwalk/dirent.go b/vendor/github.com/karrick/godirwalk/dirent.go index 5a2772248..38e141ba6 100644 --- a/vendor/github.com/karrick/godirwalk/dirent.go +++ b/vendor/github.com/karrick/godirwalk/dirent.go @@ -3,37 +3,74 @@ package godirwalk import ( "os" "path/filepath" - - "github.com/pkg/errors" ) // Dirent stores the name and file system mode type of discovered file system // entries. type Dirent struct { - name string - modeType os.FileMode + name string // base name of the file system entry. + path string // path name of the file system entry. + modeType os.FileMode // modeType is the type of file system entry. } -// NewDirent returns a newly initialized Dirent structure, or an error. This +// NewDirent returns a newly initialized Dirent structure, or an error. This // function does not follow symbolic links. // // This function is rarely used, as Dirent structures are provided by other -// functions in this library that read and walk directories. +// functions in this library that read and walk directories, but is provided, +// however, for the occasion when a program needs to create a Dirent. func NewDirent(osPathname string) (*Dirent, error) { - fi, err := os.Lstat(osPathname) + modeType, err := modeType(osPathname) if err != nil { - return nil, errors.Wrap(err, "cannot lstat") + return nil, err } return &Dirent{ name: filepath.Base(osPathname), - modeType: fi.Mode() & os.ModeType, + path: filepath.Dir(osPathname), + modeType: modeType, }, nil } -// Name returns the basename of the file system entry. -func (de Dirent) Name() string { return de.name } +// IsDir returns true if and only if the Dirent represents a file system +// directory. Note that on some operating systems, more than one file mode bit +// may be set for a node. For instance, on Windows, a symbolic link that points +// to a directory will have both the directory and the symbolic link bits set. +func (de Dirent) IsDir() bool { return de.modeType&os.ModeDir != 0 } -// ModeType returns the mode bits that specify the file system node type. We +// IsDirOrSymlinkToDir returns true if and only if the Dirent represents a file +// system directory, or a symbolic link to a directory. Note that if the Dirent +// is not a directory but is a symbolic link, this method will resolve by +// sending a request to the operating system to follow the symbolic link. +func (de Dirent) IsDirOrSymlinkToDir() (bool, error) { + if de.IsDir() { + return true, nil + } + if !de.IsSymlink() { + return false, nil + } + // Does this symlink point to a directory? + info, err := os.Stat(filepath.Join(de.path, de.name)) + if err != nil { + return false, err + } + return info.IsDir(), nil +} + +// IsRegular returns true if and only if the Dirent represents a regular file. +// That is, it ensures that no mode type bits are set. +func (de Dirent) IsRegular() bool { return de.modeType&os.ModeType == 0 } + +// IsSymlink returns true if and only if the Dirent represents a file system +// symbolic link. Note that on some operating systems, more than one file mode +// bit may be set for a node. For instance, on Windows, a symbolic link that +// points to a directory will have both the directory and the symbolic link bits +// set. +func (de Dirent) IsSymlink() bool { return de.modeType&os.ModeSymlink != 0 } + +// IsDevice returns true if and only if the Dirent represents a device file. +func (de Dirent) IsDevice() bool { return de.modeType&os.ModeDevice != 0 } + +// ModeType returns the mode bits that specify the file system node type. We // could make our own enum-like data type for encoding the file type, but Go's // runtime already gives us architecture independent file modes, as discussed in // `os/types.go`: @@ -42,32 +79,25 @@ func (de Dirent) Name() string { return de.name } // information about files can be moved from one system to another portably. func (de Dirent) ModeType() os.FileMode { return de.modeType } -// IsDir returns true if and only if the Dirent represents a file system -// directory. Note that on some operating systems, more than one file mode bit -// may be set for a node. For instance, on Windows, a symbolic link that points -// to a directory will have both the directory and the symbolic link bits set. -func (de Dirent) IsDir() bool { return de.modeType&os.ModeDir != 0 } +// Name returns the base name of the file system entry. +func (de Dirent) Name() string { return de.name } -// IsRegular returns true if and only if the Dirent represents a regular -// file. That is, it ensures that no mode type bits are set. -func (de Dirent) IsRegular() bool { return de.modeType&os.ModeType == 0 } +// reset releases memory held by entry err and name, and resets mode type to 0. +func (de *Dirent) reset() { + de.name = "" + de.path = "" + de.modeType = 0 +} -// IsSymlink returns true if and only if the Dirent represents a file system -// symbolic link. Note that on some operating systems, more than one file mode -// bit may be set for a node. For instance, on Windows, a symbolic link that -// points to a directory will have both the directory and the symbolic link bits -// set. -func (de Dirent) IsSymlink() bool { return de.modeType&os.ModeSymlink != 0 } - -// Dirents represents a slice of Dirent pointers, which are sortable by +// Dirents represents a slice of Dirent pointers, which are sortable by base // name. This type satisfies the `sort.Interface` interface. type Dirents []*Dirent // Len returns the count of Dirent structures in the slice. func (l Dirents) Len() int { return len(l) } -// Less returns true if and only if the Name of the element specified by the -// first index is lexicographically less than that of the second index. +// Less returns true if and only if the base name of the element specified by +// the first index is lexicographically less than that of the second index. func (l Dirents) Less(i, j int) bool { return l[i].name < l[j].name } // Swap exchanges the two Dirent entries specified by the two provided indexes. diff --git a/vendor/github.com/karrick/godirwalk/doc.go b/vendor/github.com/karrick/godirwalk/doc.go index 0dfdabd48..440aa82a3 100644 --- a/vendor/github.com/karrick/godirwalk/doc.go +++ b/vendor/github.com/karrick/godirwalk/doc.go @@ -30,5 +30,13 @@ This library not only provides functions for traversing a file system directory tree, but also for obtaining a list of immediate descendants of a particular directory, typically much more quickly than using `os.ReadDir` or `os.ReadDirnames`. + + scratchBuffer := make([]byte, godirwalk.MinimumScratchBufferSize) + + names, err := godirwalk.ReadDirnames("some/directory", scratchBuffer) + // ... + + entries, err := godirwalk.ReadDirents("another/directory", scratchBuffer) + // ... */ package godirwalk diff --git a/vendor/github.com/karrick/godirwalk/go.mod b/vendor/github.com/karrick/godirwalk/go.mod index 6b467a9e1..faf23fd98 100644 --- a/vendor/github.com/karrick/godirwalk/go.mod +++ b/vendor/github.com/karrick/godirwalk/go.mod @@ -1,3 +1,3 @@ module github.com/karrick/godirwalk -require github.com/pkg/errors v0.8.0 +go 1.13 diff --git a/vendor/github.com/karrick/godirwalk/go.sum b/vendor/github.com/karrick/godirwalk/go.sum index 3dfe462f0..e69de29bb 100644 --- a/vendor/github.com/karrick/godirwalk/go.sum +++ b/vendor/github.com/karrick/godirwalk/go.sum @@ -1,2 +0,0 @@ -github.com/pkg/errors v0.8.0 h1:WdK/asTD0HN+q6hsWO3/vpuAkAr+tw6aNJNDFFf0+qw= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= diff --git a/vendor/github.com/karrick/godirwalk/withFileno.go b/vendor/github.com/karrick/godirwalk/inoWithFileno.go similarity index 100% rename from vendor/github.com/karrick/godirwalk/withFileno.go rename to vendor/github.com/karrick/godirwalk/inoWithFileno.go diff --git a/vendor/github.com/karrick/godirwalk/withIno.go b/vendor/github.com/karrick/godirwalk/inoWithIno.go similarity index 58% rename from vendor/github.com/karrick/godirwalk/withIno.go rename to vendor/github.com/karrick/godirwalk/inoWithIno.go index 47fc12540..842a6662d 100644 --- a/vendor/github.com/karrick/godirwalk/withIno.go +++ b/vendor/github.com/karrick/godirwalk/inoWithIno.go @@ -1,9 +1,9 @@ -// +build darwin linux +// +build aix darwin linux nacl solaris package godirwalk import "syscall" func inoFromDirent(de *syscall.Dirent) uint64 { - return de.Ino + return uint64(de.Ino) } diff --git a/vendor/github.com/karrick/godirwalk/modeType.go b/vendor/github.com/karrick/godirwalk/modeType.go new file mode 100644 index 000000000..6427a6852 --- /dev/null +++ b/vendor/github.com/karrick/godirwalk/modeType.go @@ -0,0 +1,22 @@ +package godirwalk + +import ( + "os" +) + +// modeType returns the mode type of the file system entry identified by +// osPathname by calling os.LStat function, to intentionally not follow symbolic +// links. +// +// Even though os.LStat provides all file mode bits, we want to ensure same +// values returned to caller regardless of whether we obtained file mode bits +// from syscall or stat call. Therefore mask out the additional file mode bits +// that are provided by stat but not by the syscall, so users can rely on their +// values. +func modeType(osPathname string) (os.FileMode, error) { + fi, err := os.Lstat(osPathname) + if err == nil { + return fi.Mode() & os.ModeType, nil + } + return 0, err +} diff --git a/vendor/github.com/karrick/godirwalk/modeTypeWithType.go b/vendor/github.com/karrick/godirwalk/modeTypeWithType.go new file mode 100644 index 000000000..7890e7761 --- /dev/null +++ b/vendor/github.com/karrick/godirwalk/modeTypeWithType.go @@ -0,0 +1,37 @@ +// +build darwin dragonfly freebsd linux netbsd openbsd + +package godirwalk + +import ( + "os" + "path/filepath" + "syscall" +) + +// modeTypeFromDirent converts a syscall defined constant, which is in purview +// of OS, to a constant defined by Go, assumed by this project to be stable. +// +// When the syscall constant is not recognized, this function falls back to a +// Stat on the file system. +func modeTypeFromDirent(de *syscall.Dirent, osDirname, osBasename string) (os.FileMode, error) { + switch de.Type { + case syscall.DT_REG: + return 0, nil + case syscall.DT_DIR: + return os.ModeDir, nil + case syscall.DT_LNK: + return os.ModeSymlink, nil + case syscall.DT_CHR: + return os.ModeDevice | os.ModeCharDevice, nil + case syscall.DT_BLK: + return os.ModeDevice, nil + case syscall.DT_FIFO: + return os.ModeNamedPipe, nil + case syscall.DT_SOCK: + return os.ModeSocket, nil + default: + // If syscall returned unknown type (e.g., DT_UNKNOWN, DT_WHT), then + // resolve actual mode by reading file information. + return modeType(filepath.Join(osDirname, osBasename)) + } +} diff --git a/vendor/github.com/karrick/godirwalk/modeTypeWithoutType.go b/vendor/github.com/karrick/godirwalk/modeTypeWithoutType.go new file mode 100644 index 000000000..5299392ee --- /dev/null +++ b/vendor/github.com/karrick/godirwalk/modeTypeWithoutType.go @@ -0,0 +1,18 @@ +// +build aix js nacl solaris + +package godirwalk + +import ( + "os" + "path/filepath" + "syscall" +) + +// modeTypeFromDirent converts a syscall defined constant, which is in purview +// of OS, to a constant defined by Go, assumed by this project to be stable. +// +// Because some operating system syscall.Dirent structures do not include a Type +// field, fall back on Stat of the file system. +func modeTypeFromDirent(_ *syscall.Dirent, osDirname, osBasename string) (os.FileMode, error) { + return modeType(filepath.Join(osDirname, osBasename)) +} diff --git a/vendor/github.com/karrick/godirwalk/withNamlen.go b/vendor/github.com/karrick/godirwalk/nameWithNamlen.go similarity index 93% rename from vendor/github.com/karrick/godirwalk/withNamlen.go rename to vendor/github.com/karrick/godirwalk/nameWithNamlen.go index 46a4af500..2c0231eea 100644 --- a/vendor/github.com/karrick/godirwalk/withNamlen.go +++ b/vendor/github.com/karrick/godirwalk/nameWithNamlen.go @@ -1,4 +1,4 @@ -// +build darwin dragonfly freebsd netbsd openbsd +// +build aix darwin dragonfly freebsd netbsd openbsd package godirwalk diff --git a/vendor/github.com/karrick/godirwalk/withoutNamlen.go b/vendor/github.com/karrick/godirwalk/nameWithoutNamlen.go similarity index 51% rename from vendor/github.com/karrick/godirwalk/withoutNamlen.go rename to vendor/github.com/karrick/godirwalk/nameWithoutNamlen.go index dcf9f3a97..f776fbc76 100644 --- a/vendor/github.com/karrick/godirwalk/withoutNamlen.go +++ b/vendor/github.com/karrick/godirwalk/nameWithoutNamlen.go @@ -1,4 +1,4 @@ -// +build nacl linux solaris +// +build nacl linux js solaris package godirwalk @@ -9,18 +9,18 @@ import ( "unsafe" ) -func nameFromDirent(de *syscall.Dirent) []byte { +// nameOffset is a compile time constant +const nameOffset = int(unsafe.Offsetof(syscall.Dirent{}.Name)) + +func nameFromDirent(de *syscall.Dirent) (name []byte) { // Because this GOOS' syscall.Dirent does not provide a field that specifies // the name length, this function must first calculate the max possible name // length, and then search for the NULL byte. - ml := int(uint64(de.Reclen) - uint64(unsafe.Offsetof(syscall.Dirent{}.Name))) + ml := int(de.Reclen) - nameOffset // Convert syscall.Dirent.Name, which is array of int8, to []byte, by - // overwriting Cap, Len, and Data slice header fields to values from - // syscall.Dirent fields. Setting the Cap, Len, and Data field values for - // the slice header modifies what the slice header points to, and in this - // case, the name buffer. - var name []byte + // overwriting Cap, Len, and Data slice header fields to the max possible + // name length computed above, and finding the terminating NULL byte. sh := (*reflect.SliceHeader)(unsafe.Pointer(&name)) sh.Cap = ml sh.Len = ml @@ -30,7 +30,13 @@ func nameFromDirent(de *syscall.Dirent) []byte { // Found NULL byte; set slice's cap and len accordingly. sh.Cap = index sh.Len = index + return } - return name + // NOTE: This branch is not expected, but included for defensive + // programming, and provides a hard stop on the name based on the structure + // field array size. + sh.Cap = len(de.Name) + sh.Len = sh.Cap + return } diff --git a/vendor/github.com/karrick/godirwalk/readdir.go b/vendor/github.com/karrick/godirwalk/readdir.go index 2bba68975..c8fa8155e 100644 --- a/vendor/github.com/karrick/godirwalk/readdir.go +++ b/vendor/github.com/karrick/godirwalk/readdir.go @@ -6,7 +6,10 @@ package godirwalk // symbolic link, it will be resolved. // // If an optional scratch buffer is provided that is at least one page of -// memory, it will be used when reading directory entries from the file system. +// memory, it will be used when reading directory entries from the file +// system. If you plan on calling this function in a loop, you will have +// significantly better performance if you allocate a scratch buffer and use it +// each time you call this function. // // children, err := godirwalk.ReadDirents(osDirname, nil) // if err != nil { @@ -17,7 +20,7 @@ package godirwalk // fmt.Printf("%s %s\n", child.ModeType, child.Name) // } func ReadDirents(osDirname string, scratchBuffer []byte) (Dirents, error) { - return readdirents(osDirname, scratchBuffer) + return readDirents(osDirname, scratchBuffer) } // ReadDirnames returns a slice of strings, representing the immediate @@ -25,14 +28,17 @@ func ReadDirents(osDirname string, scratchBuffer []byte) (Dirents, error) { // symbolic link, it will be resolved. // // If an optional scratch buffer is provided that is at least one page of -// memory, it will be used when reading directory entries from the file system. +// memory, it will be used when reading directory entries from the file +// system. If you plan on calling this function in a loop, you will have +// significantly better performance if you allocate a scratch buffer and use it +// each time you call this function. // // Note that this function, depending on operating system, may or may not invoke // the ReadDirents function, in order to prepare the list of immediate // descendants. Therefore, if your program needs both the names and the file // system mode types of descendants, it will always be faster to invoke // ReadDirents directly, rather than calling this function, then looping over -// the results and calling os.Stat for each child. +// the results and calling os.Stat or os.LStat for each entry. // // children, err := godirwalk.ReadDirnames(osDirname, nil) // if err != nil { @@ -43,5 +49,5 @@ func ReadDirents(osDirname string, scratchBuffer []byte) (Dirents, error) { // fmt.Printf("%s\n", child) // } func ReadDirnames(osDirname string, scratchBuffer []byte) ([]string, error) { - return readdirnames(osDirname, scratchBuffer) + return readDirnames(osDirname, scratchBuffer) } diff --git a/vendor/github.com/karrick/godirwalk/readdir_unix.go b/vendor/github.com/karrick/godirwalk/readdir_unix.go index 04a628f7f..a993038ba 100644 --- a/vendor/github.com/karrick/godirwalk/readdir_unix.go +++ b/vendor/github.com/karrick/godirwalk/readdir_unix.go @@ -1,109 +1,131 @@ -// +build darwin freebsd linux netbsd openbsd +// +build !windows package godirwalk import ( "os" - "path/filepath" "syscall" "unsafe" - - "github.com/pkg/errors" ) -func readdirents(osDirname string, scratchBuffer []byte) (Dirents, error) { +// MinimumScratchBufferSize specifies the minimum size of the scratch buffer +// that ReadDirents, ReadDirnames, Scanner, and Walk will use when reading file +// entries from the operating system. During program startup it is initialized +// to the result from calling `os.Getpagesize()` for non Windows environments, +// and 0 for Windows. +var MinimumScratchBufferSize = os.Getpagesize() + +func newScratchBuffer() []byte { return make([]byte, MinimumScratchBufferSize) } + +func readDirents(osDirname string, scratchBuffer []byte) ([]*Dirent, error) { + var entries []*Dirent + var workBuffer []byte + dh, err := os.Open(osDirname) if err != nil { - return nil, errors.Wrap(err, "cannot Open") + return nil, err } - - var entries Dirents - fd := int(dh.Fd()) if len(scratchBuffer) < MinimumScratchBufferSize { - scratchBuffer = make([]byte, DefaultScratchBufferSize) + scratchBuffer = newScratchBuffer() } - var de *syscall.Dirent - + var sde syscall.Dirent for { - n, err := syscall.ReadDirent(fd, scratchBuffer) - if err != nil { - _ = dh.Close() // ignore potential error returned by Close - return nil, errors.Wrap(err, "cannot ReadDirent") - } - if n <= 0 { - break // end of directory reached - } - // Loop over the bytes returned by reading the directory entries. - buf := scratchBuffer[:n] - for len(buf) > 0 { - de = (*syscall.Dirent)(unsafe.Pointer(&buf[0])) // point entry to first syscall.Dirent in buffer - buf = buf[de.Reclen:] // advance buffer - - if inoFromDirent(de) == 0 { - continue // this item has been deleted, but not yet removed from directory - } - - nameSlice := nameFromDirent(de) - namlen := len(nameSlice) - if (namlen == 0) || (namlen == 1 && nameSlice[0] == '.') || (namlen == 2 && nameSlice[0] == '.' && nameSlice[1] == '.') { - continue // skip unimportant entries - } - osChildname := string(nameSlice) - - // Convert syscall constant, which is in purview of OS, to a - // constant defined by Go, assumed by this project to be stable. - var mode os.FileMode - switch de.Type { - case syscall.DT_REG: - // regular file - case syscall.DT_DIR: - mode = os.ModeDir - case syscall.DT_LNK: - mode = os.ModeSymlink - case syscall.DT_CHR: - mode = os.ModeDevice | os.ModeCharDevice - case syscall.DT_BLK: - mode = os.ModeDevice - case syscall.DT_FIFO: - mode = os.ModeNamedPipe - case syscall.DT_SOCK: - mode = os.ModeSocket - default: - // If syscall returned unknown type (e.g., DT_UNKNOWN, DT_WHT), - // then resolve actual mode by getting stat. - fi, err := os.Lstat(filepath.Join(osDirname, osChildname)) - if err != nil { - _ = dh.Close() // ignore potential error returned by Close - return nil, errors.Wrap(err, "cannot Stat") + if len(workBuffer) == 0 { + n, err := syscall.ReadDirent(fd, scratchBuffer) + // n, err := unix.ReadDirent(fd, scratchBuffer) + if err != nil { + if err == syscall.EINTR /* || err == unix.EINTR */ { + continue } - // We only care about the bits that identify the type of a file - // system node, and can ignore append, exclusive, temporary, - // setuid, setgid, permission bits, and sticky bits, which are - // coincident to the bits that declare type of the file system - // node. - mode = fi.Mode() & os.ModeType + _ = dh.Close() + return nil, err } - - entries = append(entries, &Dirent{name: osChildname, modeType: mode}) + if n <= 0 { // end of directory: normal exit + if err = dh.Close(); err != nil { + return nil, err + } + return entries, nil + } + workBuffer = scratchBuffer[:n] // trim work buffer to number of bytes read } + + copy((*[unsafe.Sizeof(syscall.Dirent{})]byte)(unsafe.Pointer(&sde))[:], workBuffer) + workBuffer = workBuffer[reclen(&sde):] // advance buffer for next iteration through loop + + if inoFromDirent(&sde) == 0 { + continue // inode set to 0 indicates an entry that was marked as deleted + } + + nameSlice := nameFromDirent(&sde) + nameLength := len(nameSlice) + + if nameLength == 0 || (nameSlice[0] == '.' && (nameLength == 1 || (nameLength == 2 && nameSlice[1] == '.'))) { + continue + } + + childName := string(nameSlice) + mt, err := modeTypeFromDirent(&sde, osDirname, childName) + if err != nil { + _ = dh.Close() + return nil, err + } + entries = append(entries, &Dirent{name: childName, path: osDirname, modeType: mt}) } - if err = dh.Close(); err != nil { - return nil, err - } - return entries, nil } -func readdirnames(osDirname string, scratchBuffer []byte) ([]string, error) { - des, err := readdirents(osDirname, scratchBuffer) +func readDirnames(osDirname string, scratchBuffer []byte) ([]string, error) { + var entries []string + var workBuffer []byte + var sde *syscall.Dirent + + dh, err := os.Open(osDirname) if err != nil { return nil, err } - names := make([]string, len(des)) - for i, v := range des { - names[i] = v.name + fd := int(dh.Fd()) + + if len(scratchBuffer) < MinimumScratchBufferSize { + scratchBuffer = newScratchBuffer() + } + + for { + if len(workBuffer) == 0 { + n, err := syscall.ReadDirent(fd, scratchBuffer) + // n, err := unix.ReadDirent(fd, scratchBuffer) + if err != nil { + if err == syscall.EINTR /* || err == unix.EINTR */ { + continue + } + _ = dh.Close() + return nil, err + } + if n <= 0 { // end of directory: normal exit + if err = dh.Close(); err != nil { + return nil, err + } + return entries, nil + } + workBuffer = scratchBuffer[:n] // trim work buffer to number of bytes read + } + + sde = (*syscall.Dirent)(unsafe.Pointer(&workBuffer[0])) // point entry to first syscall.Dirent in buffer + // Handle first entry in the work buffer. + workBuffer = workBuffer[reclen(sde):] // advance buffer for next iteration through loop + + if inoFromDirent(sde) == 0 { + continue // inode set to 0 indicates an entry that was marked as deleted + } + + nameSlice := nameFromDirent(sde) + nameLength := len(nameSlice) + + if nameLength == 0 || (nameSlice[0] == '.' && (nameLength == 1 || (nameLength == 2 && nameSlice[1] == '.'))) { + continue + } + + entries = append(entries, string(nameSlice)) } - return names, nil } diff --git a/vendor/github.com/karrick/godirwalk/readdir_windows.go b/vendor/github.com/karrick/godirwalk/readdir_windows.go index 885a067a4..7dd76cbc3 100644 --- a/vendor/github.com/karrick/godirwalk/readdir_windows.go +++ b/vendor/github.com/karrick/godirwalk/readdir_windows.go @@ -1,54 +1,66 @@ +// +build windows + package godirwalk -import ( - "os" +import "os" - "github.com/pkg/errors" -) +// MinimumScratchBufferSize specifies the minimum size of the scratch buffer +// that ReadDirents, ReadDirnames, Scanner, and Walk will use when reading file +// entries from the operating system. During program startup it is initialized +// to the result from calling `os.Getpagesize()` for non Windows environments, +// and 0 for Windows. +var MinimumScratchBufferSize = 0 -// The functions in this file are mere wrappers of what is already provided by -// standard library, in order to provide the same API as this library provides. -// -// The scratch buffer argument is ignored by this architecture. -// -// Please send PR or link to article if you know of a more performant way of -// enumerating directory contents and mode types on Windows. +func newScratchBuffer() []byte { return nil } -func readdirents(osDirname string, _ []byte) (Dirents, error) { +func readDirents(osDirname string, _ []byte) ([]*Dirent, error) { dh, err := os.Open(osDirname) if err != nil { - return nil, errors.Wrap(err, "cannot Open") + return nil, err } - fileinfos, err := dh.Readdir(0) - if er := dh.Close(); err == nil { - err = er - } + fileinfos, err := dh.Readdir(-1) if err != nil { - return nil, errors.Wrap(err, "cannot Readdir") + _ = dh.Close() + return nil, err } - entries := make(Dirents, len(fileinfos)) - for i, info := range fileinfos { - entries[i] = &Dirent{name: info.Name(), modeType: info.Mode() & os.ModeType} + entries := make([]*Dirent, len(fileinfos)) + + for i, fi := range fileinfos { + entries[i] = &Dirent{ + name: fi.Name(), + path: osDirname, + modeType: fi.Mode() & os.ModeType, + } } + if err = dh.Close(); err != nil { + return nil, err + } return entries, nil } -func readdirnames(osDirname string, _ []byte) ([]string, error) { +func readDirnames(osDirname string, _ []byte) ([]string, error) { dh, err := os.Open(osDirname) if err != nil { - return nil, errors.Wrap(err, "cannot Open") + return nil, err } - entries, err := dh.Readdirnames(0) - if er := dh.Close(); err == nil { - err = er - } + fileinfos, err := dh.Readdir(-1) if err != nil { - return nil, errors.Wrap(err, "cannot Readdirnames") + _ = dh.Close() + return nil, err } + entries := make([]string, len(fileinfos)) + + for i, fi := range fileinfos { + entries[i] = fi.Name() + } + + if err = dh.Close(); err != nil { + return nil, err + } return entries, nil } diff --git a/vendor/github.com/karrick/godirwalk/reclenFromNamlen.go b/vendor/github.com/karrick/godirwalk/reclenFromNamlen.go new file mode 100644 index 000000000..baeefcee3 --- /dev/null +++ b/vendor/github.com/karrick/godirwalk/reclenFromNamlen.go @@ -0,0 +1,9 @@ +// +build dragonfly + +package godirwalk + +import "syscall" + +func reclen(de *syscall.Dirent) uint64 { + return (16 + uint64(de.Namlen) + 1 + 7) &^ 7 +} diff --git a/vendor/github.com/karrick/godirwalk/reclenFromReclen.go b/vendor/github.com/karrick/godirwalk/reclenFromReclen.go new file mode 100644 index 000000000..99be34d87 --- /dev/null +++ b/vendor/github.com/karrick/godirwalk/reclenFromReclen.go @@ -0,0 +1,9 @@ +// +build nacl linux js solaris aix darwin freebsd netbsd openbsd + +package godirwalk + +import "syscall" + +func reclen(de *syscall.Dirent) uint64 { + return uint64(de.Reclen) +} diff --git a/vendor/github.com/karrick/godirwalk/scandir_unix.go b/vendor/github.com/karrick/godirwalk/scandir_unix.go new file mode 100644 index 000000000..33250b61d --- /dev/null +++ b/vendor/github.com/karrick/godirwalk/scandir_unix.go @@ -0,0 +1,166 @@ +// +build !windows + +package godirwalk + +import ( + "os" + "syscall" + "unsafe" +) + +// Scanner is an iterator to enumerate the contents of a directory. +type Scanner struct { + scratchBuffer []byte // read directory bytes from file system into this buffer + workBuffer []byte // points into scratchBuffer, from which we chunk out directory entries + osDirname string + childName string + err error // err is the error associated with scanning directory + statErr error // statErr is any error return while attempting to stat an entry + dh *os.File // used to close directory after done reading + de *Dirent // most recently decoded directory entry + sde syscall.Dirent + fd int // file descriptor used to read entries from directory +} + +// NewScanner returns a new directory Scanner that lazily enumerates the +// contents of a single directory. +// +// scanner, err := godirwalk.NewScanner(dirname) +// if err != nil { +// fatal("cannot scan directory: %s", err) +// } +// +// for scanner.Scan() { +// dirent, err := scanner.Dirent() +// if err != nil { +// warning("cannot get dirent: %s", err) +// continue +// } +// name := dirent.Name() +// if name == "break" { +// break +// } +// if name == "continue" { +// continue +// } +// fmt.Printf("%v %v\n", dirent.ModeType(), dirent.Name()) +// } +// if err := scanner.Err(); err != nil { +// fatal("cannot scan directory: %s", err) +// } +func NewScanner(osDirname string) (*Scanner, error) { + return NewScannerWithScratchBuffer(osDirname, nil) +} + +// NewScannerWithScratchBuffer returns a new directory Scanner that lazily +// enumerates the contents of a single directory. On platforms other than +// Windows it uses the provided scratch buffer to read from the file system. On +// Windows the scratch buffer is ignored. +func NewScannerWithScratchBuffer(osDirname string, scratchBuffer []byte) (*Scanner, error) { + dh, err := os.Open(osDirname) + if err != nil { + return nil, err + } + if len(scratchBuffer) < MinimumScratchBufferSize { + scratchBuffer = newScratchBuffer() + } + scanner := &Scanner{ + scratchBuffer: scratchBuffer, + osDirname: osDirname, + dh: dh, + fd: int(dh.Fd()), + } + return scanner, nil +} + +// Dirent returns the current directory entry while scanning a directory. +func (s *Scanner) Dirent() (*Dirent, error) { + if s.de == nil { + s.de = &Dirent{name: s.childName, path: s.osDirname} + s.de.modeType, s.statErr = modeTypeFromDirent(&s.sde, s.osDirname, s.childName) + } + return s.de, s.statErr +} + +// done is called when directory scanner unable to continue, with either the +// triggering error, or nil when there are simply no more entries to read from +// the directory. +func (s *Scanner) done(err error) { + if s.dh == nil { + return + } + + if cerr := s.dh.Close(); err == nil { + s.err = cerr + } + + s.osDirname, s.childName = "", "" + s.scratchBuffer, s.workBuffer = nil, nil + s.dh, s.de, s.statErr = nil, nil, nil + s.sde = syscall.Dirent{} + s.fd = 0 +} + +// Err returns any error associated with scanning a directory. It is normal to +// call Err after Scan returns false, even though they both ensure Scanner +// resources are released. Do not call until done scanning a directory. +func (s *Scanner) Err() error { + s.done(nil) + return s.err +} + +// Name returns the base name of the current directory entry while scanning a +// directory. +func (s *Scanner) Name() string { return s.childName } + +// Scan potentially reads and then decodes the next directory entry from the +// file system. +// +// When it returns false, this releases resources used by the Scanner then +// returns any error associated with closing the file system directory resource. +func (s *Scanner) Scan() bool { + if s.dh == nil { + return false + } + + s.de = nil + + for { + // When the work buffer has nothing remaining to decode, we need to load + // more data from disk. + if len(s.workBuffer) == 0 { + n, err := syscall.ReadDirent(s.fd, s.scratchBuffer) + // n, err := unix.ReadDirent(s.fd, s.scratchBuffer) + if err != nil { + if err == syscall.EINTR /* || err == unix.EINTR */ { + continue + } + s.done(err) + return false + } + if n <= 0 { // end of directory: normal exit + s.done(nil) + return false + } + s.workBuffer = s.scratchBuffer[:n] // trim work buffer to number of bytes read + } + + // point entry to first syscall.Dirent in buffer + copy((*[unsafe.Sizeof(syscall.Dirent{})]byte)(unsafe.Pointer(&s.sde))[:], s.workBuffer) + s.workBuffer = s.workBuffer[reclen(&s.sde):] // advance buffer for next iteration through loop + + if inoFromDirent(&s.sde) == 0 { + continue // inode set to 0 indicates an entry that was marked as deleted + } + + nameSlice := nameFromDirent(&s.sde) + nameLength := len(nameSlice) + + if nameLength == 0 || (nameSlice[0] == '.' && (nameLength == 1 || (nameLength == 2 && nameSlice[1] == '.'))) { + continue + } + + s.childName = string(nameSlice) + return true + } +} diff --git a/vendor/github.com/karrick/godirwalk/scandir_windows.go b/vendor/github.com/karrick/godirwalk/scandir_windows.go new file mode 100644 index 000000000..a2110618e --- /dev/null +++ b/vendor/github.com/karrick/godirwalk/scandir_windows.go @@ -0,0 +1,133 @@ +// +build windows + +package godirwalk + +import ( + "fmt" + "os" +) + +// Scanner is an iterator to enumerate the contents of a directory. +type Scanner struct { + osDirname string + childName string + dh *os.File // dh is handle to open directory + de *Dirent + err error // err is the error associated with scanning directory + childMode os.FileMode +} + +// NewScanner returns a new directory Scanner that lazily enumerates the +// contents of a single directory. +// +// scanner, err := godirwalk.NewScanner(dirname) +// if err != nil { +// fatal("cannot scan directory: %s", err) +// } +// +// for scanner.Scan() { +// dirent, err := scanner.Dirent() +// if err != nil { +// warning("cannot get dirent: %s", err) +// continue +// } +// name := dirent.Name() +// if name == "break" { +// break +// } +// if name == "continue" { +// continue +// } +// fmt.Printf("%v %v\n", dirent.ModeType(), dirent.Name()) +// } +// if err := scanner.Err(); err != nil { +// fatal("cannot scan directory: %s", err) +// } +func NewScanner(osDirname string) (*Scanner, error) { + dh, err := os.Open(osDirname) + if err != nil { + return nil, err + } + scanner := &Scanner{ + osDirname: osDirname, + dh: dh, + } + return scanner, nil +} + +// NewScannerWithScratchBuffer returns a new directory Scanner that lazily +// enumerates the contents of a single directory. On platforms other than +// Windows it uses the provided scratch buffer to read from the file system. On +// Windows the scratch buffer parameter is ignored. +func NewScannerWithScratchBuffer(osDirname string, scratchBuffer []byte) (*Scanner, error) { + return NewScanner(osDirname) +} + +// Dirent returns the current directory entry while scanning a directory. +func (s *Scanner) Dirent() (*Dirent, error) { + if s.de == nil { + s.de = &Dirent{ + name: s.childName, + path: s.osDirname, + modeType: s.childMode, + } + } + return s.de, nil +} + +// done is called when directory scanner unable to continue, with either the +// triggering error, or nil when there are simply no more entries to read from +// the directory. +func (s *Scanner) done(err error) { + if s.dh == nil { + return + } + + if cerr := s.dh.Close(); err == nil { + s.err = cerr + } + + s.childName, s.osDirname = "", "" + s.de, s.dh = nil, nil +} + +// Err returns any error associated with scanning a directory. It is normal to +// call Err after Scan returns false, even though they both ensure Scanner +// resources are released. Do not call until done scanning a directory. +func (s *Scanner) Err() error { + s.done(nil) + return s.err +} + +// Name returns the base name of the current directory entry while scanning a +// directory. +func (s *Scanner) Name() string { return s.childName } + +// Scan potentially reads and then decodes the next directory entry from the +// file system. +// +// When it returns false, this releases resources used by the Scanner then +// returns any error associated with closing the file system directory resource. +func (s *Scanner) Scan() bool { + if s.dh == nil { + return false + } + + s.de = nil + + fileinfos, err := s.dh.Readdir(1) + if err != nil { + s.done(err) + return false + } + + if l := len(fileinfos); l != 1 { + s.done(fmt.Errorf("expected a single entry rather than %d", l)) + return false + } + + fi := fileinfos[0] + s.childMode = fi.Mode() & os.ModeType + s.childName = fi.Name() + return true +} diff --git a/vendor/github.com/karrick/godirwalk/scanner.go b/vendor/github.com/karrick/godirwalk/scanner.go new file mode 100644 index 000000000..c08179e1e --- /dev/null +++ b/vendor/github.com/karrick/godirwalk/scanner.go @@ -0,0 +1,44 @@ +package godirwalk + +import "sort" + +type scanner interface { + Dirent() (*Dirent, error) + Err() error + Name() string + Scan() bool +} + +// sortedScanner enumerates through a directory's contents after reading the +// entire directory and sorting the entries by name. Used by walk to simplify +// its implementation. +type sortedScanner struct { + dd []*Dirent + de *Dirent +} + +func newSortedScanner(osPathname string, scratchBuffer []byte) (*sortedScanner, error) { + deChildren, err := ReadDirents(osPathname, scratchBuffer) + if err != nil { + return nil, err + } + sort.Sort(deChildren) + return &sortedScanner{dd: deChildren}, nil +} + +func (d *sortedScanner) Err() error { + d.dd, d.de = nil, nil + return nil +} + +func (d *sortedScanner) Dirent() (*Dirent, error) { return d.de, nil } + +func (d *sortedScanner) Name() string { return d.de.name } + +func (d *sortedScanner) Scan() bool { + if len(d.dd) > 0 { + d.de, d.dd = d.dd[0], d.dd[1:] + return true + } + return false +} diff --git a/vendor/github.com/karrick/godirwalk/walk.go b/vendor/github.com/karrick/godirwalk/walk.go index 4c184ab87..9d0235dfb 100644 --- a/vendor/github.com/karrick/godirwalk/walk.go +++ b/vendor/github.com/karrick/godirwalk/walk.go @@ -1,31 +1,12 @@ package godirwalk import ( + "errors" + "fmt" "os" "path/filepath" - "sort" - - "github.com/pkg/errors" ) -// DefaultScratchBufferSize specifies the size of the scratch buffer that will -// be allocated by Walk, ReadDirents, or ReadDirnames when a scratch buffer is -// not provided or the scratch buffer that is provided is smaller than -// MinimumScratchBufferSize bytes. This may seem like a large value; however, -// when a program intends to enumerate large directories, having a larger -// scratch buffer results in fewer operating system calls. -const DefaultScratchBufferSize = 64 * 1024 - -// MinimumScratchBufferSize specifies the minimum size of the scratch buffer -// that Walk, ReadDirents, and ReadDirnames will use when reading file entries -// from the operating system. It is initialized to the result from calling -// `os.Getpagesize()` during program startup. -var MinimumScratchBufferSize int - -func init() { - MinimumScratchBufferSize = os.Getpagesize() -} - // Options provide parameters for how the Walk function operates. type Options struct { // ErrorCallback specifies a function to be invoked in the case of an error @@ -84,9 +65,16 @@ type Options struct { // Walk to use when reading directory entries, to reduce amount of garbage // generation. Not all architectures take advantage of the scratch // buffer. If omitted or the provided buffer has fewer bytes than - // MinimumScratchBufferSize, then a buffer with DefaultScratchBufferSize + // MinimumScratchBufferSize, then a buffer with MinimumScratchBufferSize // bytes will be created and used once per Walk invocation. ScratchBuffer []byte + + // AllowNonDirectory causes Walk to bypass the check that ensures it is + // being called on a directory node, or when FollowSymbolicLinks is true, a + // symbolic link that points to a directory. Leave this value false to have + // Walk return an error when called on a non-directory. Set this true to + // have Walk run even when called on a non-directory node. + AllowNonDirectory bool } // ErrorAction defines a set of actions the Walk function could take based on @@ -108,6 +96,11 @@ const ( SkipNode ) +// SkipThis is used as a return value from WalkFuncs to indicate that the file +// system entry named in the call is to be skipped. It is not returned as an +// error by any function. +var SkipThis = errors.New("skip this directory entry") + // WalkFunc is the type of the function called for each file system node visited // by Walk. The pathname argument will contain the argument to Walk as a prefix; // that is, if Walk is called with "dir", which is a directory containing the @@ -131,13 +124,60 @@ const ( // Walk skips the remaining files in the containing directory. Note that any // supplied ErrorCallback function is not invoked with filepath.SkipDir when the // Callback or PostChildrenCallback functions return that special value. +// +// One arguably confusing aspect of the filepath.WalkFunc API that this library +// must emulate is how a caller tells Walk to skip file system entries or +// directories. With both filepath.Walk and this Walk, when a callback function +// wants to skip a directory and not descend into its children, it returns +// filepath.SkipDir. If the callback function returns filepath.SkipDir for a +// non-directory, filepath.Walk and this library will stop processing any more +// entries in the current directory, which is what many people do not want. If +// you want to simply skip a particular non-directory entry but continue +// processing entries in the directory, a callback function must return nil. The +// implications of this API is when you want to walk a file system hierarchy and +// skip an entry, when the entry is a directory, you must return one value, +// namely filepath.SkipDir, but when the entry is a non-directory, you must +// return a different value, namely nil. In other words, to get identical +// behavior for two file system entry types you need to send different token +// values. +// +// Here is an example callback function that adheres to filepath.Walk API to +// have it skip any file system entry whose full pathname includes a particular +// substring, optSkip: +// +// func callback1(osPathname string, de *godirwalk.Dirent) error { +// if optSkip != "" && strings.Contains(osPathname, optSkip) { +// if b, err := de.IsDirOrSymlinkToDir(); b == true && err == nil { +// return filepath.SkipDir +// } +// return nil +// } +// // Process file like normal... +// return nil +// } +// +// This library attempts to eliminate some of that logic boilerplate by +// providing a new token error value, SkipThis, which a callback function may +// return to skip the current file system entry regardless of what type of entry +// it is. If the current entry is a directory, its children will not be +// enumerated, exactly as if the callback returned filepath.SkipDir. If the +// current entry is a non-directory, the next file system entry in the current +// directory will be enumerated, exactly as if the callback returned nil. The +// following example callback function has identical behavior as the previous, +// but has less boilerplate, and admittedly more simple logic. +// +// func callback2(osPathname string, de *godirwalk.Dirent) error { +// if optSkip != "" && strings.Contains(osPathname, optSkip) { +// return godirwalk.SkipThis +// } +// // Process file like normal... +// return nil +// } type WalkFunc func(osPathname string, directoryEntry *Dirent) error // Walk walks the file tree rooted at the specified directory, calling the // specified callback function for each file system node in the tree, including -// root, symbolic links, and other node types. The nodes are walked in lexical -// order, which makes the output deterministic but means that for very large -// directories this function can be inefficient. +// root, symbolic links, and other node types. // // This function is often much faster than filepath.Walk because it does not // invoke os.Stat for every node it encounters, but rather obtains the file @@ -175,6 +215,10 @@ type WalkFunc func(osPathname string, directoryEntry *Dirent) error // } // } func Walk(pathname string, options *Options) error { + if options == nil || options.Callback == nil { + return errors.New("cannot walk without non-nil options and Callback function") + } + pathname = filepath.Clean(pathname) var fi os.FileInfo @@ -182,26 +226,28 @@ func Walk(pathname string, options *Options) error { if options.FollowSymbolicLinks { fi, err = os.Stat(pathname) - if err != nil { - return errors.Wrap(err, "cannot Stat") - } } else { fi, err = os.Lstat(pathname) - if err != nil { - return errors.Wrap(err, "cannot Lstat") - } + } + if err != nil { + return err } mode := fi.Mode() - if mode&os.ModeDir == 0 { - return errors.Errorf("cannot Walk non-directory: %s", pathname) + if !options.AllowNonDirectory && mode&os.ModeDir == 0 { + return fmt.Errorf("cannot Walk non-directory: %s", pathname) } dirent := &Dirent{ name: filepath.Base(pathname), + path: filepath.Dir(pathname), modeType: mode & os.ModeType, } + if len(options.ScratchBuffer) < MinimumScratchBufferSize { + options.ScratchBuffer = newScratchBuffer() + } + // If ErrorCallback is nil, set to a default value that halts the walk // process on all operating system errors. This is done to allow error // handling to be more succinct in the walk code. @@ -209,15 +255,15 @@ func Walk(pathname string, options *Options) error { options.ErrorCallback = defaultErrorCallback } - if len(options.ScratchBuffer) < MinimumScratchBufferSize { - options.ScratchBuffer = make([]byte, DefaultScratchBufferSize) - } - err = walk(pathname, dirent, options) - if err == filepath.SkipDir { - return nil // silence SkipDir for top level + switch err { + case nil, SkipThis, filepath.SkipDir: + // silence SkipThis and filepath.SkipDir for top level + debug("no error of significance: %v\n", err) + return nil + default: + return err } - return err } // defaultErrorCallback always returns Halt because if the upstream code did not @@ -230,124 +276,91 @@ func defaultErrorCallback(_ string, _ error) ErrorAction { return Halt } func walk(osPathname string, dirent *Dirent, options *Options) error { err := options.Callback(osPathname, dirent) if err != nil { - if err == filepath.SkipDir { + if err == SkipThis || err == filepath.SkipDir { return err } - err = errors.Wrap(err, "Callback") // wrap potential errors returned by callback if action := options.ErrorCallback(osPathname, err); action == SkipNode { return nil } return err } - // On some platforms, an entry can have more than one mode type bit set. - // For instance, it could have both the symlink bit and the directory bit - // set indicating it's a symlink to a directory. if dirent.IsSymlink() { if !options.FollowSymbolicLinks { return nil } - // Only need to Stat entry if platform did not already have os.ModeDir - // set, such as would be the case for unix like operating systems. (This - // guard eliminates extra os.Stat check on Windows.) - if !dirent.IsDir() { - referent, err := os.Readlink(osPathname) - if err != nil { - err = errors.Wrap(err, "cannot Readlink") - if action := options.ErrorCallback(osPathname, err); action == SkipNode { - return nil - } - return err + // Does this symlink point to a directory? + info, err := os.Stat(osPathname) + if err != nil { + if action := options.ErrorCallback(osPathname, err); action == SkipNode { + return nil } - - var osp string - if filepath.IsAbs(referent) { - osp = referent - } else { - osp = filepath.Join(filepath.Dir(osPathname), referent) - } - - fi, err := os.Stat(osp) - if err != nil { - err = errors.Wrap(err, "cannot Stat") - if action := options.ErrorCallback(osp, err); action == SkipNode { - return nil - } - return err - } - dirent.modeType = fi.Mode() & os.ModeType + return err } - } - - if !dirent.IsDir() { + if !info.IsDir() { + return nil + } + } else if !dirent.IsDir() { return nil } - // If get here, then specified pathname refers to a directory. - deChildren, err := ReadDirents(osPathname, options.ScratchBuffer) + // If get here, then specified pathname refers to a directory or a + // symbolic link to a directory. + + var ds scanner + + if options.Unsorted { + // When upstream does not request a sorted iteration, it's more memory + // efficient to read a single child at a time from the file system. + ds, err = NewScanner(osPathname) + } else { + // When upstream wants a sorted iteration, we must read the entire + // directory and sort through the child names, and then iterate on each + // child. + ds, err = newSortedScanner(osPathname, options.ScratchBuffer) + } if err != nil { - err = errors.Wrap(err, "cannot ReadDirents") if action := options.ErrorCallback(osPathname, err); action == SkipNode { return nil } return err } - if !options.Unsorted { - sort.Sort(deChildren) // sort children entries unless upstream says to leave unsorted - } - - for _, deChild := range deChildren { + for ds.Scan() { + deChild, err := ds.Dirent() osChildname := filepath.Join(osPathname, deChild.name) - err = walk(osChildname, deChild, options) if err != nil { - if err != filepath.SkipDir { - return err - } - // If received skipdir on a directory, stop processing that - // directory, but continue to its siblings. If received skipdir on a - // non-directory, stop processing remaining siblings. - if deChild.IsSymlink() { - // Only need to Stat entry if platform did not already have - // os.ModeDir set, such as would be the case for unix like - // operating systems. (This guard eliminates extra os.Stat check - // on Windows.) - if !deChild.IsDir() { - // Resolve symbolic link referent to determine whether node - // is directory or not. - referent, err := os.Readlink(osChildname) - if err != nil { - err = errors.Wrap(err, "cannot Readlink") - if action := options.ErrorCallback(osChildname, err); action == SkipNode { - continue // with next child - } - return err - } - - var osp string - if filepath.IsAbs(referent) { - osp = referent - } else { - osp = filepath.Join(osPathname, referent) - } - - fi, err := os.Stat(osp) - if err != nil { - err = errors.Wrap(err, "cannot Stat") - if action := options.ErrorCallback(osp, err); action == SkipNode { - continue // with next child - } - return err - } - deChild.modeType = fi.Mode() & os.ModeType - } - } - if !deChild.IsDir() { - // If not directory, return immediately, thus skipping remainder - // of siblings. + if action := options.ErrorCallback(osChildname, err); action == SkipNode { return nil } + return err } + err = walk(osChildname, deChild, options) + debug("osChildname: %q; error: %v\n", osChildname, err) + if err == nil || err == SkipThis { + continue + } + if err != filepath.SkipDir { + return err + } + // When received SkipDir on a directory or a symbolic link to a + // directory, stop processing that directory but continue processing + // siblings. When received on a non-directory, stop processing + // remaining siblings. + isDir, err := deChild.IsDirOrSymlinkToDir() + if err != nil { + if action := options.ErrorCallback(osChildname, err); action == SkipNode { + continue // ignore and continue with next sibling + } + return err // caller does not approve of this error + } + if !isDir { + break // stop processing remaining siblings, but allow post children callback + } + // continue processing remaining siblings + } + if err = ds.Err(); err != nil { + return err } if options.PostChildrenCallback == nil { @@ -359,7 +372,6 @@ func walk(osPathname string, dirent *Dirent, options *Options) error { return err } - err = errors.Wrap(err, "PostChildrenCallback") // wrap potential errors returned by callback if action := options.ErrorCallback(osPathname, err); action == SkipNode { return nil } diff --git a/vendor/github.com/konsorten/go-windows-terminal-sequences/LICENSE b/vendor/github.com/konsorten/go-windows-terminal-sequences/LICENSE deleted file mode 100644 index 14127cd83..000000000 --- a/vendor/github.com/konsorten/go-windows-terminal-sequences/LICENSE +++ /dev/null @@ -1,9 +0,0 @@ -(The MIT License) - -Copyright (c) 2017 marvin + konsorten GmbH (open-source@konsorten.de) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/github.com/konsorten/go-windows-terminal-sequences/README.md b/vendor/github.com/konsorten/go-windows-terminal-sequences/README.md deleted file mode 100644 index 195333e51..000000000 --- a/vendor/github.com/konsorten/go-windows-terminal-sequences/README.md +++ /dev/null @@ -1,41 +0,0 @@ -# Windows Terminal Sequences - -This library allow for enabling Windows terminal color support for Go. - -See [Console Virtual Terminal Sequences](https://docs.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences) for details. - -## Usage - -```go -import ( - "syscall" - - sequences "github.com/konsorten/go-windows-terminal-sequences" -) - -func main() { - sequences.EnableVirtualTerminalProcessing(syscall.Stdout, true) -} - -``` - -## Authors - -The tool is sponsored by the [marvin + konsorten GmbH](http://www.konsorten.de). - -We thank all the authors who provided code to this library: - -* Felix Kollmann -* Nicolas Perraut - -## License - -(The MIT License) - -Copyright (c) 2018 marvin + konsorten GmbH (open-source@konsorten.de) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/github.com/konsorten/go-windows-terminal-sequences/go.mod b/vendor/github.com/konsorten/go-windows-terminal-sequences/go.mod deleted file mode 100644 index 716c61312..000000000 --- a/vendor/github.com/konsorten/go-windows-terminal-sequences/go.mod +++ /dev/null @@ -1 +0,0 @@ -module github.com/konsorten/go-windows-terminal-sequences diff --git a/vendor/github.com/konsorten/go-windows-terminal-sequences/sequences.go b/vendor/github.com/konsorten/go-windows-terminal-sequences/sequences.go deleted file mode 100644 index ef18d8f97..000000000 --- a/vendor/github.com/konsorten/go-windows-terminal-sequences/sequences.go +++ /dev/null @@ -1,36 +0,0 @@ -// +build windows - -package sequences - -import ( - "syscall" - "unsafe" -) - -var ( - kernel32Dll *syscall.LazyDLL = syscall.NewLazyDLL("Kernel32.dll") - setConsoleMode *syscall.LazyProc = kernel32Dll.NewProc("SetConsoleMode") -) - -func EnableVirtualTerminalProcessing(stream syscall.Handle, enable bool) error { - const ENABLE_VIRTUAL_TERMINAL_PROCESSING uint32 = 0x4 - - var mode uint32 - err := syscall.GetConsoleMode(syscall.Stdout, &mode) - if err != nil { - return err - } - - if enable { - mode |= ENABLE_VIRTUAL_TERMINAL_PROCESSING - } else { - mode &^= ENABLE_VIRTUAL_TERMINAL_PROCESSING - } - - ret, _, err := setConsoleMode.Call(uintptr(unsafe.Pointer(stream)), uintptr(mode)) - if ret == 0 { - return err - } - - return nil -} diff --git a/vendor/github.com/konsorten/go-windows-terminal-sequences/sequences_dummy.go b/vendor/github.com/konsorten/go-windows-terminal-sequences/sequences_dummy.go deleted file mode 100644 index df61a6f2f..000000000 --- a/vendor/github.com/konsorten/go-windows-terminal-sequences/sequences_dummy.go +++ /dev/null @@ -1,11 +0,0 @@ -// +build linux darwin - -package sequences - -import ( - "fmt" -) - -func EnableVirtualTerminalProcessing(stream uintptr, enable bool) error { - return fmt.Errorf("windows only package") -} diff --git a/vendor/github.com/gobuffalo/events/.gitignore b/vendor/github.com/markbates/errx/.gitignore similarity index 100% rename from vendor/github.com/gobuffalo/events/.gitignore rename to vendor/github.com/markbates/errx/.gitignore diff --git a/vendor/github.com/gobuffalo/mapi/LICENSE b/vendor/github.com/markbates/errx/LICENSE similarity index 97% rename from vendor/github.com/gobuffalo/mapi/LICENSE rename to vendor/github.com/markbates/errx/LICENSE index a538bcbf2..649efd437 100644 --- a/vendor/github.com/gobuffalo/mapi/LICENSE +++ b/vendor/github.com/markbates/errx/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2018 Mark Bates +Copyright (c) 2019 Mark Bates Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/github.com/gobuffalo/syncx/Makefile b/vendor/github.com/markbates/errx/Makefile similarity index 61% rename from vendor/github.com/gobuffalo/syncx/Makefile rename to vendor/github.com/markbates/errx/Makefile index 2b893c0a2..0ac539f1c 100644 --- a/vendor/github.com/gobuffalo/syncx/Makefile +++ b/vendor/github.com/markbates/errx/Makefile @@ -1,7 +1,7 @@ -TAGS ?= "sqlite" -GO_BIN ?= go +TAGS ?= "" +GO_BIN ?= "go" -install: +install: $(GO_BIN) install -tags ${TAGS} -v . make tidy @@ -13,40 +13,49 @@ else endif deps: - $(GO_BIN) get github.com/gobuffalo/release $(GO_BIN) get -tags ${TAGS} -t ./... make tidy -build: +build: $(GO_BIN) build -v . make tidy -test: - $(GO_BIN) test -tags ${TAGS} ./... +test: + $(GO_BIN) test -cover -tags ${TAGS} ./... make tidy -ci-deps: +ci-deps: $(GO_BIN) get -tags ${TAGS} -t ./... -ci-test: +ci-test: $(GO_BIN) test -tags ${TAGS} -race ./... lint: - gometalinter --vendor ./... --deadline=1m --skip=internal + go get github.com/golangci/golangci-lint/cmd/golangci-lint + golangci-lint run --enable-all make tidy update: +ifeq ($(GO111MODULE),on) + rm go.* + $(GO_BIN) mod init + $(GO_BIN) mod tidy +else $(GO_BIN) get -u -tags ${TAGS} - make tidy +endif make test make install make tidy -release-test: +release-test: $(GO_BIN) test -tags ${TAGS} -race ./... make tidy release: + $(GO_BIN) get github.com/gobuffalo/release make tidy - release -y -f version.go + release -y -f version.go --skip-packr make tidy + + + diff --git a/vendor/github.com/markbates/errx/SHOULDERS.md b/vendor/github.com/markbates/errx/SHOULDERS.md new file mode 100644 index 000000000..b19072e9f --- /dev/null +++ b/vendor/github.com/markbates/errx/SHOULDERS.md @@ -0,0 +1,6 @@ +# github.com/markbates/errx Stands on the Shoulders of Giants + +github.com/markbates/errx does not try to reinvent the wheel! Instead, it uses the already great wheels developed by the Go community and puts them all together in the best way possible. Without these giants, this project would not be possible. Please make sure to check them out and thank them for all of their hard work. + +Thank you to the following **GIANTS**: + diff --git a/vendor/github.com/gobuffalo/logger/azure-pipelines.yml b/vendor/github.com/markbates/errx/azure-pipelines.yml similarity index 61% rename from vendor/github.com/gobuffalo/logger/azure-pipelines.yml rename to vendor/github.com/markbates/errx/azure-pipelines.yml index 144c4a209..417e2c579 100644 --- a/vendor/github.com/gobuffalo/logger/azure-pipelines.yml +++ b/vendor/github.com/markbates/errx/azure-pipelines.yml @@ -9,15 +9,19 @@ jobs: vmImage: "vs2017-win2016" strategy: matrix: - go 1.9: - go_version: "1.9" go 1.10: go_version: "1.10" go 1.11 (on): - go_version: "1.11" + go_version: "1.11.5" GO111MODULE: "on" go 1.11 (off): - go_version: "1.11" + go_version: "1.11.5" + GO111MODULE: "off" + go 1.12 (on): + go_version: "1.12" + GO111MODULE: "on" + go 1.12 (off): + go_version: "1.12" GO111MODULE: "off" steps: - template: azure-tests.yml @@ -27,15 +31,19 @@ jobs: vmImage: "macOS-10.13" strategy: matrix: - go 1.9: - go_version: "1.9" go 1.10: go_version: "1.10" go 1.11 (on): - go_version: "1.11" + go_version: "1.11.5" GO111MODULE: "on" go 1.11 (off): - go_version: "1.11" + go_version: "1.11.5" + GO111MODULE: "off" + go 1.12 (on): + go_version: "1.12" + GO111MODULE: "on" + go 1.12 (off): + go_version: "1.12" GO111MODULE: "off" steps: - template: azure-tests.yml @@ -45,15 +53,19 @@ jobs: vmImage: "ubuntu-16.04" strategy: matrix: - go 1.9: - go_version: "1.9" go 1.10: go_version: "1.10" go 1.11 (on): - go_version: "1.11" + go_version: "1.11.5" GO111MODULE: "on" go 1.11 (off): - go_version: "1.11" + go_version: "1.11.5" + GO111MODULE: "off" + go 1.12 (on): + go_version: "1.12" + GO111MODULE: "on" + go 1.12 (off): + go_version: "1.12" GO111MODULE: "off" steps: - template: azure-tests.yml diff --git a/vendor/github.com/gobuffalo/logger/azure-tests.yml b/vendor/github.com/markbates/errx/azure-tests.yml similarity index 100% rename from vendor/github.com/gobuffalo/logger/azure-tests.yml rename to vendor/github.com/markbates/errx/azure-tests.yml diff --git a/vendor/github.com/markbates/errx/errx.go b/vendor/github.com/markbates/errx/errx.go new file mode 100644 index 000000000..515d9f506 --- /dev/null +++ b/vendor/github.com/markbates/errx/errx.go @@ -0,0 +1,49 @@ +package errx + +import "fmt" + +// go2 errors +type Wrapper interface { + Unwrap() error +} + +// pkg/errors +type Causer interface { + Cause() error +} + +func Unwrap(err error) error { + switch e := err.(type) { + case Wrapper: + return e.Unwrap() + case Causer: + return e.Cause() + } + return err +} + +var Cause = Unwrap + +func Wrap(err error, msg string) error { + return wrapped{ + err: err, + msg: msg, + } +} + +type wrapped struct { + err error + msg string +} + +func (w wrapped) Error() string { + return fmt.Sprintf("%s: %s", w.msg, w.err) +} + +func (w wrapped) Unwrap() error { + return w.err +} + +func (w wrapped) Cause() error { + return w.err +} diff --git a/vendor/github.com/markbates/errx/go.mod b/vendor/github.com/markbates/errx/go.mod new file mode 100644 index 000000000..179083056 --- /dev/null +++ b/vendor/github.com/markbates/errx/go.mod @@ -0,0 +1,3 @@ +module github.com/markbates/errx + +go 1.12 diff --git a/vendor/github.com/markbates/errx/go.sum b/vendor/github.com/markbates/errx/go.sum new file mode 100644 index 000000000..e69de29bb diff --git a/vendor/github.com/markbates/errx/version.go b/vendor/github.com/markbates/errx/version.go new file mode 100644 index 000000000..6b5c99b8e --- /dev/null +++ b/vendor/github.com/markbates/errx/version.go @@ -0,0 +1,4 @@ +package errx + +// Version of errx +const Version = "v1.1.0" diff --git a/vendor/github.com/markbates/oncer/LICENSE b/vendor/github.com/markbates/oncer/LICENSE index a538bcbf2..649efd437 100644 --- a/vendor/github.com/markbates/oncer/LICENSE +++ b/vendor/github.com/markbates/oncer/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2018 Mark Bates +Copyright (c) 2019 Mark Bates Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/github.com/markbates/oncer/Makefile b/vendor/github.com/markbates/oncer/Makefile index 187cb8a3f..0ac539f1c 100644 --- a/vendor/github.com/markbates/oncer/Makefile +++ b/vendor/github.com/markbates/oncer/Makefile @@ -1,40 +1,61 @@ -TAGS ?= "sqlite" -GO_BIN ?= go +TAGS ?= "" +GO_BIN ?= "go" -install: - packr - $(GO_BIN) install -v . +install: + $(GO_BIN) install -tags ${TAGS} -v . + make tidy + +tidy: +ifeq ($(GO111MODULE),on) + $(GO_BIN) mod tidy +else + echo skipping go mod tidy +endif deps: - $(GO_BIN) get github.com/gobuffalo/release - $(GO_BIN) get github.com/gobuffalo/packr/packr $(GO_BIN) get -tags ${TAGS} -t ./... - $(GO_BIN) mod tidy + make tidy -build: - packr +build: $(GO_BIN) build -v . + make tidy -test: - packr - $(GO_BIN) test -tags ${TAGS} ./... +test: + $(GO_BIN) test -cover -tags ${TAGS} ./... + make tidy -ci-test: deps +ci-deps: + $(GO_BIN) get -tags ${TAGS} -t ./... + +ci-test: $(GO_BIN) test -tags ${TAGS} -race ./... lint: - gometalinter --vendor ./... --deadline=1m --skip=internal + go get github.com/golangci/golangci-lint/cmd/golangci-lint + golangci-lint run --enable-all + make tidy update: - $(GO_BIN) get -u -tags ${TAGS} +ifeq ($(GO111MODULE),on) + rm go.* + $(GO_BIN) mod init $(GO_BIN) mod tidy - packr +else + $(GO_BIN) get -u -tags ${TAGS} +endif make test make install - $(GO_BIN) mod tidy + make tidy -release-test: +release-test: $(GO_BIN) test -tags ${TAGS} -race ./... + make tidy release: - release -y -f version.go + $(GO_BIN) get github.com/gobuffalo/release + make tidy + release -y -f version.go --skip-packr + make tidy + + + diff --git a/vendor/github.com/markbates/oncer/SHOULDERS.md b/vendor/github.com/markbates/oncer/SHOULDERS.md new file mode 100644 index 000000000..47a4cd1cf --- /dev/null +++ b/vendor/github.com/markbates/oncer/SHOULDERS.md @@ -0,0 +1,10 @@ +# github.com/markbates/oncer Stands on the Shoulders of Giants + +github.com/markbates/oncer does not try to reinvent the wheel! Instead, it uses the already great wheels developed by the Go community and puts them all together in the best way possible. Without these giants, this project would not be possible. Please make sure to check them out and thank them for all of their hard work. + +Thank you to the following **GIANTS**: + + +* [github.com/davecgh/go-spew](https://godoc.org/github.com/davecgh/go-spew) + +* [github.com/stretchr/testify](https://godoc.org/github.com/stretchr/testify) diff --git a/vendor/github.com/gobuffalo/packd/azure-pipelines.yml b/vendor/github.com/markbates/oncer/azure-pipelines.yml similarity index 57% rename from vendor/github.com/gobuffalo/packd/azure-pipelines.yml rename to vendor/github.com/markbates/oncer/azure-pipelines.yml index 144c4a209..bfda076f5 100644 --- a/vendor/github.com/gobuffalo/packd/azure-pipelines.yml +++ b/vendor/github.com/markbates/oncer/azure-pipelines.yml @@ -9,15 +9,17 @@ jobs: vmImage: "vs2017-win2016" strategy: matrix: - go 1.9: - go_version: "1.9" - go 1.10: - go_version: "1.10" go 1.11 (on): - go_version: "1.11" + go_version: "1.11.11" GO111MODULE: "on" go 1.11 (off): - go_version: "1.11" + go_version: "1.11.11" + GO111MODULE: "off" + go 1.12 (on): + go_version: "1.12.6" + GO111MODULE: "on" + go 1.12 (off): + go_version: "1.12.6" GO111MODULE: "off" steps: - template: azure-tests.yml @@ -27,15 +29,17 @@ jobs: vmImage: "macOS-10.13" strategy: matrix: - go 1.9: - go_version: "1.9" - go 1.10: - go_version: "1.10" go 1.11 (on): - go_version: "1.11" + go_version: "1.11.11" GO111MODULE: "on" go 1.11 (off): - go_version: "1.11" + go_version: "1.11.11" + GO111MODULE: "off" + go 1.12 (on): + go_version: "1.12.6" + GO111MODULE: "on" + go 1.12 (off): + go_version: "1.12.6" GO111MODULE: "off" steps: - template: azure-tests.yml @@ -45,15 +49,17 @@ jobs: vmImage: "ubuntu-16.04" strategy: matrix: - go 1.9: - go_version: "1.9" - go 1.10: - go_version: "1.10" go 1.11 (on): - go_version: "1.11" + go_version: "1.11.11" GO111MODULE: "on" go 1.11 (off): - go_version: "1.11" + go_version: "1.11.11" + GO111MODULE: "off" + go 1.12 (on): + go_version: "1.12.6" + GO111MODULE: "on" + go 1.12 (off): + go_version: "1.12.6" GO111MODULE: "off" steps: - template: azure-tests.yml diff --git a/vendor/github.com/gobuffalo/packd/azure-tests.yml b/vendor/github.com/markbates/oncer/azure-tests.yml similarity index 100% rename from vendor/github.com/gobuffalo/packd/azure-tests.yml rename to vendor/github.com/markbates/oncer/azure-tests.yml diff --git a/vendor/github.com/markbates/oncer/go.mod b/vendor/github.com/markbates/oncer/go.mod index 950e99b23..e132fa3f9 100644 --- a/vendor/github.com/markbates/oncer/go.mod +++ b/vendor/github.com/markbates/oncer/go.mod @@ -1,7 +1,8 @@ module github.com/markbates/oncer +go 1.12 + require ( github.com/davecgh/go-spew v1.1.1 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/stretchr/testify v1.2.2 + github.com/stretchr/testify v1.3.0 ) diff --git a/vendor/github.com/markbates/oncer/go.sum b/vendor/github.com/markbates/oncer/go.sum index e03ee77d9..4f76e62c1 100644 --- a/vendor/github.com/markbates/oncer/go.sum +++ b/vendor/github.com/markbates/oncer/go.sum @@ -1,6 +1,9 @@ +github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= diff --git a/vendor/github.com/markbates/oncer/version.go b/vendor/github.com/markbates/oncer/version.go new file mode 100644 index 000000000..8b7448d8f --- /dev/null +++ b/vendor/github.com/markbates/oncer/version.go @@ -0,0 +1,4 @@ +package oncer + +// Version of oncer +const Version = "v1.0.0" diff --git a/vendor/github.com/rogpeppe/go-internal/LICENSE b/vendor/github.com/rogpeppe/go-internal/LICENSE deleted file mode 100644 index 49ea0f928..000000000 --- a/vendor/github.com/rogpeppe/go-internal/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2018 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/rogpeppe/go-internal/modfile/gopkgin.go b/vendor/github.com/rogpeppe/go-internal/modfile/gopkgin.go deleted file mode 100644 index c94b3848a..000000000 --- a/vendor/github.com/rogpeppe/go-internal/modfile/gopkgin.go +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright 2018 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// TODO: Figure out what gopkg.in should do. - -package modfile - -import "strings" - -// ParseGopkgIn splits gopkg.in import paths into their constituent parts -func ParseGopkgIn(path string) (root, repo, major, subdir string, ok bool) { - if !strings.HasPrefix(path, "gopkg.in/") { - return - } - f := strings.Split(path, "/") - if len(f) >= 2 { - if elem, v, ok := dotV(f[1]); ok { - root = strings.Join(f[:2], "/") - repo = "github.com/go-" + elem + "/" + elem - major = v - subdir = strings.Join(f[2:], "/") - return root, repo, major, subdir, true - } - } - if len(f) >= 3 { - if elem, v, ok := dotV(f[2]); ok { - root = strings.Join(f[:3], "/") - repo = "github.com/" + f[1] + "/" + elem - major = v - subdir = strings.Join(f[3:], "/") - return root, repo, major, subdir, true - } - } - return -} - -func dotV(name string) (elem, v string, ok bool) { - i := len(name) - 1 - for i >= 0 && '0' <= name[i] && name[i] <= '9' { - i-- - } - if i <= 2 || i+1 >= len(name) || name[i-1] != '.' || name[i] != 'v' || name[i+1] == '0' && len(name) != i+2 { - return "", "", false - } - return name[:i-1], name[i:], true -} diff --git a/vendor/github.com/rogpeppe/go-internal/modfile/print.go b/vendor/github.com/rogpeppe/go-internal/modfile/print.go deleted file mode 100644 index 7b1dd8f95..000000000 --- a/vendor/github.com/rogpeppe/go-internal/modfile/print.go +++ /dev/null @@ -1,164 +0,0 @@ -// Copyright 2018 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package modfile implements parsing and formatting for -// go.mod files. -package modfile - -import ( - "bytes" - "fmt" - "strings" -) - -func Format(f *FileSyntax) []byte { - pr := &printer{} - pr.file(f) - return pr.Bytes() -} - -// A printer collects the state during printing of a file or expression. -type printer struct { - bytes.Buffer // output buffer - comment []Comment // pending end-of-line comments - margin int // left margin (indent), a number of tabs -} - -// printf prints to the buffer. -func (p *printer) printf(format string, args ...interface{}) { - fmt.Fprintf(p, format, args...) -} - -// indent returns the position on the current line, in bytes, 0-indexed. -func (p *printer) indent() int { - b := p.Bytes() - n := 0 - for n < len(b) && b[len(b)-1-n] != '\n' { - n++ - } - return n -} - -// newline ends the current line, flushing end-of-line comments. -func (p *printer) newline() { - if len(p.comment) > 0 { - p.printf(" ") - for i, com := range p.comment { - if i > 0 { - p.trim() - p.printf("\n") - for i := 0; i < p.margin; i++ { - p.printf("\t") - } - } - p.printf("%s", strings.TrimSpace(com.Token)) - } - p.comment = p.comment[:0] - } - - p.trim() - p.printf("\n") - for i := 0; i < p.margin; i++ { - p.printf("\t") - } -} - -// trim removes trailing spaces and tabs from the current line. -func (p *printer) trim() { - // Remove trailing spaces and tabs from line we're about to end. - b := p.Bytes() - n := len(b) - for n > 0 && (b[n-1] == '\t' || b[n-1] == ' ') { - n-- - } - p.Truncate(n) -} - -// file formats the given file into the print buffer. -func (p *printer) file(f *FileSyntax) { - for _, com := range f.Before { - p.printf("%s", strings.TrimSpace(com.Token)) - p.newline() - } - - for i, stmt := range f.Stmt { - switch x := stmt.(type) { - case *CommentBlock: - // comments already handled - p.expr(x) - - default: - p.expr(x) - p.newline() - } - - for _, com := range stmt.Comment().After { - p.printf("%s", strings.TrimSpace(com.Token)) - p.newline() - } - - if i+1 < len(f.Stmt) { - p.newline() - } - } -} - -func (p *printer) expr(x Expr) { - // Emit line-comments preceding this expression. - if before := x.Comment().Before; len(before) > 0 { - // Want to print a line comment. - // Line comments must be at the current margin. - p.trim() - if p.indent() > 0 { - // There's other text on the line. Start a new line. - p.printf("\n") - } - // Re-indent to margin. - for i := 0; i < p.margin; i++ { - p.printf("\t") - } - for _, com := range before { - p.printf("%s", strings.TrimSpace(com.Token)) - p.newline() - } - } - - switch x := x.(type) { - default: - panic(fmt.Errorf("printer: unexpected type %T", x)) - - case *CommentBlock: - // done - - case *LParen: - p.printf("(") - case *RParen: - p.printf(")") - - case *Line: - sep := "" - for _, tok := range x.Token { - p.printf("%s%s", sep, tok) - sep = " " - } - - case *LineBlock: - for _, tok := range x.Token { - p.printf("%s ", tok) - } - p.expr(&x.LParen) - p.margin++ - for _, l := range x.Line { - p.newline() - p.expr(l) - } - p.margin-- - p.newline() - p.expr(&x.RParen) - } - - // Queue end-of-line comments for printing when we - // reach the end of the line. - p.comment = append(p.comment, x.Comment().Suffix...) -} diff --git a/vendor/github.com/rogpeppe/go-internal/modfile/read.go b/vendor/github.com/rogpeppe/go-internal/modfile/read.go deleted file mode 100644 index 1d81ff1ab..000000000 --- a/vendor/github.com/rogpeppe/go-internal/modfile/read.go +++ /dev/null @@ -1,869 +0,0 @@ -// Copyright 2018 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Module file parser. -// This is a simplified copy of Google's buildifier parser. - -package modfile - -import ( - "bytes" - "fmt" - "os" - "strconv" - "strings" - "unicode" - "unicode/utf8" -) - -// A Position describes the position between two bytes of input. -type Position struct { - Line int // line in input (starting at 1) - LineRune int // rune in line (starting at 1) - Byte int // byte in input (starting at 0) -} - -// add returns the position at the end of s, assuming it starts at p. -func (p Position) add(s string) Position { - p.Byte += len(s) - if n := strings.Count(s, "\n"); n > 0 { - p.Line += n - s = s[strings.LastIndex(s, "\n")+1:] - p.LineRune = 1 - } - p.LineRune += utf8.RuneCountInString(s) - return p -} - -// An Expr represents an input element. -type Expr interface { - // Span returns the start and end position of the expression, - // excluding leading or trailing comments. - Span() (start, end Position) - - // Comment returns the comments attached to the expression. - // This method would normally be named 'Comments' but that - // would interfere with embedding a type of the same name. - Comment() *Comments -} - -// A Comment represents a single // comment. -type Comment struct { - Start Position - Token string // without trailing newline - Suffix bool // an end of line (not whole line) comment -} - -// Comments collects the comments associated with an expression. -type Comments struct { - Before []Comment // whole-line comments before this expression - Suffix []Comment // end-of-line comments after this expression - - // For top-level expressions only, After lists whole-line - // comments following the expression. - After []Comment -} - -// Comment returns the receiver. This isn't useful by itself, but -// a Comments struct is embedded into all the expression -// implementation types, and this gives each of those a Comment -// method to satisfy the Expr interface. -func (c *Comments) Comment() *Comments { - return c -} - -// A FileSyntax represents an entire go.mod file. -type FileSyntax struct { - Name string // file path - Comments - Stmt []Expr -} - -func (x *FileSyntax) Span() (start, end Position) { - if len(x.Stmt) == 0 { - return - } - start, _ = x.Stmt[0].Span() - _, end = x.Stmt[len(x.Stmt)-1].Span() - return start, end -} - -func (x *FileSyntax) addLine(hint Expr, tokens ...string) *Line { - if hint == nil { - // If no hint given, add to the last statement of the given type. - Loop: - for i := len(x.Stmt) - 1; i >= 0; i-- { - stmt := x.Stmt[i] - switch stmt := stmt.(type) { - case *Line: - if stmt.Token != nil && stmt.Token[0] == tokens[0] { - hint = stmt - break Loop - } - case *LineBlock: - if stmt.Token[0] == tokens[0] { - hint = stmt - break Loop - } - } - } - } - - if hint != nil { - for i, stmt := range x.Stmt { - switch stmt := stmt.(type) { - case *Line: - if stmt == hint { - // Convert line to line block. - stmt.InBlock = true - block := &LineBlock{Token: stmt.Token[:1], Line: []*Line{stmt}} - stmt.Token = stmt.Token[1:] - x.Stmt[i] = block - new := &Line{Token: tokens[1:], InBlock: true} - block.Line = append(block.Line, new) - return new - } - case *LineBlock: - if stmt == hint { - new := &Line{Token: tokens[1:], InBlock: true} - stmt.Line = append(stmt.Line, new) - return new - } - for j, line := range stmt.Line { - if line == hint { - // Add new line after hint. - stmt.Line = append(stmt.Line, nil) - copy(stmt.Line[j+2:], stmt.Line[j+1:]) - new := &Line{Token: tokens[1:], InBlock: true} - stmt.Line[j+1] = new - return new - } - } - } - } - } - - new := &Line{Token: tokens} - x.Stmt = append(x.Stmt, new) - return new -} - -func (x *FileSyntax) updateLine(line *Line, tokens ...string) { - if line.InBlock { - tokens = tokens[1:] - } - line.Token = tokens -} - -func (x *FileSyntax) removeLine(line *Line) { - line.Token = nil -} - -// Cleanup cleans up the file syntax x after any edit operations. -// To avoid quadratic behavior, removeLine marks the line as dead -// by setting line.Token = nil but does not remove it from the slice -// in which it appears. After edits have all been indicated, -// calling Cleanup cleans out the dead lines. -func (x *FileSyntax) Cleanup() { - w := 0 - for _, stmt := range x.Stmt { - switch stmt := stmt.(type) { - case *Line: - if stmt.Token == nil { - continue - } - case *LineBlock: - ww := 0 - for _, line := range stmt.Line { - if line.Token != nil { - stmt.Line[ww] = line - ww++ - } - } - if ww == 0 { - continue - } - if ww == 1 { - // Collapse block into single line. - line := &Line{ - Comments: Comments{ - Before: commentsAdd(stmt.Before, stmt.Line[0].Before), - Suffix: commentsAdd(stmt.Line[0].Suffix, stmt.Suffix), - After: commentsAdd(stmt.Line[0].After, stmt.After), - }, - Token: stringsAdd(stmt.Token, stmt.Line[0].Token), - } - x.Stmt[w] = line - w++ - continue - } - stmt.Line = stmt.Line[:ww] - } - x.Stmt[w] = stmt - w++ - } - x.Stmt = x.Stmt[:w] -} - -func commentsAdd(x, y []Comment) []Comment { - return append(x[:len(x):len(x)], y...) -} - -func stringsAdd(x, y []string) []string { - return append(x[:len(x):len(x)], y...) -} - -// A CommentBlock represents a top-level block of comments separate -// from any rule. -type CommentBlock struct { - Comments - Start Position -} - -func (x *CommentBlock) Span() (start, end Position) { - return x.Start, x.Start -} - -// A Line is a single line of tokens. -type Line struct { - Comments - Start Position - Token []string - InBlock bool - End Position -} - -func (x *Line) Span() (start, end Position) { - return x.Start, x.End -} - -// A LineBlock is a factored block of lines, like -// -// require ( -// "x" -// "y" -// ) -// -type LineBlock struct { - Comments - Start Position - LParen LParen - Token []string - Line []*Line - RParen RParen -} - -func (x *LineBlock) Span() (start, end Position) { - return x.Start, x.RParen.Pos.add(")") -} - -// An LParen represents the beginning of a parenthesized line block. -// It is a place to store suffix comments. -type LParen struct { - Comments - Pos Position -} - -func (x *LParen) Span() (start, end Position) { - return x.Pos, x.Pos.add(")") -} - -// An RParen represents the end of a parenthesized line block. -// It is a place to store whole-line (before) comments. -type RParen struct { - Comments - Pos Position -} - -func (x *RParen) Span() (start, end Position) { - return x.Pos, x.Pos.add(")") -} - -// An input represents a single input file being parsed. -type input struct { - // Lexing state. - filename string // name of input file, for errors - complete []byte // entire input - remaining []byte // remaining input - token []byte // token being scanned - lastToken string // most recently returned token, for error messages - pos Position // current input position - comments []Comment // accumulated comments - endRule int // position of end of current rule - - // Parser state. - file *FileSyntax // returned top-level syntax tree - parseError error // error encountered during parsing - - // Comment assignment state. - pre []Expr // all expressions, in preorder traversal - post []Expr // all expressions, in postorder traversal -} - -func newInput(filename string, data []byte) *input { - return &input{ - filename: filename, - complete: data, - remaining: data, - pos: Position{Line: 1, LineRune: 1, Byte: 0}, - } -} - -// parse parses the input file. -func parse(file string, data []byte) (f *FileSyntax, err error) { - in := newInput(file, data) - // The parser panics for both routine errors like syntax errors - // and for programmer bugs like array index errors. - // Turn both into error returns. Catching bug panics is - // especially important when processing many files. - defer func() { - if e := recover(); e != nil { - if e == in.parseError { - err = in.parseError - } else { - err = fmt.Errorf("%s:%d:%d: internal error: %v", in.filename, in.pos.Line, in.pos.LineRune, e) - } - } - }() - - // Invoke the parser. - in.parseFile() - if in.parseError != nil { - return nil, in.parseError - } - in.file.Name = in.filename - - // Assign comments to nearby syntax. - in.assignComments() - - return in.file, nil -} - -// Error is called to report an error. -// The reason s is often "syntax error". -// Error does not return: it panics. -func (in *input) Error(s string) { - if s == "syntax error" && in.lastToken != "" { - s += " near " + in.lastToken - } - in.parseError = fmt.Errorf("%s:%d:%d: %v", in.filename, in.pos.Line, in.pos.LineRune, s) - panic(in.parseError) -} - -// eof reports whether the input has reached end of file. -func (in *input) eof() bool { - return len(in.remaining) == 0 -} - -// peekRune returns the next rune in the input without consuming it. -func (in *input) peekRune() int { - if len(in.remaining) == 0 { - return 0 - } - r, _ := utf8.DecodeRune(in.remaining) - return int(r) -} - -// peekPrefix reports whether the remaining input begins with the given prefix. -func (in *input) peekPrefix(prefix string) bool { - // This is like bytes.HasPrefix(in.remaining, []byte(prefix)) - // but without the allocation of the []byte copy of prefix. - for i := 0; i < len(prefix); i++ { - if i >= len(in.remaining) || in.remaining[i] != prefix[i] { - return false - } - } - return true -} - -// readRune consumes and returns the next rune in the input. -func (in *input) readRune() int { - if len(in.remaining) == 0 { - in.Error("internal lexer error: readRune at EOF") - } - r, size := utf8.DecodeRune(in.remaining) - in.remaining = in.remaining[size:] - if r == '\n' { - in.pos.Line++ - in.pos.LineRune = 1 - } else { - in.pos.LineRune++ - } - in.pos.Byte += size - return int(r) -} - -type symType struct { - pos Position - endPos Position - text string -} - -// startToken marks the beginning of the next input token. -// It must be followed by a call to endToken, once the token has -// been consumed using readRune. -func (in *input) startToken(sym *symType) { - in.token = in.remaining - sym.text = "" - sym.pos = in.pos -} - -// endToken marks the end of an input token. -// It records the actual token string in sym.text if the caller -// has not done that already. -func (in *input) endToken(sym *symType) { - if sym.text == "" { - tok := string(in.token[:len(in.token)-len(in.remaining)]) - sym.text = tok - in.lastToken = sym.text - } - sym.endPos = in.pos -} - -// lex is called from the parser to obtain the next input token. -// It returns the token value (either a rune like '+' or a symbolic token _FOR) -// and sets val to the data associated with the token. -// For all our input tokens, the associated data is -// val.Pos (the position where the token begins) -// and val.Token (the input string corresponding to the token). -func (in *input) lex(sym *symType) int { - // Skip past spaces, stopping at non-space or EOF. - countNL := 0 // number of newlines we've skipped past - for !in.eof() { - // Skip over spaces. Count newlines so we can give the parser - // information about where top-level blank lines are, - // for top-level comment assignment. - c := in.peekRune() - if c == ' ' || c == '\t' || c == '\r' { - in.readRune() - continue - } - - // Comment runs to end of line. - if in.peekPrefix("//") { - in.startToken(sym) - - // Is this comment the only thing on its line? - // Find the last \n before this // and see if it's all - // spaces from there to here. - i := bytes.LastIndex(in.complete[:in.pos.Byte], []byte("\n")) - suffix := len(bytes.TrimSpace(in.complete[i+1:in.pos.Byte])) > 0 - in.readRune() - in.readRune() - - // Consume comment. - for len(in.remaining) > 0 && in.readRune() != '\n' { - } - in.endToken(sym) - - sym.text = strings.TrimRight(sym.text, "\n") - in.lastToken = "comment" - - // If we are at top level (not in a statement), hand the comment to - // the parser as a _COMMENT token. The grammar is written - // to handle top-level comments itself. - if !suffix { - // Not in a statement. Tell parser about top-level comment. - return _COMMENT - } - - // Otherwise, save comment for later attachment to syntax tree. - if countNL > 1 { - in.comments = append(in.comments, Comment{sym.pos, "", false}) - } - in.comments = append(in.comments, Comment{sym.pos, sym.text, suffix}) - countNL = 1 - return _EOL - } - - if in.peekPrefix("/*") { - in.Error(fmt.Sprintf("mod files must use // comments (not /* */ comments)")) - } - - // Found non-space non-comment. - break - } - - // Found the beginning of the next token. - in.startToken(sym) - defer in.endToken(sym) - - // End of file. - if in.eof() { - in.lastToken = "EOF" - return _EOF - } - - // Punctuation tokens. - switch c := in.peekRune(); c { - case '\n': - in.readRune() - return c - - case '(': - in.readRune() - return c - - case ')': - in.readRune() - return c - - case '"', '`': // quoted string - quote := c - in.readRune() - for { - if in.eof() { - in.pos = sym.pos - in.Error("unexpected EOF in string") - } - if in.peekRune() == '\n' { - in.Error("unexpected newline in string") - } - c := in.readRune() - if c == quote { - break - } - if c == '\\' && quote != '`' { - if in.eof() { - in.pos = sym.pos - in.Error("unexpected EOF in string") - } - in.readRune() - } - } - in.endToken(sym) - return _STRING - } - - // Checked all punctuation. Must be identifier token. - if c := in.peekRune(); !isIdent(c) { - in.Error(fmt.Sprintf("unexpected input character %#q", c)) - } - - // Scan over identifier. - for isIdent(in.peekRune()) { - if in.peekPrefix("//") { - break - } - if in.peekPrefix("/*") { - in.Error(fmt.Sprintf("mod files must use // comments (not /* */ comments)")) - } - in.readRune() - } - return _IDENT -} - -// isIdent reports whether c is an identifier rune. -// We treat nearly all runes as identifier runes. -func isIdent(c int) bool { - return c != 0 && !unicode.IsSpace(rune(c)) -} - -// Comment assignment. -// We build two lists of all subexpressions, preorder and postorder. -// The preorder list is ordered by start location, with outer expressions first. -// The postorder list is ordered by end location, with outer expressions last. -// We use the preorder list to assign each whole-line comment to the syntax -// immediately following it, and we use the postorder list to assign each -// end-of-line comment to the syntax immediately preceding it. - -// order walks the expression adding it and its subexpressions to the -// preorder and postorder lists. -func (in *input) order(x Expr) { - if x != nil { - in.pre = append(in.pre, x) - } - switch x := x.(type) { - default: - panic(fmt.Errorf("order: unexpected type %T", x)) - case nil: - // nothing - case *LParen, *RParen: - // nothing - case *CommentBlock: - // nothing - case *Line: - // nothing - case *FileSyntax: - for _, stmt := range x.Stmt { - in.order(stmt) - } - case *LineBlock: - in.order(&x.LParen) - for _, l := range x.Line { - in.order(l) - } - in.order(&x.RParen) - } - if x != nil { - in.post = append(in.post, x) - } -} - -// assignComments attaches comments to nearby syntax. -func (in *input) assignComments() { - const debug = false - - // Generate preorder and postorder lists. - in.order(in.file) - - // Split into whole-line comments and suffix comments. - var line, suffix []Comment - for _, com := range in.comments { - if com.Suffix { - suffix = append(suffix, com) - } else { - line = append(line, com) - } - } - - if debug { - for _, c := range line { - fmt.Fprintf(os.Stderr, "LINE %q :%d:%d #%d\n", c.Token, c.Start.Line, c.Start.LineRune, c.Start.Byte) - } - } - - // Assign line comments to syntax immediately following. - for _, x := range in.pre { - start, _ := x.Span() - if debug { - fmt.Printf("pre %T :%d:%d #%d\n", x, start.Line, start.LineRune, start.Byte) - } - xcom := x.Comment() - for len(line) > 0 && start.Byte >= line[0].Start.Byte { - if debug { - fmt.Fprintf(os.Stderr, "ASSIGN LINE %q #%d\n", line[0].Token, line[0].Start.Byte) - } - xcom.Before = append(xcom.Before, line[0]) - line = line[1:] - } - } - - // Remaining line comments go at end of file. - in.file.After = append(in.file.After, line...) - - if debug { - for _, c := range suffix { - fmt.Fprintf(os.Stderr, "SUFFIX %q :%d:%d #%d\n", c.Token, c.Start.Line, c.Start.LineRune, c.Start.Byte) - } - } - - // Assign suffix comments to syntax immediately before. - for i := len(in.post) - 1; i >= 0; i-- { - x := in.post[i] - - start, end := x.Span() - if debug { - fmt.Printf("post %T :%d:%d #%d :%d:%d #%d\n", x, start.Line, start.LineRune, start.Byte, end.Line, end.LineRune, end.Byte) - } - - // Do not assign suffix comments to end of line block or whole file. - // Instead assign them to the last element inside. - switch x.(type) { - case *FileSyntax: - continue - } - - // Do not assign suffix comments to something that starts - // on an earlier line, so that in - // - // x ( y - // z ) // comment - // - // we assign the comment to z and not to x ( ... ). - if start.Line != end.Line { - continue - } - xcom := x.Comment() - for len(suffix) > 0 && end.Byte <= suffix[len(suffix)-1].Start.Byte { - if debug { - fmt.Fprintf(os.Stderr, "ASSIGN SUFFIX %q #%d\n", suffix[len(suffix)-1].Token, suffix[len(suffix)-1].Start.Byte) - } - xcom.Suffix = append(xcom.Suffix, suffix[len(suffix)-1]) - suffix = suffix[:len(suffix)-1] - } - } - - // We assigned suffix comments in reverse. - // If multiple suffix comments were appended to the same - // expression node, they are now in reverse. Fix that. - for _, x := range in.post { - reverseComments(x.Comment().Suffix) - } - - // Remaining suffix comments go at beginning of file. - in.file.Before = append(in.file.Before, suffix...) -} - -// reverseComments reverses the []Comment list. -func reverseComments(list []Comment) { - for i, j := 0, len(list)-1; i < j; i, j = i+1, j-1 { - list[i], list[j] = list[j], list[i] - } -} - -func (in *input) parseFile() { - in.file = new(FileSyntax) - var sym symType - var cb *CommentBlock - for { - tok := in.lex(&sym) - switch tok { - case '\n': - if cb != nil { - in.file.Stmt = append(in.file.Stmt, cb) - cb = nil - } - case _COMMENT: - if cb == nil { - cb = &CommentBlock{Start: sym.pos} - } - com := cb.Comment() - com.Before = append(com.Before, Comment{Start: sym.pos, Token: sym.text}) - case _EOF: - if cb != nil { - in.file.Stmt = append(in.file.Stmt, cb) - } - return - default: - in.parseStmt(&sym) - if cb != nil { - in.file.Stmt[len(in.file.Stmt)-1].Comment().Before = cb.Before - cb = nil - } - } - } -} - -func (in *input) parseStmt(sym *symType) { - start := sym.pos - end := sym.endPos - token := []string{sym.text} - for { - tok := in.lex(sym) - switch tok { - case '\n', _EOF, _EOL: - in.file.Stmt = append(in.file.Stmt, &Line{ - Start: start, - Token: token, - End: end, - }) - return - case '(': - in.file.Stmt = append(in.file.Stmt, in.parseLineBlock(start, token, sym)) - return - default: - token = append(token, sym.text) - end = sym.endPos - } - } -} - -func (in *input) parseLineBlock(start Position, token []string, sym *symType) *LineBlock { - x := &LineBlock{ - Start: start, - Token: token, - LParen: LParen{Pos: sym.pos}, - } - var comments []Comment - for { - tok := in.lex(sym) - switch tok { - case _EOL: - // ignore - case '\n': - if len(comments) == 0 && len(x.Line) > 0 || len(comments) > 0 && comments[len(comments)-1].Token != "" { - comments = append(comments, Comment{}) - } - case _COMMENT: - comments = append(comments, Comment{Start: sym.pos, Token: sym.text}) - case _EOF: - in.Error(fmt.Sprintf("syntax error (unterminated block started at %s:%d:%d)", in.filename, x.Start.Line, x.Start.LineRune)) - case ')': - x.RParen.Before = comments - x.RParen.Pos = sym.pos - tok = in.lex(sym) - if tok != '\n' && tok != _EOF && tok != _EOL { - in.Error("syntax error (expected newline after closing paren)") - } - return x - default: - l := in.parseLine(sym) - x.Line = append(x.Line, l) - l.Comment().Before = comments - comments = nil - } - } -} - -func (in *input) parseLine(sym *symType) *Line { - start := sym.pos - end := sym.endPos - token := []string{sym.text} - for { - tok := in.lex(sym) - switch tok { - case '\n', _EOF, _EOL: - return &Line{ - Start: start, - Token: token, - End: end, - InBlock: true, - } - default: - token = append(token, sym.text) - end = sym.endPos - } - } -} - -const ( - _EOF = -(1 + iota) - _EOL - _IDENT - _STRING - _COMMENT -) - -var ( - slashSlash = []byte("//") - moduleStr = []byte("module") -) - -// ModulePath returns the module path from the gomod file text. -// If it cannot find a module path, it returns an empty string. -// It is tolerant of unrelated problems in the go.mod file. -func ModulePath(mod []byte) string { - for len(mod) > 0 { - line := mod - mod = nil - if i := bytes.IndexByte(line, '\n'); i >= 0 { - line, mod = line[:i], line[i+1:] - } - if i := bytes.Index(line, slashSlash); i >= 0 { - line = line[:i] - } - line = bytes.TrimSpace(line) - if !bytes.HasPrefix(line, moduleStr) { - continue - } - line = line[len(moduleStr):] - n := len(line) - line = bytes.TrimSpace(line) - if len(line) == n || len(line) == 0 { - continue - } - - if line[0] == '"' || line[0] == '`' { - p, err := strconv.Unquote(string(line)) - if err != nil { - return "" // malformed quoted string or multiline module path - } - return p - } - - return string(line) - } - return "" // missing module path -} diff --git a/vendor/github.com/rogpeppe/go-internal/modfile/rule.go b/vendor/github.com/rogpeppe/go-internal/modfile/rule.go deleted file mode 100644 index 24d275f12..000000000 --- a/vendor/github.com/rogpeppe/go-internal/modfile/rule.go +++ /dev/null @@ -1,724 +0,0 @@ -// Copyright 2018 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package modfile - -import ( - "bytes" - "errors" - "fmt" - "path/filepath" - "regexp" - "sort" - "strconv" - "strings" - "unicode" - - "github.com/rogpeppe/go-internal/module" - "github.com/rogpeppe/go-internal/semver" -) - -// A File is the parsed, interpreted form of a go.mod file. -type File struct { - Module *Module - Go *Go - Require []*Require - Exclude []*Exclude - Replace []*Replace - - Syntax *FileSyntax -} - -// A Module is the module statement. -type Module struct { - Mod module.Version - Syntax *Line -} - -// A Go is the go statement. -type Go struct { - Version string // "1.23" - Syntax *Line -} - -// A Require is a single require statement. -type Require struct { - Mod module.Version - Indirect bool // has "// indirect" comment - Syntax *Line -} - -// An Exclude is a single exclude statement. -type Exclude struct { - Mod module.Version - Syntax *Line -} - -// A Replace is a single replace statement. -type Replace struct { - Old module.Version - New module.Version - Syntax *Line -} - -func (f *File) AddModuleStmt(path string) error { - if f.Syntax == nil { - f.Syntax = new(FileSyntax) - } - if f.Module == nil { - f.Module = &Module{ - Mod: module.Version{Path: path}, - Syntax: f.Syntax.addLine(nil, "module", AutoQuote(path)), - } - } else { - f.Module.Mod.Path = path - f.Syntax.updateLine(f.Module.Syntax, "module", AutoQuote(path)) - } - return nil -} - -func (f *File) AddComment(text string) { - if f.Syntax == nil { - f.Syntax = new(FileSyntax) - } - f.Syntax.Stmt = append(f.Syntax.Stmt, &CommentBlock{ - Comments: Comments{ - Before: []Comment{ - { - Token: text, - }, - }, - }, - }) -} - -type VersionFixer func(path, version string) (string, error) - -// Parse parses the data, reported in errors as being from file, -// into a File struct. It applies fix, if non-nil, to canonicalize all module versions found. -func Parse(file string, data []byte, fix VersionFixer) (*File, error) { - return parseToFile(file, data, fix, true) -} - -// ParseLax is like Parse but ignores unknown statements. -// It is used when parsing go.mod files other than the main module, -// under the theory that most statement types we add in the future will -// only apply in the main module, like exclude and replace, -// and so we get better gradual deployments if old go commands -// simply ignore those statements when found in go.mod files -// in dependencies. -func ParseLax(file string, data []byte, fix VersionFixer) (*File, error) { - return parseToFile(file, data, fix, false) -} - -func parseToFile(file string, data []byte, fix VersionFixer, strict bool) (*File, error) { - fs, err := parse(file, data) - if err != nil { - return nil, err - } - f := &File{ - Syntax: fs, - } - - var errs bytes.Buffer - for _, x := range fs.Stmt { - switch x := x.(type) { - case *Line: - f.add(&errs, x, x.Token[0], x.Token[1:], fix, strict) - - case *LineBlock: - if len(x.Token) > 1 { - if strict { - fmt.Fprintf(&errs, "%s:%d: unknown block type: %s\n", file, x.Start.Line, strings.Join(x.Token, " ")) - } - continue - } - switch x.Token[0] { - default: - if strict { - fmt.Fprintf(&errs, "%s:%d: unknown block type: %s\n", file, x.Start.Line, strings.Join(x.Token, " ")) - } - continue - case "module", "require", "exclude", "replace": - for _, l := range x.Line { - f.add(&errs, l, x.Token[0], l.Token, fix, strict) - } - } - } - } - - if errs.Len() > 0 { - return nil, errors.New(strings.TrimRight(errs.String(), "\n")) - } - return f, nil -} - -var goVersionRE = regexp.MustCompile(`([1-9][0-9]*)\.(0|[1-9][0-9]*)`) - -func (f *File) add(errs *bytes.Buffer, line *Line, verb string, args []string, fix VersionFixer, strict bool) { - // If strict is false, this module is a dependency. - // We ignore all unknown directives as well as main-module-only - // directives like replace and exclude. It will work better for - // forward compatibility if we can depend on modules that have unknown - // statements (presumed relevant only when acting as the main module) - // and simply ignore those statements. - if !strict { - switch verb { - case "module", "require", "go": - // want these even for dependency go.mods - default: - return - } - } - - switch verb { - default: - fmt.Fprintf(errs, "%s:%d: unknown directive: %s\n", f.Syntax.Name, line.Start.Line, verb) - - case "go": - if f.Go != nil { - fmt.Fprintf(errs, "%s:%d: repeated go statement\n", f.Syntax.Name, line.Start.Line) - return - } - if len(args) != 1 || !goVersionRE.MatchString(args[0]) { - fmt.Fprintf(errs, "%s:%d: usage: go 1.23\n", f.Syntax.Name, line.Start.Line) - return - } - f.Go = &Go{Syntax: line} - f.Go.Version = args[0] - case "module": - if f.Module != nil { - fmt.Fprintf(errs, "%s:%d: repeated module statement\n", f.Syntax.Name, line.Start.Line) - return - } - f.Module = &Module{Syntax: line} - if len(args) != 1 { - - fmt.Fprintf(errs, "%s:%d: usage: module module/path [version]\n", f.Syntax.Name, line.Start.Line) - return - } - s, err := parseString(&args[0]) - if err != nil { - fmt.Fprintf(errs, "%s:%d: invalid quoted string: %v\n", f.Syntax.Name, line.Start.Line, err) - return - } - f.Module.Mod = module.Version{Path: s} - case "require", "exclude": - if len(args) != 2 { - fmt.Fprintf(errs, "%s:%d: usage: %s module/path v1.2.3\n", f.Syntax.Name, line.Start.Line, verb) - return - } - s, err := parseString(&args[0]) - if err != nil { - fmt.Fprintf(errs, "%s:%d: invalid quoted string: %v\n", f.Syntax.Name, line.Start.Line, err) - return - } - old := args[1] - v, err := parseVersion(s, &args[1], fix) - if err != nil { - fmt.Fprintf(errs, "%s:%d: invalid module version %q: %v\n", f.Syntax.Name, line.Start.Line, old, err) - return - } - pathMajor, err := modulePathMajor(s) - if err != nil { - fmt.Fprintf(errs, "%s:%d: %v\n", f.Syntax.Name, line.Start.Line, err) - return - } - if !module.MatchPathMajor(v, pathMajor) { - if pathMajor == "" { - pathMajor = "v0 or v1" - } - fmt.Fprintf(errs, "%s:%d: invalid module: %s should be %s, not %s (%s)\n", f.Syntax.Name, line.Start.Line, s, pathMajor, semver.Major(v), v) - return - } - if verb == "require" { - f.Require = append(f.Require, &Require{ - Mod: module.Version{Path: s, Version: v}, - Syntax: line, - Indirect: isIndirect(line), - }) - } else { - f.Exclude = append(f.Exclude, &Exclude{ - Mod: module.Version{Path: s, Version: v}, - Syntax: line, - }) - } - case "replace": - arrow := 2 - if len(args) >= 2 && args[1] == "=>" { - arrow = 1 - } - if len(args) < arrow+2 || len(args) > arrow+3 || args[arrow] != "=>" { - fmt.Fprintf(errs, "%s:%d: usage: %s module/path [v1.2.3] => other/module v1.4\n\t or %s module/path [v1.2.3] => ../local/directory\n", f.Syntax.Name, line.Start.Line, verb, verb) - return - } - s, err := parseString(&args[0]) - if err != nil { - fmt.Fprintf(errs, "%s:%d: invalid quoted string: %v\n", f.Syntax.Name, line.Start.Line, err) - return - } - pathMajor, err := modulePathMajor(s) - if err != nil { - fmt.Fprintf(errs, "%s:%d: %v\n", f.Syntax.Name, line.Start.Line, err) - return - } - var v string - if arrow == 2 { - old := args[1] - v, err = parseVersion(s, &args[1], fix) - if err != nil { - fmt.Fprintf(errs, "%s:%d: invalid module version %v: %v\n", f.Syntax.Name, line.Start.Line, old, err) - return - } - if !module.MatchPathMajor(v, pathMajor) { - if pathMajor == "" { - pathMajor = "v0 or v1" - } - fmt.Fprintf(errs, "%s:%d: invalid module: %s should be %s, not %s (%s)\n", f.Syntax.Name, line.Start.Line, s, pathMajor, semver.Major(v), v) - return - } - } - ns, err := parseString(&args[arrow+1]) - if err != nil { - fmt.Fprintf(errs, "%s:%d: invalid quoted string: %v\n", f.Syntax.Name, line.Start.Line, err) - return - } - nv := "" - if len(args) == arrow+2 { - if !IsDirectoryPath(ns) { - fmt.Fprintf(errs, "%s:%d: replacement module without version must be directory path (rooted or starting with ./ or ../)\n", f.Syntax.Name, line.Start.Line) - return - } - if filepath.Separator == '/' && strings.Contains(ns, `\`) { - fmt.Fprintf(errs, "%s:%d: replacement directory appears to be Windows path (on a non-windows system)\n", f.Syntax.Name, line.Start.Line) - return - } - } - if len(args) == arrow+3 { - old := args[arrow+1] - nv, err = parseVersion(ns, &args[arrow+2], fix) - if err != nil { - fmt.Fprintf(errs, "%s:%d: invalid module version %v: %v\n", f.Syntax.Name, line.Start.Line, old, err) - return - } - if IsDirectoryPath(ns) { - fmt.Fprintf(errs, "%s:%d: replacement module directory path %q cannot have version\n", f.Syntax.Name, line.Start.Line, ns) - return - } - } - f.Replace = append(f.Replace, &Replace{ - Old: module.Version{Path: s, Version: v}, - New: module.Version{Path: ns, Version: nv}, - Syntax: line, - }) - } -} - -// isIndirect reports whether line has a "// indirect" comment, -// meaning it is in go.mod only for its effect on indirect dependencies, -// so that it can be dropped entirely once the effective version of the -// indirect dependency reaches the given minimum version. -func isIndirect(line *Line) bool { - if len(line.Suffix) == 0 { - return false - } - f := strings.Fields(line.Suffix[0].Token) - return (len(f) == 2 && f[1] == "indirect" || len(f) > 2 && f[1] == "indirect;") && f[0] == "//" -} - -// setIndirect sets line to have (or not have) a "// indirect" comment. -func setIndirect(line *Line, indirect bool) { - if isIndirect(line) == indirect { - return - } - if indirect { - // Adding comment. - if len(line.Suffix) == 0 { - // New comment. - line.Suffix = []Comment{{Token: "// indirect", Suffix: true}} - return - } - // Insert at beginning of existing comment. - com := &line.Suffix[0] - space := " " - if len(com.Token) > 2 && com.Token[2] == ' ' || com.Token[2] == '\t' { - space = "" - } - com.Token = "// indirect;" + space + com.Token[2:] - return - } - - // Removing comment. - f := strings.Fields(line.Suffix[0].Token) - if len(f) == 2 { - // Remove whole comment. - line.Suffix = nil - return - } - - // Remove comment prefix. - com := &line.Suffix[0] - i := strings.Index(com.Token, "indirect;") - com.Token = "//" + com.Token[i+len("indirect;"):] -} - -// IsDirectoryPath reports whether the given path should be interpreted -// as a directory path. Just like on the go command line, relative paths -// and rooted paths are directory paths; the rest are module paths. -func IsDirectoryPath(ns string) bool { - // Because go.mod files can move from one system to another, - // we check all known path syntaxes, both Unix and Windows. - return strings.HasPrefix(ns, "./") || strings.HasPrefix(ns, "../") || strings.HasPrefix(ns, "/") || - strings.HasPrefix(ns, `.\`) || strings.HasPrefix(ns, `..\`) || strings.HasPrefix(ns, `\`) || - len(ns) >= 2 && ('A' <= ns[0] && ns[0] <= 'Z' || 'a' <= ns[0] && ns[0] <= 'z') && ns[1] == ':' -} - -// MustQuote reports whether s must be quoted in order to appear as -// a single token in a go.mod line. -func MustQuote(s string) bool { - for _, r := range s { - if !unicode.IsPrint(r) || r == ' ' || r == '"' || r == '\'' || r == '`' { - return true - } - } - return s == "" || strings.Contains(s, "//") || strings.Contains(s, "/*") -} - -// AutoQuote returns s or, if quoting is required for s to appear in a go.mod, -// the quotation of s. -func AutoQuote(s string) string { - if MustQuote(s) { - return strconv.Quote(s) - } - return s -} - -func parseString(s *string) (string, error) { - t := *s - if strings.HasPrefix(t, `"`) { - var err error - if t, err = strconv.Unquote(t); err != nil { - return "", err - } - } else if strings.ContainsAny(t, "\"'`") { - // Other quotes are reserved both for possible future expansion - // and to avoid confusion. For example if someone types 'x' - // we want that to be a syntax error and not a literal x in literal quotation marks. - return "", fmt.Errorf("unquoted string cannot contain quote") - } - *s = AutoQuote(t) - return t, nil -} - -func parseVersion(path string, s *string, fix VersionFixer) (string, error) { - t, err := parseString(s) - if err != nil { - return "", err - } - if fix != nil { - var err error - t, err = fix(path, t) - if err != nil { - return "", err - } - } - if v := module.CanonicalVersion(t); v != "" { - *s = v - return *s, nil - } - return "", fmt.Errorf("version must be of the form v1.2.3") -} - -func modulePathMajor(path string) (string, error) { - _, major, ok := module.SplitPathVersion(path) - if !ok { - return "", fmt.Errorf("invalid module path") - } - return major, nil -} - -func (f *File) Format() ([]byte, error) { - return Format(f.Syntax), nil -} - -// Cleanup cleans up the file f after any edit operations. -// To avoid quadratic behavior, modifications like DropRequire -// clear the entry but do not remove it from the slice. -// Cleanup cleans out all the cleared entries. -func (f *File) Cleanup() { - w := 0 - for _, r := range f.Require { - if r.Mod.Path != "" { - f.Require[w] = r - w++ - } - } - f.Require = f.Require[:w] - - w = 0 - for _, x := range f.Exclude { - if x.Mod.Path != "" { - f.Exclude[w] = x - w++ - } - } - f.Exclude = f.Exclude[:w] - - w = 0 - for _, r := range f.Replace { - if r.Old.Path != "" { - f.Replace[w] = r - w++ - } - } - f.Replace = f.Replace[:w] - - f.Syntax.Cleanup() -} - -func (f *File) AddRequire(path, vers string) error { - need := true - for _, r := range f.Require { - if r.Mod.Path == path { - if need { - r.Mod.Version = vers - f.Syntax.updateLine(r.Syntax, "require", AutoQuote(path), vers) - need = false - } else { - f.Syntax.removeLine(r.Syntax) - *r = Require{} - } - } - } - - if need { - f.AddNewRequire(path, vers, false) - } - return nil -} - -func (f *File) AddNewRequire(path, vers string, indirect bool) { - line := f.Syntax.addLine(nil, "require", AutoQuote(path), vers) - setIndirect(line, indirect) - f.Require = append(f.Require, &Require{module.Version{Path: path, Version: vers}, indirect, line}) -} - -func (f *File) SetRequire(req []*Require) { - need := make(map[string]string) - indirect := make(map[string]bool) - for _, r := range req { - need[r.Mod.Path] = r.Mod.Version - indirect[r.Mod.Path] = r.Indirect - } - - for _, r := range f.Require { - if v, ok := need[r.Mod.Path]; ok { - r.Mod.Version = v - r.Indirect = indirect[r.Mod.Path] - } - } - - var newStmts []Expr - for _, stmt := range f.Syntax.Stmt { - switch stmt := stmt.(type) { - case *LineBlock: - if len(stmt.Token) > 0 && stmt.Token[0] == "require" { - var newLines []*Line - for _, line := range stmt.Line { - if p, err := parseString(&line.Token[0]); err == nil && need[p] != "" { - line.Token[1] = need[p] - delete(need, p) - setIndirect(line, indirect[p]) - newLines = append(newLines, line) - } - } - if len(newLines) == 0 { - continue // drop stmt - } - stmt.Line = newLines - } - - case *Line: - if len(stmt.Token) > 0 && stmt.Token[0] == "require" { - if p, err := parseString(&stmt.Token[1]); err == nil && need[p] != "" { - stmt.Token[2] = need[p] - delete(need, p) - setIndirect(stmt, indirect[p]) - } else { - continue // drop stmt - } - } - } - newStmts = append(newStmts, stmt) - } - f.Syntax.Stmt = newStmts - - for path, vers := range need { - f.AddNewRequire(path, vers, indirect[path]) - } - f.SortBlocks() -} - -func (f *File) DropRequire(path string) error { - for _, r := range f.Require { - if r.Mod.Path == path { - f.Syntax.removeLine(r.Syntax) - *r = Require{} - } - } - return nil -} - -func (f *File) AddExclude(path, vers string) error { - var hint *Line - for _, x := range f.Exclude { - if x.Mod.Path == path && x.Mod.Version == vers { - return nil - } - if x.Mod.Path == path { - hint = x.Syntax - } - } - - f.Exclude = append(f.Exclude, &Exclude{Mod: module.Version{Path: path, Version: vers}, Syntax: f.Syntax.addLine(hint, "exclude", AutoQuote(path), vers)}) - return nil -} - -func (f *File) DropExclude(path, vers string) error { - for _, x := range f.Exclude { - if x.Mod.Path == path && x.Mod.Version == vers { - f.Syntax.removeLine(x.Syntax) - *x = Exclude{} - } - } - return nil -} - -func (f *File) AddReplace(oldPath, oldVers, newPath, newVers string) error { - need := true - old := module.Version{Path: oldPath, Version: oldVers} - new := module.Version{Path: newPath, Version: newVers} - tokens := []string{"replace", AutoQuote(oldPath)} - if oldVers != "" { - tokens = append(tokens, oldVers) - } - tokens = append(tokens, "=>", AutoQuote(newPath)) - if newVers != "" { - tokens = append(tokens, newVers) - } - - var hint *Line - for _, r := range f.Replace { - if r.Old.Path == oldPath && (oldVers == "" || r.Old.Version == oldVers) { - if need { - // Found replacement for old; update to use new. - r.New = new - f.Syntax.updateLine(r.Syntax, tokens...) - need = false - continue - } - // Already added; delete other replacements for same. - f.Syntax.removeLine(r.Syntax) - *r = Replace{} - } - if r.Old.Path == oldPath { - hint = r.Syntax - } - } - if need { - f.Replace = append(f.Replace, &Replace{Old: old, New: new, Syntax: f.Syntax.addLine(hint, tokens...)}) - } - return nil -} - -func (f *File) DropReplace(oldPath, oldVers string) error { - for _, r := range f.Replace { - if r.Old.Path == oldPath && r.Old.Version == oldVers { - f.Syntax.removeLine(r.Syntax) - *r = Replace{} - } - } - return nil -} - -func (f *File) SortBlocks() { - f.removeDups() // otherwise sorting is unsafe - - for _, stmt := range f.Syntax.Stmt { - block, ok := stmt.(*LineBlock) - if !ok { - continue - } - sort.Slice(block.Line, func(i, j int) bool { - li := block.Line[i] - lj := block.Line[j] - for k := 0; k < len(li.Token) && k < len(lj.Token); k++ { - if li.Token[k] != lj.Token[k] { - return li.Token[k] < lj.Token[k] - } - } - return len(li.Token) < len(lj.Token) - }) - } -} - -func (f *File) removeDups() { - have := make(map[module.Version]bool) - kill := make(map[*Line]bool) - for _, x := range f.Exclude { - if have[x.Mod] { - kill[x.Syntax] = true - continue - } - have[x.Mod] = true - } - var excl []*Exclude - for _, x := range f.Exclude { - if !kill[x.Syntax] { - excl = append(excl, x) - } - } - f.Exclude = excl - - have = make(map[module.Version]bool) - // Later replacements take priority over earlier ones. - for i := len(f.Replace) - 1; i >= 0; i-- { - x := f.Replace[i] - if have[x.Old] { - kill[x.Syntax] = true - continue - } - have[x.Old] = true - } - var repl []*Replace - for _, x := range f.Replace { - if !kill[x.Syntax] { - repl = append(repl, x) - } - } - f.Replace = repl - - var stmts []Expr - for _, stmt := range f.Syntax.Stmt { - switch stmt := stmt.(type) { - case *Line: - if kill[stmt] { - continue - } - case *LineBlock: - var lines []*Line - for _, line := range stmt.Line { - if !kill[line] { - lines = append(lines, line) - } - } - stmt.Line = lines - if len(lines) == 0 { - continue - } - } - stmts = append(stmts, stmt) - } - f.Syntax.Stmt = stmts -} diff --git a/vendor/github.com/rogpeppe/go-internal/module/module.go b/vendor/github.com/rogpeppe/go-internal/module/module.go deleted file mode 100644 index 3ff6d9bf5..000000000 --- a/vendor/github.com/rogpeppe/go-internal/module/module.go +++ /dev/null @@ -1,540 +0,0 @@ -// Copyright 2018 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package module defines the module.Version type -// along with support code. -package module - -// IMPORTANT NOTE -// -// This file essentially defines the set of valid import paths for the go command. -// There are many subtle considerations, including Unicode ambiguity, -// security, network, and file system representations. -// -// This file also defines the set of valid module path and version combinations, -// another topic with many subtle considerations. -// -// Changes to the semantics in this file require approval from rsc. - -import ( - "fmt" - "sort" - "strings" - "unicode" - "unicode/utf8" - - "github.com/rogpeppe/go-internal/semver" -) - -// A Version is defined by a module path and version pair. -type Version struct { - Path string - - // Version is usually a semantic version in canonical form. - // There are two exceptions to this general rule. - // First, the top-level target of a build has no specific version - // and uses Version = "". - // Second, during MVS calculations the version "none" is used - // to represent the decision to take no version of a given module. - Version string `json:",omitempty"` -} - -// Check checks that a given module path, version pair is valid. -// In addition to the path being a valid module path -// and the version being a valid semantic version, -// the two must correspond. -// For example, the path "yaml/v2" only corresponds to -// semantic versions beginning with "v2.". -func Check(path, version string) error { - if err := CheckPath(path); err != nil { - return err - } - if !semver.IsValid(version) { - return fmt.Errorf("malformed semantic version %v", version) - } - _, pathMajor, _ := SplitPathVersion(path) - if !MatchPathMajor(version, pathMajor) { - if pathMajor == "" { - pathMajor = "v0 or v1" - } - if pathMajor[0] == '.' { // .v1 - pathMajor = pathMajor[1:] - } - return fmt.Errorf("mismatched module path %v and version %v (want %v)", path, version, pathMajor) - } - return nil -} - -// firstPathOK reports whether r can appear in the first element of a module path. -// The first element of the path must be an LDH domain name, at least for now. -// To avoid case ambiguity, the domain name must be entirely lower case. -func firstPathOK(r rune) bool { - return r == '-' || r == '.' || - '0' <= r && r <= '9' || - 'a' <= r && r <= 'z' -} - -// pathOK reports whether r can appear in an import path element. -// Paths can be ASCII letters, ASCII digits, and limited ASCII punctuation: + - . _ and ~. -// This matches what "go get" has historically recognized in import paths. -// TODO(rsc): We would like to allow Unicode letters, but that requires additional -// care in the safe encoding (see note below). -func pathOK(r rune) bool { - if r < utf8.RuneSelf { - return r == '+' || r == '-' || r == '.' || r == '_' || r == '~' || - '0' <= r && r <= '9' || - 'A' <= r && r <= 'Z' || - 'a' <= r && r <= 'z' - } - return false -} - -// fileNameOK reports whether r can appear in a file name. -// For now we allow all Unicode letters but otherwise limit to pathOK plus a few more punctuation characters. -// If we expand the set of allowed characters here, we have to -// work harder at detecting potential case-folding and normalization collisions. -// See note about "safe encoding" below. -func fileNameOK(r rune) bool { - if r < utf8.RuneSelf { - // Entire set of ASCII punctuation, from which we remove characters: - // ! " # $ % & ' ( ) * + , - . / : ; < = > ? @ [ \ ] ^ _ ` { | } ~ - // We disallow some shell special characters: " ' * < > ? ` | - // (Note that some of those are disallowed by the Windows file system as well.) - // We also disallow path separators / : and \ (fileNameOK is only called on path element characters). - // We allow spaces (U+0020) in file names. - const allowed = "!#$%&()+,-.=@[]^_{}~ " - if '0' <= r && r <= '9' || 'A' <= r && r <= 'Z' || 'a' <= r && r <= 'z' { - return true - } - for i := 0; i < len(allowed); i++ { - if rune(allowed[i]) == r { - return true - } - } - return false - } - // It may be OK to add more ASCII punctuation here, but only carefully. - // For example Windows disallows < > \, and macOS disallows :, so we must not allow those. - return unicode.IsLetter(r) -} - -// CheckPath checks that a module path is valid. -func CheckPath(path string) error { - if err := checkPath(path, false); err != nil { - return fmt.Errorf("malformed module path %q: %v", path, err) - } - i := strings.Index(path, "/") - if i < 0 { - i = len(path) - } - if i == 0 { - return fmt.Errorf("malformed module path %q: leading slash", path) - } - if !strings.Contains(path[:i], ".") { - return fmt.Errorf("malformed module path %q: missing dot in first path element", path) - } - if path[0] == '-' { - return fmt.Errorf("malformed module path %q: leading dash in first path element", path) - } - for _, r := range path[:i] { - if !firstPathOK(r) { - return fmt.Errorf("malformed module path %q: invalid char %q in first path element", path, r) - } - } - if _, _, ok := SplitPathVersion(path); !ok { - return fmt.Errorf("malformed module path %q: invalid version", path) - } - return nil -} - -// CheckImportPath checks that an import path is valid. -func CheckImportPath(path string) error { - if err := checkPath(path, false); err != nil { - return fmt.Errorf("malformed import path %q: %v", path, err) - } - return nil -} - -// checkPath checks that a general path is valid. -// It returns an error describing why but not mentioning path. -// Because these checks apply to both module paths and import paths, -// the caller is expected to add the "malformed ___ path %q: " prefix. -// fileName indicates whether the final element of the path is a file name -// (as opposed to a directory name). -func checkPath(path string, fileName bool) error { - if !utf8.ValidString(path) { - return fmt.Errorf("invalid UTF-8") - } - if path == "" { - return fmt.Errorf("empty string") - } - if strings.Contains(path, "..") { - return fmt.Errorf("double dot") - } - if strings.Contains(path, "//") { - return fmt.Errorf("double slash") - } - if path[len(path)-1] == '/' { - return fmt.Errorf("trailing slash") - } - elemStart := 0 - for i, r := range path { - if r == '/' { - if err := checkElem(path[elemStart:i], fileName); err != nil { - return err - } - elemStart = i + 1 - } - } - if err := checkElem(path[elemStart:], fileName); err != nil { - return err - } - return nil -} - -// checkElem checks whether an individual path element is valid. -// fileName indicates whether the element is a file name (not a directory name). -func checkElem(elem string, fileName bool) error { - if elem == "" { - return fmt.Errorf("empty path element") - } - if strings.Count(elem, ".") == len(elem) { - return fmt.Errorf("invalid path element %q", elem) - } - if elem[0] == '.' && !fileName { - return fmt.Errorf("leading dot in path element") - } - if elem[len(elem)-1] == '.' { - return fmt.Errorf("trailing dot in path element") - } - charOK := pathOK - if fileName { - charOK = fileNameOK - } - for _, r := range elem { - if !charOK(r) { - return fmt.Errorf("invalid char %q", r) - } - } - - // Windows disallows a bunch of path elements, sadly. - // See https://docs.microsoft.com/en-us/windows/desktop/fileio/naming-a-file - short := elem - if i := strings.Index(short, "."); i >= 0 { - short = short[:i] - } - for _, bad := range badWindowsNames { - if strings.EqualFold(bad, short) { - return fmt.Errorf("disallowed path element %q", elem) - } - } - return nil -} - -// CheckFilePath checks whether a slash-separated file path is valid. -func CheckFilePath(path string) error { - if err := checkPath(path, true); err != nil { - return fmt.Errorf("malformed file path %q: %v", path, err) - } - return nil -} - -// badWindowsNames are the reserved file path elements on Windows. -// See https://docs.microsoft.com/en-us/windows/desktop/fileio/naming-a-file -var badWindowsNames = []string{ - "CON", - "PRN", - "AUX", - "NUL", - "COM1", - "COM2", - "COM3", - "COM4", - "COM5", - "COM6", - "COM7", - "COM8", - "COM9", - "LPT1", - "LPT2", - "LPT3", - "LPT4", - "LPT5", - "LPT6", - "LPT7", - "LPT8", - "LPT9", -} - -// SplitPathVersion returns prefix and major version such that prefix+pathMajor == path -// and version is either empty or "/vN" for N >= 2. -// As a special case, gopkg.in paths are recognized directly; -// they require ".vN" instead of "/vN", and for all N, not just N >= 2. -func SplitPathVersion(path string) (prefix, pathMajor string, ok bool) { - if strings.HasPrefix(path, "gopkg.in/") { - return splitGopkgIn(path) - } - - i := len(path) - dot := false - for i > 0 && ('0' <= path[i-1] && path[i-1] <= '9' || path[i-1] == '.') { - if path[i-1] == '.' { - dot = true - } - i-- - } - if i <= 1 || path[i-1] != 'v' || path[i-2] != '/' { - return path, "", true - } - prefix, pathMajor = path[:i-2], path[i-2:] - if dot || len(pathMajor) <= 2 || pathMajor[2] == '0' || pathMajor == "/v1" { - return path, "", false - } - return prefix, pathMajor, true -} - -// splitGopkgIn is like SplitPathVersion but only for gopkg.in paths. -func splitGopkgIn(path string) (prefix, pathMajor string, ok bool) { - if !strings.HasPrefix(path, "gopkg.in/") { - return path, "", false - } - i := len(path) - if strings.HasSuffix(path, "-unstable") { - i -= len("-unstable") - } - for i > 0 && ('0' <= path[i-1] && path[i-1] <= '9') { - i-- - } - if i <= 1 || path[i-1] != 'v' || path[i-2] != '.' { - // All gopkg.in paths must end in vN for some N. - return path, "", false - } - prefix, pathMajor = path[:i-2], path[i-2:] - if len(pathMajor) <= 2 || pathMajor[2] == '0' && pathMajor != ".v0" { - return path, "", false - } - return prefix, pathMajor, true -} - -// MatchPathMajor reports whether the semantic version v -// matches the path major version pathMajor. -func MatchPathMajor(v, pathMajor string) bool { - if strings.HasPrefix(pathMajor, ".v") && strings.HasSuffix(pathMajor, "-unstable") { - pathMajor = strings.TrimSuffix(pathMajor, "-unstable") - } - if strings.HasPrefix(v, "v0.0.0-") && pathMajor == ".v1" { - // Allow old bug in pseudo-versions that generated v0.0.0- pseudoversion for gopkg .v1. - // For example, gopkg.in/yaml.v2@v2.2.1's go.mod requires gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405. - return true - } - m := semver.Major(v) - if pathMajor == "" { - return m == "v0" || m == "v1" || semver.Build(v) == "+incompatible" - } - return (pathMajor[0] == '/' || pathMajor[0] == '.') && m == pathMajor[1:] -} - -// CanonicalVersion returns the canonical form of the version string v. -// It is the same as semver.Canonical(v) except that it preserves the special build suffix "+incompatible". -func CanonicalVersion(v string) string { - cv := semver.Canonical(v) - if semver.Build(v) == "+incompatible" { - cv += "+incompatible" - } - return cv -} - -// Sort sorts the list by Path, breaking ties by comparing Versions. -func Sort(list []Version) { - sort.Slice(list, func(i, j int) bool { - mi := list[i] - mj := list[j] - if mi.Path != mj.Path { - return mi.Path < mj.Path - } - // To help go.sum formatting, allow version/file. - // Compare semver prefix by semver rules, - // file by string order. - vi := mi.Version - vj := mj.Version - var fi, fj string - if k := strings.Index(vi, "/"); k >= 0 { - vi, fi = vi[:k], vi[k:] - } - if k := strings.Index(vj, "/"); k >= 0 { - vj, fj = vj[:k], vj[k:] - } - if vi != vj { - return semver.Compare(vi, vj) < 0 - } - return fi < fj - }) -} - -// Safe encodings -// -// Module paths appear as substrings of file system paths -// (in the download cache) and of web server URLs in the proxy protocol. -// In general we cannot rely on file systems to be case-sensitive, -// nor can we rely on web servers, since they read from file systems. -// That is, we cannot rely on the file system to keep rsc.io/QUOTE -// and rsc.io/quote separate. Windows and macOS don't. -// Instead, we must never require two different casings of a file path. -// Because we want the download cache to match the proxy protocol, -// and because we want the proxy protocol to be possible to serve -// from a tree of static files (which might be stored on a case-insensitive -// file system), the proxy protocol must never require two different casings -// of a URL path either. -// -// One possibility would be to make the safe encoding be the lowercase -// hexadecimal encoding of the actual path bytes. This would avoid ever -// needing different casings of a file path, but it would be fairly illegible -// to most programmers when those paths appeared in the file system -// (including in file paths in compiler errors and stack traces) -// in web server logs, and so on. Instead, we want a safe encoding that -// leaves most paths unaltered. -// -// The safe encoding is this: -// replace every uppercase letter with an exclamation mark -// followed by the letter's lowercase equivalent. -// -// For example, -// github.com/Azure/azure-sdk-for-go -> github.com/!azure/azure-sdk-for-go. -// github.com/GoogleCloudPlatform/cloudsql-proxy -> github.com/!google!cloud!platform/cloudsql-proxy -// github.com/Sirupsen/logrus -> github.com/!sirupsen/logrus. -// -// Import paths that avoid upper-case letters are left unchanged. -// Note that because import paths are ASCII-only and avoid various -// problematic punctuation (like : < and >), the safe encoding is also ASCII-only -// and avoids the same problematic punctuation. -// -// Import paths have never allowed exclamation marks, so there is no -// need to define how to encode a literal !. -// -// Although paths are disallowed from using Unicode (see pathOK above), -// the eventual plan is to allow Unicode letters as well, to assume that -// file systems and URLs are Unicode-safe (storing UTF-8), and apply -// the !-for-uppercase convention. Note however that not all runes that -// are different but case-fold equivalent are an upper/lower pair. -// For example, U+004B ('K'), U+006B ('k'), and U+212A ('K' for Kelvin) -// are considered to case-fold to each other. When we do add Unicode -// letters, we must not assume that upper/lower are the only case-equivalent pairs. -// Perhaps the Kelvin symbol would be disallowed entirely, for example. -// Or perhaps it would encode as "!!k", or perhaps as "(212A)". -// -// Also, it would be nice to allow Unicode marks as well as letters, -// but marks include combining marks, and then we must deal not -// only with case folding but also normalization: both U+00E9 ('é') -// and U+0065 U+0301 ('e' followed by combining acute accent) -// look the same on the page and are treated by some file systems -// as the same path. If we do allow Unicode marks in paths, there -// must be some kind of normalization to allow only one canonical -// encoding of any character used in an import path. - -// EncodePath returns the safe encoding of the given module path. -// It fails if the module path is invalid. -func EncodePath(path string) (encoding string, err error) { - if err := CheckPath(path); err != nil { - return "", err - } - - return encodeString(path) -} - -// EncodeVersion returns the safe encoding of the given module version. -// Versions are allowed to be in non-semver form but must be valid file names -// and not contain exclamation marks. -func EncodeVersion(v string) (encoding string, err error) { - if err := checkElem(v, true); err != nil || strings.Contains(v, "!") { - return "", fmt.Errorf("disallowed version string %q", v) - } - return encodeString(v) -} - -func encodeString(s string) (encoding string, err error) { - haveUpper := false - for _, r := range s { - if r == '!' || r >= utf8.RuneSelf { - // This should be disallowed by CheckPath, but diagnose anyway. - // The correctness of the encoding loop below depends on it. - return "", fmt.Errorf("internal error: inconsistency in EncodePath") - } - if 'A' <= r && r <= 'Z' { - haveUpper = true - } - } - - if !haveUpper { - return s, nil - } - - var buf []byte - for _, r := range s { - if 'A' <= r && r <= 'Z' { - buf = append(buf, '!', byte(r+'a'-'A')) - } else { - buf = append(buf, byte(r)) - } - } - return string(buf), nil -} - -// DecodePath returns the module path of the given safe encoding. -// It fails if the encoding is invalid or encodes an invalid path. -func DecodePath(encoding string) (path string, err error) { - path, ok := decodeString(encoding) - if !ok { - return "", fmt.Errorf("invalid module path encoding %q", encoding) - } - if err := CheckPath(path); err != nil { - return "", fmt.Errorf("invalid module path encoding %q: %v", encoding, err) - } - return path, nil -} - -// DecodeVersion returns the version string for the given safe encoding. -// It fails if the encoding is invalid or encodes an invalid version. -// Versions are allowed to be in non-semver form but must be valid file names -// and not contain exclamation marks. -func DecodeVersion(encoding string) (v string, err error) { - v, ok := decodeString(encoding) - if !ok { - return "", fmt.Errorf("invalid version encoding %q", encoding) - } - if err := checkElem(v, true); err != nil { - return "", fmt.Errorf("disallowed version string %q", v) - } - return v, nil -} - -func decodeString(encoding string) (string, bool) { - var buf []byte - - bang := false - for _, r := range encoding { - if r >= utf8.RuneSelf { - return "", false - } - if bang { - bang = false - if r < 'a' || 'z' < r { - return "", false - } - buf = append(buf, byte(r+'A'-'a')) - continue - } - if r == '!' { - bang = true - continue - } - if 'A' <= r && r <= 'Z' { - return "", false - } - buf = append(buf, byte(r)) - } - if bang { - return "", false - } - return string(buf), true -} diff --git a/vendor/github.com/rogpeppe/go-internal/semver/semver.go b/vendor/github.com/rogpeppe/go-internal/semver/semver.go deleted file mode 100644 index 4af7118e5..000000000 --- a/vendor/github.com/rogpeppe/go-internal/semver/semver.go +++ /dev/null @@ -1,388 +0,0 @@ -// Copyright 2018 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package semver implements comparison of semantic version strings. -// In this package, semantic version strings must begin with a leading "v", -// as in "v1.0.0". -// -// The general form of a semantic version string accepted by this package is -// -// vMAJOR[.MINOR[.PATCH[-PRERELEASE][+BUILD]]] -// -// where square brackets indicate optional parts of the syntax; -// MAJOR, MINOR, and PATCH are decimal integers without extra leading zeros; -// PRERELEASE and BUILD are each a series of non-empty dot-separated identifiers -// using only alphanumeric characters and hyphens; and -// all-numeric PRERELEASE identifiers must not have leading zeros. -// -// This package follows Semantic Versioning 2.0.0 (see semver.org) -// with two exceptions. First, it requires the "v" prefix. Second, it recognizes -// vMAJOR and vMAJOR.MINOR (with no prerelease or build suffixes) -// as shorthands for vMAJOR.0.0 and vMAJOR.MINOR.0. -package semver - -// parsed returns the parsed form of a semantic version string. -type parsed struct { - major string - minor string - patch string - short string - prerelease string - build string - err string -} - -// IsValid reports whether v is a valid semantic version string. -func IsValid(v string) bool { - _, ok := parse(v) - return ok -} - -// Canonical returns the canonical formatting of the semantic version v. -// It fills in any missing .MINOR or .PATCH and discards build metadata. -// Two semantic versions compare equal only if their canonical formattings -// are identical strings. -// The canonical invalid semantic version is the empty string. -func Canonical(v string) string { - p, ok := parse(v) - if !ok { - return "" - } - if p.build != "" { - return v[:len(v)-len(p.build)] - } - if p.short != "" { - return v + p.short - } - return v -} - -// Major returns the major version prefix of the semantic version v. -// For example, Major("v2.1.0") == "v2". -// If v is an invalid semantic version string, Major returns the empty string. -func Major(v string) string { - pv, ok := parse(v) - if !ok { - return "" - } - return v[:1+len(pv.major)] -} - -// MajorMinor returns the major.minor version prefix of the semantic version v. -// For example, MajorMinor("v2.1.0") == "v2.1". -// If v is an invalid semantic version string, MajorMinor returns the empty string. -func MajorMinor(v string) string { - pv, ok := parse(v) - if !ok { - return "" - } - i := 1 + len(pv.major) - if j := i + 1 + len(pv.minor); j <= len(v) && v[i] == '.' && v[i+1:j] == pv.minor { - return v[:j] - } - return v[:i] + "." + pv.minor -} - -// Prerelease returns the prerelease suffix of the semantic version v. -// For example, Prerelease("v2.1.0-pre+meta") == "-pre". -// If v is an invalid semantic version string, Prerelease returns the empty string. -func Prerelease(v string) string { - pv, ok := parse(v) - if !ok { - return "" - } - return pv.prerelease -} - -// Build returns the build suffix of the semantic version v. -// For example, Build("v2.1.0+meta") == "+meta". -// If v is an invalid semantic version string, Build returns the empty string. -func Build(v string) string { - pv, ok := parse(v) - if !ok { - return "" - } - return pv.build -} - -// Compare returns an integer comparing two versions according to -// according to semantic version precedence. -// The result will be 0 if v == w, -1 if v < w, or +1 if v > w. -// -// An invalid semantic version string is considered less than a valid one. -// All invalid semantic version strings compare equal to each other. -func Compare(v, w string) int { - pv, ok1 := parse(v) - pw, ok2 := parse(w) - if !ok1 && !ok2 { - return 0 - } - if !ok1 { - return -1 - } - if !ok2 { - return +1 - } - if c := compareInt(pv.major, pw.major); c != 0 { - return c - } - if c := compareInt(pv.minor, pw.minor); c != 0 { - return c - } - if c := compareInt(pv.patch, pw.patch); c != 0 { - return c - } - return comparePrerelease(pv.prerelease, pw.prerelease) -} - -// Max canonicalizes its arguments and then returns the version string -// that compares greater. -func Max(v, w string) string { - v = Canonical(v) - w = Canonical(w) - if Compare(v, w) > 0 { - return v - } - return w -} - -func parse(v string) (p parsed, ok bool) { - if v == "" || v[0] != 'v' { - p.err = "missing v prefix" - return - } - p.major, v, ok = parseInt(v[1:]) - if !ok { - p.err = "bad major version" - return - } - if v == "" { - p.minor = "0" - p.patch = "0" - p.short = ".0.0" - return - } - if v[0] != '.' { - p.err = "bad minor prefix" - ok = false - return - } - p.minor, v, ok = parseInt(v[1:]) - if !ok { - p.err = "bad minor version" - return - } - if v == "" { - p.patch = "0" - p.short = ".0" - return - } - if v[0] != '.' { - p.err = "bad patch prefix" - ok = false - return - } - p.patch, v, ok = parseInt(v[1:]) - if !ok { - p.err = "bad patch version" - return - } - if len(v) > 0 && v[0] == '-' { - p.prerelease, v, ok = parsePrerelease(v) - if !ok { - p.err = "bad prerelease" - return - } - } - if len(v) > 0 && v[0] == '+' { - p.build, v, ok = parseBuild(v) - if !ok { - p.err = "bad build" - return - } - } - if v != "" { - p.err = "junk on end" - ok = false - return - } - ok = true - return -} - -func parseInt(v string) (t, rest string, ok bool) { - if v == "" { - return - } - if v[0] < '0' || '9' < v[0] { - return - } - i := 1 - for i < len(v) && '0' <= v[i] && v[i] <= '9' { - i++ - } - if v[0] == '0' && i != 1 { - return - } - return v[:i], v[i:], true -} - -func parsePrerelease(v string) (t, rest string, ok bool) { - // "A pre-release version MAY be denoted by appending a hyphen and - // a series of dot separated identifiers immediately following the patch version. - // Identifiers MUST comprise only ASCII alphanumerics and hyphen [0-9A-Za-z-]. - // Identifiers MUST NOT be empty. Numeric identifiers MUST NOT include leading zeroes." - if v == "" || v[0] != '-' { - return - } - i := 1 - start := 1 - for i < len(v) && v[i] != '+' { - if !isIdentChar(v[i]) && v[i] != '.' { - return - } - if v[i] == '.' { - if start == i || isBadNum(v[start:i]) { - return - } - start = i + 1 - } - i++ - } - if start == i || isBadNum(v[start:i]) { - return - } - return v[:i], v[i:], true -} - -func parseBuild(v string) (t, rest string, ok bool) { - if v == "" || v[0] != '+' { - return - } - i := 1 - start := 1 - for i < len(v) { - if !isIdentChar(v[i]) { - return - } - if v[i] == '.' { - if start == i { - return - } - start = i + 1 - } - i++ - } - if start == i { - return - } - return v[:i], v[i:], true -} - -func isIdentChar(c byte) bool { - return 'A' <= c && c <= 'Z' || 'a' <= c && c <= 'z' || '0' <= c && c <= '9' || c == '-' -} - -func isBadNum(v string) bool { - i := 0 - for i < len(v) && '0' <= v[i] && v[i] <= '9' { - i++ - } - return i == len(v) && i > 1 && v[0] == '0' -} - -func isNum(v string) bool { - i := 0 - for i < len(v) && '0' <= v[i] && v[i] <= '9' { - i++ - } - return i == len(v) -} - -func compareInt(x, y string) int { - if x == y { - return 0 - } - if len(x) < len(y) { - return -1 - } - if len(x) > len(y) { - return +1 - } - if x < y { - return -1 - } else { - return +1 - } -} - -func comparePrerelease(x, y string) int { - // "When major, minor, and patch are equal, a pre-release version has - // lower precedence than a normal version. - // Example: 1.0.0-alpha < 1.0.0. - // Precedence for two pre-release versions with the same major, minor, - // and patch version MUST be determined by comparing each dot separated - // identifier from left to right until a difference is found as follows: - // identifiers consisting of only digits are compared numerically and - // identifiers with letters or hyphens are compared lexically in ASCII - // sort order. Numeric identifiers always have lower precedence than - // non-numeric identifiers. A larger set of pre-release fields has a - // higher precedence than a smaller set, if all of the preceding - // identifiers are equal. - // Example: 1.0.0-alpha < 1.0.0-alpha.1 < 1.0.0-alpha.beta < - // 1.0.0-beta < 1.0.0-beta.2 < 1.0.0-beta.11 < 1.0.0-rc.1 < 1.0.0." - if x == y { - return 0 - } - if x == "" { - return +1 - } - if y == "" { - return -1 - } - for x != "" && y != "" { - x = x[1:] // skip - or . - y = y[1:] // skip - or . - var dx, dy string - dx, x = nextIdent(x) - dy, y = nextIdent(y) - if dx != dy { - ix := isNum(dx) - iy := isNum(dy) - if ix != iy { - if ix { - return -1 - } else { - return +1 - } - } - if ix { - if len(dx) < len(dy) { - return -1 - } - if len(dx) > len(dy) { - return +1 - } - } - if dx < dy { - return -1 - } else { - return +1 - } - } - } - if x == "" { - return -1 - } else { - return +1 - } -} - -func nextIdent(x string) (dx, rest string) { - i := 0 - for i < len(x) && x[i] != '.' { - i++ - } - return x[:i], x[i:] -} diff --git a/vendor/github.com/sirupsen/logrus/.gitignore b/vendor/github.com/sirupsen/logrus/.gitignore index 6b7d7d1e8..1fb13abeb 100644 --- a/vendor/github.com/sirupsen/logrus/.gitignore +++ b/vendor/github.com/sirupsen/logrus/.gitignore @@ -1,2 +1,4 @@ logrus vendor + +.idea/ diff --git a/vendor/github.com/sirupsen/logrus/.golangci.yml b/vendor/github.com/sirupsen/logrus/.golangci.yml new file mode 100644 index 000000000..65dc28503 --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/.golangci.yml @@ -0,0 +1,40 @@ +run: + # do not run on test files yet + tests: false + +# all available settings of specific linters +linters-settings: + errcheck: + # report about not checking of errors in type assetions: `a := b.(MyStruct)`; + # default is false: such cases aren't reported by default. + check-type-assertions: false + + # report about assignment of errors to blank identifier: `num, _ := strconv.Atoi(numStr)`; + # default is false: such cases aren't reported by default. + check-blank: false + + lll: + line-length: 100 + tab-width: 4 + + prealloc: + simple: false + range-loops: false + for-loops: false + + whitespace: + multi-if: false # Enforces newlines (or comments) after every multi-line if statement + multi-func: false # Enforces newlines (or comments) after every multi-line function signature + +linters: + enable: + - megacheck + - govet + disable: + - maligned + - prealloc + disable-all: false + presets: + - bugs + - unused + fast: false diff --git a/vendor/github.com/sirupsen/logrus/.travis.yml b/vendor/github.com/sirupsen/logrus/.travis.yml index 848938a6d..c1dbd5a3a 100644 --- a/vendor/github.com/sirupsen/logrus/.travis.yml +++ b/vendor/github.com/sirupsen/logrus/.travis.yml @@ -4,22 +4,12 @@ git: depth: 1 env: - GO111MODULE=on - - GO111MODULE=off -go: [ 1.11.x, 1.12.x ] -os: [ linux, osx ] -matrix: - exclude: - - go: 1.12.x - env: GO111MODULE=off - - go: 1.11.x - os: osx +go: 1.15.x +os: linux install: - ./travis/install.sh - - if [[ "$GO111MODULE" == "on" ]]; then go mod download; fi - - if [[ "$GO111MODULE" == "off" ]]; then go get github.com/stretchr/testify/assert golang.org/x/sys/unix github.com/konsorten/go-windows-terminal-sequences; fi script: - - ./travis/cross_build.sh - - export GOMAXPROCS=4 - - export GORACE=halt_on_error=1 - - go test -race -v ./... - - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then go test -race -v -tags appengine ./... ; fi + - cd ci + - go run mage.go -v -w ../ crossBuild + - go run mage.go -v -w ../ lint + - go run mage.go -v -w ../ test diff --git a/vendor/github.com/sirupsen/logrus/CHANGELOG.md b/vendor/github.com/sirupsen/logrus/CHANGELOG.md index 51a7ab0ca..7567f6128 100644 --- a/vendor/github.com/sirupsen/logrus/CHANGELOG.md +++ b/vendor/github.com/sirupsen/logrus/CHANGELOG.md @@ -1,9 +1,68 @@ +# 1.8.1 +Code quality: + * move magefile in its own subdir/submodule to remove magefile dependency on logrus consumer + * improve timestamp format documentation + +Fixes: + * fix race condition on logger hooks + + +# 1.8.0 + +Correct versioning number replacing v1.7.1. + +# 1.7.1 + +Beware this release has introduced a new public API and its semver is therefore incorrect. + +Code quality: + * use go 1.15 in travis + * use magefile as task runner + +Fixes: + * small fixes about new go 1.13 error formatting system + * Fix for long time race condiction with mutating data hooks + +Features: + * build support for zos + +# 1.7.0 +Fixes: + * the dependency toward a windows terminal library has been removed + +Features: + * a new buffer pool management API has been added + * a set of `Fn()` functions have been added + +# 1.6.0 +Fixes: + * end of line cleanup + * revert the entry concurrency bug fix whic leads to deadlock under some circumstances + * update dependency on go-windows-terminal-sequences to fix a crash with go 1.14 + +Features: + * add an option to the `TextFormatter` to completely disable fields quoting + +# 1.5.0 +Code quality: + * add golangci linter run on travis + +Fixes: + * add mutex for hooks concurrent access on `Entry` data + * caller function field for go1.14 + * fix build issue for gopherjs target + +Feature: + * add an hooks/writer sub-package whose goal is to split output on different stream depending on the trace level + * add a `DisableHTMLEscape` option in the `JSONFormatter` + * add `ForceQuote` and `PadLevelText` options in the `TextFormatter` + # 1.4.2 * Fixes build break for plan9, nacl, solaris # 1.4.1 This new release introduces: * Enhance TextFormatter to not print caller information when they are empty (#944) - * Remove dependency on golang.org/x/crypto (#932, #943) + * Remove dependency on golang.org/x/crypto (#932, #943) Fixes: * Fix Entry.WithContext method to return a copy of the initial entry (#941) @@ -11,7 +70,7 @@ Fixes: # 1.4.0 This new release introduces: * Add `DeferExitHandler`, similar to `RegisterExitHandler` but prepending the handler to the list of handlers (semantically like `defer`) (#848). - * Add `CallerPrettyfier` to `JSONFormatter` and `TextFormatter (#909, #911) + * Add `CallerPrettyfier` to `JSONFormatter` and `TextFormatter` (#909, #911) * Add `Entry.WithContext()` and `Entry.Context`, to set a context on entries to be used e.g. in hooks (#919). Fixes: diff --git a/vendor/github.com/sirupsen/logrus/README.md b/vendor/github.com/sirupsen/logrus/README.md index a4796eb07..5152b6aa4 100644 --- a/vendor/github.com/sirupsen/logrus/README.md +++ b/vendor/github.com/sirupsen/logrus/README.md @@ -1,8 +1,28 @@ -# Logrus :walrus: [![Build Status](https://travis-ci.org/sirupsen/logrus.svg?branch=master)](https://travis-ci.org/sirupsen/logrus) [![GoDoc](https://godoc.org/github.com/sirupsen/logrus?status.svg)](https://godoc.org/github.com/sirupsen/logrus) +# Logrus :walrus: [![Build Status](https://travis-ci.org/sirupsen/logrus.svg?branch=master)](https://travis-ci.org/sirupsen/logrus) [![GoDoc](https://godoc.org/github.com/sirupsen/logrus?status.svg)](https://godoc.org/github.com/sirupsen/logrus) Logrus is a structured logger for Go (golang), completely API compatible with the standard library logger. +**Logrus is in maintenance-mode.** We will not be introducing new features. It's +simply too hard to do in a way that won't break many people's projects, which is +the last thing you want from your Logging library (again...). + +This does not mean Logrus is dead. Logrus will continue to be maintained for +security, (backwards compatible) bug fixes, and performance (where we are +limited by the interface). + +I believe Logrus' biggest contribution is to have played a part in today's +widespread use of structured logging in Golang. There doesn't seem to be a +reason to do a major, breaking iteration into Logrus V2, since the fantastic Go +community has built those independently. Many fantastic alternatives have sprung +up. Logrus would look like those, had it been re-designed with what we know +about structured logging in Go today. Check out, for example, +[Zerolog][zerolog], [Zap][zap], and [Apex][apex]. + +[zerolog]: https://github.com/rs/zerolog +[zap]: https://github.com/uber-go/zap +[apex]: https://github.com/apex/log + **Seeing weird case-sensitive problems?** It's in the past been possible to import Logrus as both upper- and lower-case. Due to the Go package environment, this caused issues in the community and we needed a standard. Some environments @@ -15,11 +35,6 @@ comments](https://github.com/sirupsen/logrus/issues/553#issuecomment-306591437). For an in-depth explanation of the casing issue, see [this comment](https://github.com/sirupsen/logrus/issues/570#issuecomment-313933276). -**Are you interested in assisting in maintaining Logrus?** Currently I have a -lot of obligations, and I am unable to provide Logrus with the maintainership it -needs. If you'd like to help, please reach out to me at `simon at author's -username dot com`. - Nicely color-coded in development (when a TTY is attached, otherwise just plain text): @@ -187,7 +202,7 @@ func main() { log.Out = os.Stdout // You could set this to any `io.Writer` such as a file - // file, err := os.OpenFile("logrus.log", os.O_CREATE|os.O_WRONLY, 0666) + // file, err := os.OpenFile("logrus.log", os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0666) // if err == nil { // log.Out = file // } else { @@ -272,7 +287,7 @@ func init() { ``` Note: Syslog hook also support connecting to local syslog (Ex. "/dev/log" or "/var/run/syslog" or "/var/run/log"). For the detail, please check the [syslog hook README](hooks/syslog/README.md). -A list of currently known of service hook can be found in this wiki [page](https://github.com/sirupsen/logrus/wiki/Hooks) +A list of currently known service hooks can be found in this wiki [page](https://github.com/sirupsen/logrus/wiki/Hooks) #### Level logging @@ -354,6 +369,7 @@ The built-in logging formatters are: [github.com/mattn/go-colorable](https://github.com/mattn/go-colorable). * When colors are enabled, levels are truncated to 4 characters by default. To disable truncation set the `DisableLevelTruncation` field to `true`. + * When outputting to a TTY, it's often helpful to visually scan down a column where all the levels are the same width. Setting the `PadLevelText` field to `true` enables this behavior, by adding padding to the level text. * All options are listed in the [generated docs](https://godoc.org/github.com/sirupsen/logrus#TextFormatter). * `logrus.JSONFormatter`. Logs fields as JSON. * All options are listed in the [generated docs](https://godoc.org/github.com/sirupsen/logrus#JSONFormatter). @@ -364,8 +380,10 @@ Third party logging formatters: * [`GELF`](https://github.com/fabienm/go-logrus-formatters). Formats entries so they comply to Graylog's [GELF 1.1 specification](http://docs.graylog.org/en/2.4/pages/gelf.html). * [`logstash`](https://github.com/bshuster-repo/logrus-logstash-hook). Logs fields as [Logstash](http://logstash.net) Events. * [`prefixed`](https://github.com/x-cray/logrus-prefixed-formatter). Displays log entry source along with alternative layout. -* [`zalgo`](https://github.com/aybabtme/logzalgo). Invoking the P͉̫o̳̼̊w̖͈̰͎e̬͔̭͂r͚̼̹̲ ̫͓͉̳͈ō̠͕͖̚f̝͍̠ ͕̲̞͖͑Z̖̫̤̫ͪa͉̬͈̗l͖͎g̳̥o̰̥̅!̣͔̲̻͊̄ ̙̘̦̹̦. +* [`zalgo`](https://github.com/aybabtme/logzalgo). Invoking the Power of Zalgo. * [`nested-logrus-formatter`](https://github.com/antonfisher/nested-logrus-formatter). Converts logrus fields to a nested structure. +* [`powerful-logrus-formatter`](https://github.com/zput/zxcTool). get fileName, log's line number and the latest function's name when print log; Sava log to files. +* [`caption-json-formatter`](https://github.com/nolleh/caption_json_formatter). logrus's message json formatter with human-readable caption added. You can define your formatter by implementing the `Formatter` interface, requiring a `Format` method. `Format` takes an `*Entry`. `entry.Data` is a @@ -384,7 +402,7 @@ func (f *MyJSONFormatter) Format(entry *Entry) ([]byte, error) { // source of the official loggers. serialized, err := json.Marshal(entry.Data) if err != nil { - return nil, fmt.Errorf("Failed to marshal fields to JSON, %v", err) + return nil, fmt.Errorf("Failed to marshal fields to JSON, %w", err) } return append(serialized, '\n'), nil } @@ -430,14 +448,14 @@ entries. It should not be a feature of the application-level logger. | Tool | Description | | ---- | ----------- | -|[Logrus Mate](https://github.com/gogap/logrus_mate)|Logrus mate is a tool for Logrus to manage loggers, you can initial logger's level, hook and formatter by config file, the logger will generated with different config at different environment.| +|[Logrus Mate](https://github.com/gogap/logrus_mate)|Logrus mate is a tool for Logrus to manage loggers, you can initial logger's level, hook and formatter by config file, the logger will be generated with different configs in different environments.| |[Logrus Viper Helper](https://github.com/heirko/go-contrib/tree/master/logrusHelper)|An Helper around Logrus to wrap with spf13/Viper to load configuration with fangs! And to simplify Logrus configuration use some behavior of [Logrus Mate](https://github.com/gogap/logrus_mate). [sample](https://github.com/heirko/iris-contrib/blob/master/middleware/logrus-logger/example) | #### Testing Logrus has a built in facility for asserting the presence of log messages. This is implemented through the `test` hook and provides: -* decorators for existing logger (`test.NewLocal` and `test.NewGlobal`) which basically just add the `test` hook +* decorators for existing logger (`test.NewLocal` and `test.NewGlobal`) which basically just adds the `test` hook * a test logger (`test.NewNullLogger`) that just records log messages (and does not output any): ```go @@ -465,7 +483,7 @@ func TestSomething(t*testing.T){ Logrus can register one or more functions that will be called when any `fatal` level message is logged. The registered handlers will be executed before -logrus performs a `os.Exit(1)`. This behavior may be helpful if callers need +logrus performs an `os.Exit(1)`. This behavior may be helpful if callers need to gracefully shutdown. Unlike a `panic("Something went wrong...")` call which can be intercepted with a deferred `recover` a call to `os.Exit(1)` can not be intercepted. ``` @@ -490,6 +508,6 @@ Situation when locking is not needed includes: 1) logger.Out is protected by locks. - 2) logger.Out is a os.File handler opened with `O_APPEND` flag, and every write is smaller than 4k. (This allow multi-thread/multi-process writing) + 2) logger.Out is an os.File handler opened with `O_APPEND` flag, and every write is smaller than 4k. (This allows multi-thread/multi-process writing) (Refer to http://www.notthewizard.com/2014/06/17/are-files-appends-really-atomic/) diff --git a/vendor/github.com/sirupsen/logrus/appveyor.yml b/vendor/github.com/sirupsen/logrus/appveyor.yml index 96c2ce15f..df9d65c3a 100644 --- a/vendor/github.com/sirupsen/logrus/appveyor.yml +++ b/vendor/github.com/sirupsen/logrus/appveyor.yml @@ -1,14 +1,14 @@ -version: "{build}" -platform: x64 -clone_folder: c:\gopath\src\github.com\sirupsen\logrus -environment: - GOPATH: c:\gopath -branches: - only: - - master -install: - - set PATH=%GOPATH%\bin;c:\go\bin;%PATH% - - go version -build_script: - - go get -t - - go test +version: "{build}" +platform: x64 +clone_folder: c:\gopath\src\github.com\sirupsen\logrus +environment: + GOPATH: c:\gopath +branches: + only: + - master +install: + - set PATH=%GOPATH%\bin;c:\go\bin;%PATH% + - go version +build_script: + - go get -t + - go test diff --git a/vendor/github.com/sirupsen/logrus/buffer_pool.go b/vendor/github.com/sirupsen/logrus/buffer_pool.go new file mode 100644 index 000000000..4545dec07 --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/buffer_pool.go @@ -0,0 +1,52 @@ +package logrus + +import ( + "bytes" + "sync" +) + +var ( + bufferPool BufferPool +) + +type BufferPool interface { + Put(*bytes.Buffer) + Get() *bytes.Buffer +} + +type defaultPool struct { + pool *sync.Pool +} + +func (p *defaultPool) Put(buf *bytes.Buffer) { + p.pool.Put(buf) +} + +func (p *defaultPool) Get() *bytes.Buffer { + return p.pool.Get().(*bytes.Buffer) +} + +func getBuffer() *bytes.Buffer { + return bufferPool.Get() +} + +func putBuffer(buf *bytes.Buffer) { + buf.Reset() + bufferPool.Put(buf) +} + +// SetBufferPool allows to replace the default logrus buffer pool +// to better meets the specific needs of an application. +func SetBufferPool(bp BufferPool) { + bufferPool = bp +} + +func init() { + SetBufferPool(&defaultPool{ + pool: &sync.Pool{ + New: func() interface{} { + return new(bytes.Buffer) + }, + }, + }) +} diff --git a/vendor/github.com/sirupsen/logrus/entry.go b/vendor/github.com/sirupsen/logrus/entry.go index 63e25583c..07a1e5fa7 100644 --- a/vendor/github.com/sirupsen/logrus/entry.go +++ b/vendor/github.com/sirupsen/logrus/entry.go @@ -13,7 +13,6 @@ import ( ) var ( - bufferPool *sync.Pool // qualified package name, cached at first use logrusPackage string @@ -31,12 +30,6 @@ const ( ) func init() { - bufferPool = &sync.Pool{ - New: func() interface{} { - return new(bytes.Buffer) - }, - } - // start at the bottom of the stack before the package-name cache is primed minimumCallerDepth = 1 } @@ -85,10 +78,23 @@ func NewEntry(logger *Logger) *Entry { } } +func (entry *Entry) Dup() *Entry { + data := make(Fields, len(entry.Data)) + for k, v := range entry.Data { + data[k] = v + } + return &Entry{Logger: entry.Logger, Data: data, Time: entry.Time, Context: entry.Context, err: entry.err} +} + +// Returns the bytes representation of this entry from the formatter. +func (entry *Entry) Bytes() ([]byte, error) { + return entry.Logger.Formatter.Format(entry) +} + // Returns the string representation from the reader and ultimately the // formatter. func (entry *Entry) String() (string, error) { - serialized, err := entry.Logger.Formatter.Format(entry) + serialized, err := entry.Bytes() if err != nil { return "", err } @@ -103,7 +109,11 @@ func (entry *Entry) WithError(err error) *Entry { // Add a context to the Entry. func (entry *Entry) WithContext(ctx context.Context) *Entry { - return &Entry{Logger: entry.Logger, Data: entry.Data, Time: entry.Time, err: entry.err, Context: ctx} + dataCopy := make(Fields, len(entry.Data)) + for k, v := range entry.Data { + dataCopy[k] = v + } + return &Entry{Logger: entry.Logger, Data: dataCopy, Time: entry.Time, err: entry.err, Context: ctx} } // Add a single field to the Entry. @@ -121,11 +131,9 @@ func (entry *Entry) WithFields(fields Fields) *Entry { for k, v := range fields { isErrField := false if t := reflect.TypeOf(v); t != nil { - switch t.Kind() { - case reflect.Func: + switch { + case t.Kind() == reflect.Func, t.Kind() == reflect.Ptr && t.Elem().Kind() == reflect.Func: isErrField = true - case reflect.Ptr: - isErrField = t.Elem().Kind() == reflect.Func } } if isErrField { @@ -144,7 +152,11 @@ func (entry *Entry) WithFields(fields Fields) *Entry { // Overrides the time of the Entry. func (entry *Entry) WithTime(t time.Time) *Entry { - return &Entry{Logger: entry.Logger, Data: entry.Data, Time: t, err: entry.err, Context: entry.Context} + dataCopy := make(Fields, len(entry.Data)) + for k, v := range entry.Data { + dataCopy[k] = v + } + return &Entry{Logger: entry.Logger, Data: dataCopy, Time: t, err: entry.err, Context: entry.Context} } // getPackageName reduces a fully qualified function name to the package name @@ -165,15 +177,20 @@ func getPackageName(f string) string { // getCaller retrieves the name of the first non-logrus calling function func getCaller() *runtime.Frame { - // cache this package's fully-qualified name callerInitOnce.Do(func() { - pcs := make([]uintptr, 2) + pcs := make([]uintptr, maximumCallerDepth) _ = runtime.Callers(0, pcs) - logrusPackage = getPackageName(runtime.FuncForPC(pcs[1]).Name()) - // now that we have the cache, we can skip a minimum count of known-logrus functions - // XXX this is dubious, the number of frames may vary + // dynamic get the package name and the minimum caller depth + for i := 0; i < maximumCallerDepth; i++ { + funcName := runtime.FuncForPC(pcs[i]).Name() + if strings.Contains(funcName, "getCaller") { + logrusPackage = getPackageName(funcName) + break + } + } + minimumCallerDepth = knownLogrusFrames }) @@ -187,7 +204,7 @@ func getCaller() *runtime.Frame { // If the caller isn't part of this package, we're done if pkg != logrusPackage { - return &f + return &f //nolint:scopelint } } @@ -201,65 +218,73 @@ func (entry Entry) HasCaller() (has bool) { entry.Caller != nil } -// This function is not declared with a pointer value because otherwise -// race conditions will occur when using multiple goroutines -func (entry Entry) log(level Level, msg string) { +func (entry *Entry) log(level Level, msg string) { var buffer *bytes.Buffer - // Default to now, but allow users to override if they want. - // - // We don't have to worry about polluting future calls to Entry#log() - // with this assignment because this function is declared with a - // non-pointer receiver. - if entry.Time.IsZero() { - entry.Time = time.Now() + newEntry := entry.Dup() + + if newEntry.Time.IsZero() { + newEntry.Time = time.Now() } - entry.Level = level - entry.Message = msg - if entry.Logger.ReportCaller { - entry.Caller = getCaller() + newEntry.Level = level + newEntry.Message = msg + + newEntry.Logger.mu.Lock() + reportCaller := newEntry.Logger.ReportCaller + newEntry.Logger.mu.Unlock() + + if reportCaller { + newEntry.Caller = getCaller() } - entry.fireHooks() + newEntry.fireHooks() - buffer = bufferPool.Get().(*bytes.Buffer) + buffer = getBuffer() + defer func() { + newEntry.Buffer = nil + putBuffer(buffer) + }() buffer.Reset() - defer bufferPool.Put(buffer) - entry.Buffer = buffer + newEntry.Buffer = buffer - entry.write() + newEntry.write() - entry.Buffer = nil + newEntry.Buffer = nil // To avoid Entry#log() returning a value that only would make sense for // panic() to use in Entry#Panic(), we avoid the allocation by checking // directly here. if level <= PanicLevel { - panic(&entry) + panic(newEntry) } } func (entry *Entry) fireHooks() { + var tmpHooks LevelHooks entry.Logger.mu.Lock() - defer entry.Logger.mu.Unlock() - err := entry.Logger.Hooks.Fire(entry.Level, entry) + tmpHooks = make(LevelHooks, len(entry.Logger.Hooks)) + for k, v := range entry.Logger.Hooks { + tmpHooks[k] = v + } + entry.Logger.mu.Unlock() + + err := tmpHooks.Fire(entry.Level, entry) if err != nil { fmt.Fprintf(os.Stderr, "Failed to fire hook: %v\n", err) } } func (entry *Entry) write() { - entry.Logger.mu.Lock() - defer entry.Logger.mu.Unlock() serialized, err := entry.Logger.Formatter.Format(entry) if err != nil { fmt.Fprintf(os.Stderr, "Failed to obtain reader, %v\n", err) - } else { - _, err = entry.Logger.Out.Write(serialized) - if err != nil { - fmt.Fprintf(os.Stderr, "Failed to write to log, %v\n", err) - } + return + } + entry.Logger.mu.Lock() + defer entry.Logger.mu.Unlock() + if _, err := entry.Logger.Out.Write(serialized); err != nil { + fmt.Fprintf(os.Stderr, "Failed to write to log, %v\n", err) } } @@ -304,7 +329,6 @@ func (entry *Entry) Fatal(args ...interface{}) { func (entry *Entry) Panic(args ...interface{}) { entry.Log(PanicLevel, args...) - panic(fmt.Sprint(args...)) } // Entry Printf family functions diff --git a/vendor/github.com/sirupsen/logrus/exported.go b/vendor/github.com/sirupsen/logrus/exported.go index 62fc2f219..017c30ce6 100644 --- a/vendor/github.com/sirupsen/logrus/exported.go +++ b/vendor/github.com/sirupsen/logrus/exported.go @@ -80,7 +80,7 @@ func WithFields(fields Fields) *Entry { return std.WithFields(fields) } -// WithTime creats an entry from the standard logger and overrides the time of +// WithTime creates an entry from the standard logger and overrides the time of // logs generated with it. // // Note that it doesn't log until you call Debug, Print, Info, Warn, Fatal @@ -134,6 +134,51 @@ func Fatal(args ...interface{}) { std.Fatal(args...) } +// TraceFn logs a message from a func at level Trace on the standard logger. +func TraceFn(fn LogFunction) { + std.TraceFn(fn) +} + +// DebugFn logs a message from a func at level Debug on the standard logger. +func DebugFn(fn LogFunction) { + std.DebugFn(fn) +} + +// PrintFn logs a message from a func at level Info on the standard logger. +func PrintFn(fn LogFunction) { + std.PrintFn(fn) +} + +// InfoFn logs a message from a func at level Info on the standard logger. +func InfoFn(fn LogFunction) { + std.InfoFn(fn) +} + +// WarnFn logs a message from a func at level Warn on the standard logger. +func WarnFn(fn LogFunction) { + std.WarnFn(fn) +} + +// WarningFn logs a message from a func at level Warn on the standard logger. +func WarningFn(fn LogFunction) { + std.WarningFn(fn) +} + +// ErrorFn logs a message from a func at level Error on the standard logger. +func ErrorFn(fn LogFunction) { + std.ErrorFn(fn) +} + +// PanicFn logs a message from a func at level Panic on the standard logger. +func PanicFn(fn LogFunction) { + std.PanicFn(fn) +} + +// FatalFn logs a message from a func at level Fatal on the standard logger then the process will exit with status set to 1. +func FatalFn(fn LogFunction) { + std.FatalFn(fn) +} + // Tracef logs a message at level Trace on the standard logger. func Tracef(format string, args ...interface{}) { std.Tracef(format, args...) diff --git a/vendor/github.com/sirupsen/logrus/go.mod b/vendor/github.com/sirupsen/logrus/go.mod index 12fdf9898..b3919d5ea 100644 --- a/vendor/github.com/sirupsen/logrus/go.mod +++ b/vendor/github.com/sirupsen/logrus/go.mod @@ -2,9 +2,9 @@ module github.com/sirupsen/logrus require ( github.com/davecgh/go-spew v1.1.1 // indirect - github.com/konsorten/go-windows-terminal-sequences v1.0.1 github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/stretchr/objx v0.1.1 // indirect github.com/stretchr/testify v1.2.2 - golang.org/x/sys v0.0.0-20190422165155-953cdadca894 + golang.org/x/sys v0.0.0-20191026070338-33540a1f6037 ) + +go 1.13 diff --git a/vendor/github.com/sirupsen/logrus/go.sum b/vendor/github.com/sirupsen/logrus/go.sum index 596c318b9..694c18b84 100644 --- a/vendor/github.com/sirupsen/logrus/go.sum +++ b/vendor/github.com/sirupsen/logrus/go.sum @@ -1,16 +1,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/konsorten/go-windows-terminal-sequences v0.0.0-20180402223658-b729f2633dfe h1:CHRGQ8V7OlCYtwaKPJi3iA7J+YdNKdo8j7nG5IgDhjs= -github.com/konsorten/go-windows-terminal-sequences v0.0.0-20180402223658-b729f2633dfe/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/stretchr/objx v0.1.1 h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33 h1:I6FyU15t786LL7oL/hn43zqTuEGr4PN7F4XJ1p4E3Y8= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894 h1:Cz4ceDQGXuKRnVBDTS23GTn/pU5OE2C0WrNTOYK1Uuc= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037 h1:YyJpGZS1sBuBCzLAR1VEpK193GlqGZbnPFnPV/5Rsb4= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= diff --git a/vendor/github.com/sirupsen/logrus/json_formatter.go b/vendor/github.com/sirupsen/logrus/json_formatter.go index 098a21a06..c96dc5636 100644 --- a/vendor/github.com/sirupsen/logrus/json_formatter.go +++ b/vendor/github.com/sirupsen/logrus/json_formatter.go @@ -23,11 +23,17 @@ func (f FieldMap) resolve(key fieldKey) string { // JSONFormatter formats logs into parsable json type JSONFormatter struct { // TimestampFormat sets the format used for marshaling timestamps. + // The format to use is the same than for time.Format or time.Parse from the standard + // library. + // The standard Library already provides a set of predefined format. TimestampFormat string // DisableTimestamp allows disabling automatic timestamps in output DisableTimestamp bool + // DisableHTMLEscape allows disabling html escaping in output + DisableHTMLEscape bool + // DataKey allows users to put all the log entry parameters into a nested dictionary at a given key. DataKey string @@ -110,11 +116,12 @@ func (f *JSONFormatter) Format(entry *Entry) ([]byte, error) { } encoder := json.NewEncoder(b) + encoder.SetEscapeHTML(!f.DisableHTMLEscape) if f.PrettyPrint { encoder.SetIndent("", " ") } if err := encoder.Encode(data); err != nil { - return nil, fmt.Errorf("failed to marshal fields to JSON, %v", err) + return nil, fmt.Errorf("failed to marshal fields to JSON, %w", err) } return b.Bytes(), nil diff --git a/vendor/github.com/sirupsen/logrus/logger.go b/vendor/github.com/sirupsen/logrus/logger.go index c0c0b1e55..337704457 100644 --- a/vendor/github.com/sirupsen/logrus/logger.go +++ b/vendor/github.com/sirupsen/logrus/logger.go @@ -9,6 +9,11 @@ import ( "time" ) +// LogFunction For big messages, it can be more efficient to pass a function +// and only call it if the log level is actually enables rather than +// generating the log message and then checking if the level is enabled +type LogFunction func() []interface{} + type Logger struct { // The logs are `io.Copy`'d to this in a mutex. It's common to set this to a // file, or leave it default which is `os.Stderr`. You can also set this to @@ -68,10 +73,10 @@ func (mw *MutexWrap) Disable() { // `Out` and `Hooks` directly on the default logger instance. You can also just // instantiate your own: // -// var log = &Logger{ +// var log = &logrus.Logger{ // Out: os.Stderr, -// Formatter: new(JSONFormatter), -// Hooks: make(LevelHooks), +// Formatter: new(logrus.TextFormatter), +// Hooks: make(logrus.LevelHooks), // Level: logrus.DebugLevel, // } // @@ -100,8 +105,9 @@ func (logger *Logger) releaseEntry(entry *Entry) { logger.entryPool.Put(entry) } -// Adds a field to the log entry, note that it doesn't log until you call -// Debug, Print, Info, Warn, Error, Fatal or Panic. It only creates a log entry. +// WithField allocates a new entry and adds a field to it. +// Debug, Print, Info, Warn, Error, Fatal or Panic must be then applied to +// this new returned entry. // If you want multiple fields, use `WithFields`. func (logger *Logger) WithField(key string, value interface{}) *Entry { entry := logger.newEntry() @@ -194,6 +200,14 @@ func (logger *Logger) Log(level Level, args ...interface{}) { } } +func (logger *Logger) LogFn(level Level, fn LogFunction) { + if logger.IsLevelEnabled(level) { + entry := logger.newEntry() + entry.Log(level, fn()...) + logger.releaseEntry(entry) + } +} + func (logger *Logger) Trace(args ...interface{}) { logger.Log(TraceLevel, args...) } @@ -233,6 +247,45 @@ func (logger *Logger) Panic(args ...interface{}) { logger.Log(PanicLevel, args...) } +func (logger *Logger) TraceFn(fn LogFunction) { + logger.LogFn(TraceLevel, fn) +} + +func (logger *Logger) DebugFn(fn LogFunction) { + logger.LogFn(DebugLevel, fn) +} + +func (logger *Logger) InfoFn(fn LogFunction) { + logger.LogFn(InfoLevel, fn) +} + +func (logger *Logger) PrintFn(fn LogFunction) { + entry := logger.newEntry() + entry.Print(fn()...) + logger.releaseEntry(entry) +} + +func (logger *Logger) WarnFn(fn LogFunction) { + logger.LogFn(WarnLevel, fn) +} + +func (logger *Logger) WarningFn(fn LogFunction) { + logger.WarnFn(fn) +} + +func (logger *Logger) ErrorFn(fn LogFunction) { + logger.LogFn(ErrorLevel, fn) +} + +func (logger *Logger) FatalFn(fn LogFunction) { + logger.LogFn(FatalLevel, fn) + logger.Exit(1) +} + +func (logger *Logger) PanicFn(fn LogFunction) { + logger.LogFn(PanicLevel, fn) +} + func (logger *Logger) Logln(level Level, args ...interface{}) { if logger.IsLevelEnabled(level) { entry := logger.newEntry() diff --git a/vendor/github.com/sirupsen/logrus/logrus.go b/vendor/github.com/sirupsen/logrus/logrus.go index 8644761f7..2f16224cb 100644 --- a/vendor/github.com/sirupsen/logrus/logrus.go +++ b/vendor/github.com/sirupsen/logrus/logrus.go @@ -51,7 +51,7 @@ func (level *Level) UnmarshalText(text []byte) error { return err } - *level = Level(l) + *level = l return nil } diff --git a/vendor/github.com/sirupsen/logrus/terminal_check_bsd.go b/vendor/github.com/sirupsen/logrus/terminal_check_bsd.go index 3c4f43f91..499789984 100644 --- a/vendor/github.com/sirupsen/logrus/terminal_check_bsd.go +++ b/vendor/github.com/sirupsen/logrus/terminal_check_bsd.go @@ -1,4 +1,5 @@ // +build darwin dragonfly freebsd netbsd openbsd +// +build !js package logrus @@ -10,4 +11,3 @@ func isTerminal(fd int) bool { _, err := unix.IoctlGetTermios(fd, ioctlReadTermios) return err == nil } - diff --git a/vendor/github.com/sirupsen/logrus/terminal_check_js.go b/vendor/github.com/sirupsen/logrus/terminal_check_js.go new file mode 100644 index 000000000..ebdae3ec6 --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/terminal_check_js.go @@ -0,0 +1,7 @@ +// +build js + +package logrus + +func isTerminal(fd int) bool { + return false +} diff --git a/vendor/github.com/sirupsen/logrus/terminal_check_unix.go b/vendor/github.com/sirupsen/logrus/terminal_check_unix.go index 355dc966f..04748b851 100644 --- a/vendor/github.com/sirupsen/logrus/terminal_check_unix.go +++ b/vendor/github.com/sirupsen/logrus/terminal_check_unix.go @@ -1,4 +1,5 @@ -// +build linux aix +// +build linux aix zos +// +build !js package logrus @@ -10,4 +11,3 @@ func isTerminal(fd int) bool { _, err := unix.IoctlGetTermios(fd, ioctlReadTermios) return err == nil } - diff --git a/vendor/github.com/sirupsen/logrus/terminal_check_windows.go b/vendor/github.com/sirupsen/logrus/terminal_check_windows.go index 572889db2..2879eb50e 100644 --- a/vendor/github.com/sirupsen/logrus/terminal_check_windows.go +++ b/vendor/github.com/sirupsen/logrus/terminal_check_windows.go @@ -5,30 +5,23 @@ package logrus import ( "io" "os" - "syscall" - sequences "github.com/konsorten/go-windows-terminal-sequences" + "golang.org/x/sys/windows" ) -func initTerminal(w io.Writer) { - switch v := w.(type) { - case *os.File: - sequences.EnableVirtualTerminalProcessing(syscall.Handle(v.Fd()), true) - } -} - func checkIfTerminal(w io.Writer) bool { - var ret bool switch v := w.(type) { case *os.File: + handle := windows.Handle(v.Fd()) var mode uint32 - err := syscall.GetConsoleMode(syscall.Handle(v.Fd()), &mode) - ret = (err == nil) - default: - ret = false + if err := windows.GetConsoleMode(handle, &mode); err != nil { + return false + } + mode |= windows.ENABLE_VIRTUAL_TERMINAL_PROCESSING + if err := windows.SetConsoleMode(handle, mode); err != nil { + return false + } + return true } - if ret { - initTerminal(w) - } - return ret + return false } diff --git a/vendor/github.com/sirupsen/logrus/text_formatter.go b/vendor/github.com/sirupsen/logrus/text_formatter.go index e01587c43..be2c6efe5 100644 --- a/vendor/github.com/sirupsen/logrus/text_formatter.go +++ b/vendor/github.com/sirupsen/logrus/text_formatter.go @@ -6,9 +6,11 @@ import ( "os" "runtime" "sort" + "strconv" "strings" "sync" "time" + "unicode/utf8" ) const ( @@ -32,6 +34,14 @@ type TextFormatter struct { // Force disabling colors. DisableColors bool + // Force quoting of all values + ForceQuote bool + + // DisableQuote disables quoting for all values. + // DisableQuote will have a lower priority than ForceQuote. + // If both of them are set to true, quote will be forced on all values. + DisableQuote bool + // Override coloring based on CLICOLOR and CLICOLOR_FORCE. - https://bixense.com/clicolors/ EnvironmentOverrideColors bool @@ -43,7 +53,10 @@ type TextFormatter struct { // the time passed since beginning of execution. FullTimestamp bool - // TimestampFormat to use for display when a full timestamp is printed + // TimestampFormat to use for display when a full timestamp is printed. + // The format to use is the same than for time.Format or time.Parse from the standard + // library. + // The standard Library already provides a set of predefined format. TimestampFormat string // The fields are sorted by default for a consistent output. For applications @@ -57,6 +70,10 @@ type TextFormatter struct { // Disables the truncation of the level text to 4 characters. DisableLevelTruncation bool + // PadLevelText Adds padding the level text so that all the levels output at the same length + // PadLevelText is a superset of the DisableLevelTruncation option + PadLevelText bool + // QuoteEmptyFields will wrap empty fields in quotes if true QuoteEmptyFields bool @@ -79,23 +96,32 @@ type TextFormatter struct { CallerPrettyfier func(*runtime.Frame) (function string, file string) terminalInitOnce sync.Once + + // The max length of the level text, generated dynamically on init + levelTextMaxLength int } func (f *TextFormatter) init(entry *Entry) { if entry.Logger != nil { f.isTerminal = checkIfTerminal(entry.Logger.Out) } + // Get the max length of the level text + for _, level := range AllLevels { + levelTextLength := utf8.RuneCount([]byte(level.String())) + if levelTextLength > f.levelTextMaxLength { + f.levelTextMaxLength = levelTextLength + } + } } func (f *TextFormatter) isColored() bool { isColored := f.ForceColors || (f.isTerminal && (runtime.GOOS != "windows")) if f.EnvironmentOverrideColors { - if force, ok := os.LookupEnv("CLICOLOR_FORCE"); ok && force != "0" { + switch force, ok := os.LookupEnv("CLICOLOR_FORCE"); { + case ok && force != "0": isColored = true - } else if ok && force == "0" { - isColored = false - } else if os.Getenv("CLICOLOR") == "0" { + case ok && force == "0", os.Getenv("CLICOLOR") == "0": isColored = false } } @@ -212,14 +238,25 @@ func (f *TextFormatter) printColored(b *bytes.Buffer, entry *Entry, keys []strin levelColor = yellow case ErrorLevel, FatalLevel, PanicLevel: levelColor = red + case InfoLevel: + levelColor = blue default: levelColor = blue } levelText := strings.ToUpper(entry.Level.String()) - if !f.DisableLevelTruncation { + if !f.DisableLevelTruncation && !f.PadLevelText { levelText = levelText[0:4] } + if f.PadLevelText { + // Generates the format string used in the next line, for example "%-6s" or "%-7s". + // Based on the max level text length. + formatString := "%-" + strconv.Itoa(f.levelTextMaxLength) + "s" + // Formats the level text by appending spaces up to the max length, for example: + // - "INFO " + // - "WARNING" + levelText = fmt.Sprintf(formatString, levelText) + } // Remove a single newline if it already exists in the message to keep // the behavior of logrus text_formatter the same as the stdlib log package @@ -243,11 +280,12 @@ func (f *TextFormatter) printColored(b *bytes.Buffer, entry *Entry, keys []strin } } - if f.DisableTimestamp { + switch { + case f.DisableTimestamp: fmt.Fprintf(b, "\x1b[%dm%s\x1b[0m%s %-44s ", levelColor, levelText, caller, entry.Message) - } else if !f.FullTimestamp { + case !f.FullTimestamp: fmt.Fprintf(b, "\x1b[%dm%s\x1b[0m[%04d]%s %-44s ", levelColor, levelText, int(entry.Time.Sub(baseTimestamp)/time.Second), caller, entry.Message) - } else { + default: fmt.Fprintf(b, "\x1b[%dm%s\x1b[0m[%s]%s %-44s ", levelColor, levelText, entry.Time.Format(timestampFormat), caller, entry.Message) } for _, k := range keys { @@ -258,9 +296,15 @@ func (f *TextFormatter) printColored(b *bytes.Buffer, entry *Entry, keys []strin } func (f *TextFormatter) needsQuoting(text string) bool { + if f.ForceQuote { + return true + } if f.QuoteEmptyFields && len(text) == 0 { return true } + if f.DisableQuote { + return false + } for _, ch := range text { if !((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || diff --git a/vendor/github.com/sirupsen/logrus/writer.go b/vendor/github.com/sirupsen/logrus/writer.go index 9e1f75135..72e8e3a1b 100644 --- a/vendor/github.com/sirupsen/logrus/writer.go +++ b/vendor/github.com/sirupsen/logrus/writer.go @@ -6,10 +6,16 @@ import ( "runtime" ) +// Writer at INFO level. See WriterLevel for details. func (logger *Logger) Writer() *io.PipeWriter { return logger.WriterLevel(InfoLevel) } +// WriterLevel returns an io.Writer that can be used to write arbitrary text to +// the logger at the given log level. Each line written to the writer will be +// printed in the usual way using formatters and hooks. The writer is part of an +// io.Pipe and it is the callers responsibility to close the writer when done. +// This can be used to override the standard library logger easily. func (logger *Logger) WriterLevel(level Level) *io.PipeWriter { return NewEntry(logger).WriterLevel(level) } diff --git a/vendor/golang.org/x/crypto/ssh/terminal/terminal.go b/vendor/golang.org/x/crypto/ssh/terminal/terminal.go index 2ffb97bfb..a4d1919a9 100644 --- a/vendor/golang.org/x/crypto/ssh/terminal/terminal.go +++ b/vendor/golang.org/x/crypto/ssh/terminal/terminal.go @@ -2,986 +2,75 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +// Package terminal provides support functions for dealing with terminals, as +// commonly found on UNIX systems. +// +// Deprecated: this package moved to golang.org/x/term. package terminal import ( - "bytes" "io" - "runtime" - "strconv" - "sync" - "unicode/utf8" + + "golang.org/x/term" ) // EscapeCodes contains escape sequences that can be written to the terminal in // order to achieve different styles of text. -type EscapeCodes struct { - // Foreground colors - Black, Red, Green, Yellow, Blue, Magenta, Cyan, White []byte - - // Reset all attributes - Reset []byte -} - -var vt100EscapeCodes = EscapeCodes{ - Black: []byte{keyEscape, '[', '3', '0', 'm'}, - Red: []byte{keyEscape, '[', '3', '1', 'm'}, - Green: []byte{keyEscape, '[', '3', '2', 'm'}, - Yellow: []byte{keyEscape, '[', '3', '3', 'm'}, - Blue: []byte{keyEscape, '[', '3', '4', 'm'}, - Magenta: []byte{keyEscape, '[', '3', '5', 'm'}, - Cyan: []byte{keyEscape, '[', '3', '6', 'm'}, - White: []byte{keyEscape, '[', '3', '7', 'm'}, - - Reset: []byte{keyEscape, '[', '0', 'm'}, -} +type EscapeCodes = term.EscapeCodes // Terminal contains the state for running a VT100 terminal that is capable of // reading lines of input. -type Terminal struct { - // AutoCompleteCallback, if non-null, is called for each keypress with - // the full input line and the current position of the cursor (in - // bytes, as an index into |line|). If it returns ok=false, the key - // press is processed normally. Otherwise it returns a replacement line - // and the new cursor position. - AutoCompleteCallback func(line string, pos int, key rune) (newLine string, newPos int, ok bool) - - // Escape contains a pointer to the escape codes for this terminal. - // It's always a valid pointer, although the escape codes themselves - // may be empty if the terminal doesn't support them. - Escape *EscapeCodes - - // lock protects the terminal and the state in this object from - // concurrent processing of a key press and a Write() call. - lock sync.Mutex - - c io.ReadWriter - prompt []rune - - // line is the current line being entered. - line []rune - // pos is the logical position of the cursor in line - pos int - // echo is true if local echo is enabled - echo bool - // pasteActive is true iff there is a bracketed paste operation in - // progress. - pasteActive bool - - // cursorX contains the current X value of the cursor where the left - // edge is 0. cursorY contains the row number where the first row of - // the current line is 0. - cursorX, cursorY int - // maxLine is the greatest value of cursorY so far. - maxLine int - - termWidth, termHeight int - - // outBuf contains the terminal data to be sent. - outBuf []byte - // remainder contains the remainder of any partial key sequences after - // a read. It aliases into inBuf. - remainder []byte - inBuf [256]byte - - // history contains previously entered commands so that they can be - // accessed with the up and down keys. - history stRingBuffer - // historyIndex stores the currently accessed history entry, where zero - // means the immediately previous entry. - historyIndex int - // When navigating up and down the history it's possible to return to - // the incomplete, initial line. That value is stored in - // historyPending. - historyPending string -} +type Terminal = term.Terminal // NewTerminal runs a VT100 terminal on the given ReadWriter. If the ReadWriter is // a local terminal, that terminal must first have been put into raw mode. // prompt is a string that is written at the start of each input line (i.e. // "> "). func NewTerminal(c io.ReadWriter, prompt string) *Terminal { - return &Terminal{ - Escape: &vt100EscapeCodes, - c: c, - prompt: []rune(prompt), - termWidth: 80, - termHeight: 24, - echo: true, - historyIndex: -1, - } -} - -const ( - keyCtrlC = 3 - keyCtrlD = 4 - keyCtrlU = 21 - keyEnter = '\r' - keyEscape = 27 - keyBackspace = 127 - keyUnknown = 0xd800 /* UTF-16 surrogate area */ + iota - keyUp - keyDown - keyLeft - keyRight - keyAltLeft - keyAltRight - keyHome - keyEnd - keyDeleteWord - keyDeleteLine - keyClearScreen - keyPasteStart - keyPasteEnd -) - -var ( - crlf = []byte{'\r', '\n'} - pasteStart = []byte{keyEscape, '[', '2', '0', '0', '~'} - pasteEnd = []byte{keyEscape, '[', '2', '0', '1', '~'} -) - -// bytesToKey tries to parse a key sequence from b. If successful, it returns -// the key and the remainder of the input. Otherwise it returns utf8.RuneError. -func bytesToKey(b []byte, pasteActive bool) (rune, []byte) { - if len(b) == 0 { - return utf8.RuneError, nil - } - - if !pasteActive { - switch b[0] { - case 1: // ^A - return keyHome, b[1:] - case 2: // ^B - return keyLeft, b[1:] - case 5: // ^E - return keyEnd, b[1:] - case 6: // ^F - return keyRight, b[1:] - case 8: // ^H - return keyBackspace, b[1:] - case 11: // ^K - return keyDeleteLine, b[1:] - case 12: // ^L - return keyClearScreen, b[1:] - case 23: // ^W - return keyDeleteWord, b[1:] - case 14: // ^N - return keyDown, b[1:] - case 16: // ^P - return keyUp, b[1:] - } - } - - if b[0] != keyEscape { - if !utf8.FullRune(b) { - return utf8.RuneError, b - } - r, l := utf8.DecodeRune(b) - return r, b[l:] - } - - if !pasteActive && len(b) >= 3 && b[0] == keyEscape && b[1] == '[' { - switch b[2] { - case 'A': - return keyUp, b[3:] - case 'B': - return keyDown, b[3:] - case 'C': - return keyRight, b[3:] - case 'D': - return keyLeft, b[3:] - case 'H': - return keyHome, b[3:] - case 'F': - return keyEnd, b[3:] - } - } - - if !pasteActive && len(b) >= 6 && b[0] == keyEscape && b[1] == '[' && b[2] == '1' && b[3] == ';' && b[4] == '3' { - switch b[5] { - case 'C': - return keyAltRight, b[6:] - case 'D': - return keyAltLeft, b[6:] - } - } - - if !pasteActive && len(b) >= 6 && bytes.Equal(b[:6], pasteStart) { - return keyPasteStart, b[6:] - } - - if pasteActive && len(b) >= 6 && bytes.Equal(b[:6], pasteEnd) { - return keyPasteEnd, b[6:] - } - - // If we get here then we have a key that we don't recognise, or a - // partial sequence. It's not clear how one should find the end of a - // sequence without knowing them all, but it seems that [a-zA-Z~] only - // appears at the end of a sequence. - for i, c := range b[0:] { - if c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' || c == '~' { - return keyUnknown, b[i+1:] - } - } - - return utf8.RuneError, b -} - -// queue appends data to the end of t.outBuf -func (t *Terminal) queue(data []rune) { - t.outBuf = append(t.outBuf, []byte(string(data))...) -} - -var eraseUnderCursor = []rune{' ', keyEscape, '[', 'D'} -var space = []rune{' '} - -func isPrintable(key rune) bool { - isInSurrogateArea := key >= 0xd800 && key <= 0xdbff - return key >= 32 && !isInSurrogateArea -} - -// moveCursorToPos appends data to t.outBuf which will move the cursor to the -// given, logical position in the text. -func (t *Terminal) moveCursorToPos(pos int) { - if !t.echo { - return - } - - x := visualLength(t.prompt) + pos - y := x / t.termWidth - x = x % t.termWidth - - up := 0 - if y < t.cursorY { - up = t.cursorY - y - } - - down := 0 - if y > t.cursorY { - down = y - t.cursorY - } - - left := 0 - if x < t.cursorX { - left = t.cursorX - x - } - - right := 0 - if x > t.cursorX { - right = x - t.cursorX - } - - t.cursorX = x - t.cursorY = y - t.move(up, down, left, right) -} - -func (t *Terminal) move(up, down, left, right int) { - m := []rune{} - - // 1 unit up can be expressed as ^[[A or ^[A - // 5 units up can be expressed as ^[[5A - - if up == 1 { - m = append(m, keyEscape, '[', 'A') - } else if up > 1 { - m = append(m, keyEscape, '[') - m = append(m, []rune(strconv.Itoa(up))...) - m = append(m, 'A') - } - - if down == 1 { - m = append(m, keyEscape, '[', 'B') - } else if down > 1 { - m = append(m, keyEscape, '[') - m = append(m, []rune(strconv.Itoa(down))...) - m = append(m, 'B') - } - - if right == 1 { - m = append(m, keyEscape, '[', 'C') - } else if right > 1 { - m = append(m, keyEscape, '[') - m = append(m, []rune(strconv.Itoa(right))...) - m = append(m, 'C') - } - - if left == 1 { - m = append(m, keyEscape, '[', 'D') - } else if left > 1 { - m = append(m, keyEscape, '[') - m = append(m, []rune(strconv.Itoa(left))...) - m = append(m, 'D') - } - - t.queue(m) -} - -func (t *Terminal) clearLineToRight() { - op := []rune{keyEscape, '[', 'K'} - t.queue(op) -} - -const maxLineLength = 4096 - -func (t *Terminal) setLine(newLine []rune, newPos int) { - if t.echo { - t.moveCursorToPos(0) - t.writeLine(newLine) - for i := len(newLine); i < len(t.line); i++ { - t.writeLine(space) - } - t.moveCursorToPos(newPos) - } - t.line = newLine - t.pos = newPos -} - -func (t *Terminal) advanceCursor(places int) { - t.cursorX += places - t.cursorY += t.cursorX / t.termWidth - if t.cursorY > t.maxLine { - t.maxLine = t.cursorY - } - t.cursorX = t.cursorX % t.termWidth - - if places > 0 && t.cursorX == 0 { - // Normally terminals will advance the current position - // when writing a character. But that doesn't happen - // for the last character in a line. However, when - // writing a character (except a new line) that causes - // a line wrap, the position will be advanced two - // places. - // - // So, if we are stopping at the end of a line, we - // need to write a newline so that our cursor can be - // advanced to the next line. - t.outBuf = append(t.outBuf, '\r', '\n') - } -} - -func (t *Terminal) eraseNPreviousChars(n int) { - if n == 0 { - return - } - - if t.pos < n { - n = t.pos - } - t.pos -= n - t.moveCursorToPos(t.pos) - - copy(t.line[t.pos:], t.line[n+t.pos:]) - t.line = t.line[:len(t.line)-n] - if t.echo { - t.writeLine(t.line[t.pos:]) - for i := 0; i < n; i++ { - t.queue(space) - } - t.advanceCursor(n) - t.moveCursorToPos(t.pos) - } -} - -// countToLeftWord returns then number of characters from the cursor to the -// start of the previous word. -func (t *Terminal) countToLeftWord() int { - if t.pos == 0 { - return 0 - } - - pos := t.pos - 1 - for pos > 0 { - if t.line[pos] != ' ' { - break - } - pos-- - } - for pos > 0 { - if t.line[pos] == ' ' { - pos++ - break - } - pos-- - } - - return t.pos - pos -} - -// countToRightWord returns then number of characters from the cursor to the -// start of the next word. -func (t *Terminal) countToRightWord() int { - pos := t.pos - for pos < len(t.line) { - if t.line[pos] == ' ' { - break - } - pos++ - } - for pos < len(t.line) { - if t.line[pos] != ' ' { - break - } - pos++ - } - return pos - t.pos -} - -// visualLength returns the number of visible glyphs in s. -func visualLength(runes []rune) int { - inEscapeSeq := false - length := 0 - - for _, r := range runes { - switch { - case inEscapeSeq: - if (r >= 'a' && r <= 'z') || (r >= 'A' && r <= 'Z') { - inEscapeSeq = false - } - case r == '\x1b': - inEscapeSeq = true - default: - length++ - } - } - - return length -} - -// handleKey processes the given key and, optionally, returns a line of text -// that the user has entered. -func (t *Terminal) handleKey(key rune) (line string, ok bool) { - if t.pasteActive && key != keyEnter { - t.addKeyToLine(key) - return - } - - switch key { - case keyBackspace: - if t.pos == 0 { - return - } - t.eraseNPreviousChars(1) - case keyAltLeft: - // move left by a word. - t.pos -= t.countToLeftWord() - t.moveCursorToPos(t.pos) - case keyAltRight: - // move right by a word. - t.pos += t.countToRightWord() - t.moveCursorToPos(t.pos) - case keyLeft: - if t.pos == 0 { - return - } - t.pos-- - t.moveCursorToPos(t.pos) - case keyRight: - if t.pos == len(t.line) { - return - } - t.pos++ - t.moveCursorToPos(t.pos) - case keyHome: - if t.pos == 0 { - return - } - t.pos = 0 - t.moveCursorToPos(t.pos) - case keyEnd: - if t.pos == len(t.line) { - return - } - t.pos = len(t.line) - t.moveCursorToPos(t.pos) - case keyUp: - entry, ok := t.history.NthPreviousEntry(t.historyIndex + 1) - if !ok { - return "", false - } - if t.historyIndex == -1 { - t.historyPending = string(t.line) - } - t.historyIndex++ - runes := []rune(entry) - t.setLine(runes, len(runes)) - case keyDown: - switch t.historyIndex { - case -1: - return - case 0: - runes := []rune(t.historyPending) - t.setLine(runes, len(runes)) - t.historyIndex-- - default: - entry, ok := t.history.NthPreviousEntry(t.historyIndex - 1) - if ok { - t.historyIndex-- - runes := []rune(entry) - t.setLine(runes, len(runes)) - } - } - case keyEnter: - t.moveCursorToPos(len(t.line)) - t.queue([]rune("\r\n")) - line = string(t.line) - ok = true - t.line = t.line[:0] - t.pos = 0 - t.cursorX = 0 - t.cursorY = 0 - t.maxLine = 0 - case keyDeleteWord: - // Delete zero or more spaces and then one or more characters. - t.eraseNPreviousChars(t.countToLeftWord()) - case keyDeleteLine: - // Delete everything from the current cursor position to the - // end of line. - for i := t.pos; i < len(t.line); i++ { - t.queue(space) - t.advanceCursor(1) - } - t.line = t.line[:t.pos] - t.moveCursorToPos(t.pos) - case keyCtrlD: - // Erase the character under the current position. - // The EOF case when the line is empty is handled in - // readLine(). - if t.pos < len(t.line) { - t.pos++ - t.eraseNPreviousChars(1) - } - case keyCtrlU: - t.eraseNPreviousChars(t.pos) - case keyClearScreen: - // Erases the screen and moves the cursor to the home position. - t.queue([]rune("\x1b[2J\x1b[H")) - t.queue(t.prompt) - t.cursorX, t.cursorY = 0, 0 - t.advanceCursor(visualLength(t.prompt)) - t.setLine(t.line, t.pos) - default: - if t.AutoCompleteCallback != nil { - prefix := string(t.line[:t.pos]) - suffix := string(t.line[t.pos:]) - - t.lock.Unlock() - newLine, newPos, completeOk := t.AutoCompleteCallback(prefix+suffix, len(prefix), key) - t.lock.Lock() - - if completeOk { - t.setLine([]rune(newLine), utf8.RuneCount([]byte(newLine)[:newPos])) - return - } - } - if !isPrintable(key) { - return - } - if len(t.line) == maxLineLength { - return - } - t.addKeyToLine(key) - } - return -} - -// addKeyToLine inserts the given key at the current position in the current -// line. -func (t *Terminal) addKeyToLine(key rune) { - if len(t.line) == cap(t.line) { - newLine := make([]rune, len(t.line), 2*(1+len(t.line))) - copy(newLine, t.line) - t.line = newLine - } - t.line = t.line[:len(t.line)+1] - copy(t.line[t.pos+1:], t.line[t.pos:]) - t.line[t.pos] = key - if t.echo { - t.writeLine(t.line[t.pos:]) - } - t.pos++ - t.moveCursorToPos(t.pos) -} - -func (t *Terminal) writeLine(line []rune) { - for len(line) != 0 { - remainingOnLine := t.termWidth - t.cursorX - todo := len(line) - if todo > remainingOnLine { - todo = remainingOnLine - } - t.queue(line[:todo]) - t.advanceCursor(visualLength(line[:todo])) - line = line[todo:] - } -} - -// writeWithCRLF writes buf to w but replaces all occurrences of \n with \r\n. -func writeWithCRLF(w io.Writer, buf []byte) (n int, err error) { - for len(buf) > 0 { - i := bytes.IndexByte(buf, '\n') - todo := len(buf) - if i >= 0 { - todo = i - } - - var nn int - nn, err = w.Write(buf[:todo]) - n += nn - if err != nil { - return n, err - } - buf = buf[todo:] - - if i >= 0 { - if _, err = w.Write(crlf); err != nil { - return n, err - } - n++ - buf = buf[1:] - } - } - - return n, nil -} - -func (t *Terminal) Write(buf []byte) (n int, err error) { - t.lock.Lock() - defer t.lock.Unlock() - - if t.cursorX == 0 && t.cursorY == 0 { - // This is the easy case: there's nothing on the screen that we - // have to move out of the way. - return writeWithCRLF(t.c, buf) - } - - // We have a prompt and possibly user input on the screen. We - // have to clear it first. - t.move(0 /* up */, 0 /* down */, t.cursorX /* left */, 0 /* right */) - t.cursorX = 0 - t.clearLineToRight() - - for t.cursorY > 0 { - t.move(1 /* up */, 0, 0, 0) - t.cursorY-- - t.clearLineToRight() - } - - if _, err = t.c.Write(t.outBuf); err != nil { - return - } - t.outBuf = t.outBuf[:0] - - if n, err = writeWithCRLF(t.c, buf); err != nil { - return - } - - t.writeLine(t.prompt) - if t.echo { - t.writeLine(t.line) - } - - t.moveCursorToPos(t.pos) - - if _, err = t.c.Write(t.outBuf); err != nil { - return - } - t.outBuf = t.outBuf[:0] - return -} - -// ReadPassword temporarily changes the prompt and reads a password, without -// echo, from the terminal. -func (t *Terminal) ReadPassword(prompt string) (line string, err error) { - t.lock.Lock() - defer t.lock.Unlock() - - oldPrompt := t.prompt - t.prompt = []rune(prompt) - t.echo = false - - line, err = t.readLine() - - t.prompt = oldPrompt - t.echo = true - - return -} - -// ReadLine returns a line of input from the terminal. -func (t *Terminal) ReadLine() (line string, err error) { - t.lock.Lock() - defer t.lock.Unlock() - - return t.readLine() -} - -func (t *Terminal) readLine() (line string, err error) { - // t.lock must be held at this point - - if t.cursorX == 0 && t.cursorY == 0 { - t.writeLine(t.prompt) - t.c.Write(t.outBuf) - t.outBuf = t.outBuf[:0] - } - - lineIsPasted := t.pasteActive - - for { - rest := t.remainder - lineOk := false - for !lineOk { - var key rune - key, rest = bytesToKey(rest, t.pasteActive) - if key == utf8.RuneError { - break - } - if !t.pasteActive { - if key == keyCtrlD { - if len(t.line) == 0 { - return "", io.EOF - } - } - if key == keyCtrlC { - return "", io.EOF - } - if key == keyPasteStart { - t.pasteActive = true - if len(t.line) == 0 { - lineIsPasted = true - } - continue - } - } else if key == keyPasteEnd { - t.pasteActive = false - continue - } - if !t.pasteActive { - lineIsPasted = false - } - line, lineOk = t.handleKey(key) - } - if len(rest) > 0 { - n := copy(t.inBuf[:], rest) - t.remainder = t.inBuf[:n] - } else { - t.remainder = nil - } - t.c.Write(t.outBuf) - t.outBuf = t.outBuf[:0] - if lineOk { - if t.echo { - t.historyIndex = -1 - t.history.Add(line) - } - if lineIsPasted { - err = ErrPasteIndicator - } - return - } - - // t.remainder is a slice at the beginning of t.inBuf - // containing a partial key sequence - readBuf := t.inBuf[len(t.remainder):] - var n int - - t.lock.Unlock() - n, err = t.c.Read(readBuf) - t.lock.Lock() - - if err != nil { - return - } - - t.remainder = t.inBuf[:n+len(t.remainder)] - } -} - -// SetPrompt sets the prompt to be used when reading subsequent lines. -func (t *Terminal) SetPrompt(prompt string) { - t.lock.Lock() - defer t.lock.Unlock() - - t.prompt = []rune(prompt) -} - -func (t *Terminal) clearAndRepaintLinePlusNPrevious(numPrevLines int) { - // Move cursor to column zero at the start of the line. - t.move(t.cursorY, 0, t.cursorX, 0) - t.cursorX, t.cursorY = 0, 0 - t.clearLineToRight() - for t.cursorY < numPrevLines { - // Move down a line - t.move(0, 1, 0, 0) - t.cursorY++ - t.clearLineToRight() - } - // Move back to beginning. - t.move(t.cursorY, 0, 0, 0) - t.cursorX, t.cursorY = 0, 0 - - t.queue(t.prompt) - t.advanceCursor(visualLength(t.prompt)) - t.writeLine(t.line) - t.moveCursorToPos(t.pos) -} - -func (t *Terminal) SetSize(width, height int) error { - t.lock.Lock() - defer t.lock.Unlock() - - if width == 0 { - width = 1 - } - - oldWidth := t.termWidth - t.termWidth, t.termHeight = width, height - - switch { - case width == oldWidth: - // If the width didn't change then nothing else needs to be - // done. - return nil - case len(t.line) == 0 && t.cursorX == 0 && t.cursorY == 0: - // If there is nothing on current line and no prompt printed, - // just do nothing - return nil - case width < oldWidth: - // Some terminals (e.g. xterm) will truncate lines that were - // too long when shinking. Others, (e.g. gnome-terminal) will - // attempt to wrap them. For the former, repainting t.maxLine - // works great, but that behaviour goes badly wrong in the case - // of the latter because they have doubled every full line. - - // We assume that we are working on a terminal that wraps lines - // and adjust the cursor position based on every previous line - // wrapping and turning into two. This causes the prompt on - // xterms to move upwards, which isn't great, but it avoids a - // huge mess with gnome-terminal. - if t.cursorX >= t.termWidth { - t.cursorX = t.termWidth - 1 - } - t.cursorY *= 2 - t.clearAndRepaintLinePlusNPrevious(t.maxLine * 2) - case width > oldWidth: - // If the terminal expands then our position calculations will - // be wrong in the future because we think the cursor is - // |t.pos| chars into the string, but there will be a gap at - // the end of any wrapped line. - // - // But the position will actually be correct until we move, so - // we can move back to the beginning and repaint everything. - t.clearAndRepaintLinePlusNPrevious(t.maxLine) - } - - _, err := t.c.Write(t.outBuf) - t.outBuf = t.outBuf[:0] - return err -} - -type pasteIndicatorError struct{} - -func (pasteIndicatorError) Error() string { - return "terminal: ErrPasteIndicator not correctly handled" + return term.NewTerminal(c, prompt) } // ErrPasteIndicator may be returned from ReadLine as the error, in addition // to valid line data. It indicates that bracketed paste mode is enabled and // that the returned line consists only of pasted data. Programs may wish to // interpret pasted data more literally than typed data. -var ErrPasteIndicator = pasteIndicatorError{} +var ErrPasteIndicator = term.ErrPasteIndicator -// SetBracketedPasteMode requests that the terminal bracket paste operations -// with markers. Not all terminals support this but, if it is supported, then -// enabling this mode will stop any autocomplete callback from running due to -// pastes. Additionally, any lines that are completely pasted will be returned -// from ReadLine with the error set to ErrPasteIndicator. -func (t *Terminal) SetBracketedPasteMode(on bool) { - if on { - io.WriteString(t.c, "\x1b[?2004h") - } else { - io.WriteString(t.c, "\x1b[?2004l") - } +// State contains the state of a terminal. +type State = term.State + +// IsTerminal returns whether the given file descriptor is a terminal. +func IsTerminal(fd int) bool { + return term.IsTerminal(fd) } -// stRingBuffer is a ring buffer of strings. -type stRingBuffer struct { - // entries contains max elements. - entries []string - max int - // head contains the index of the element most recently added to the ring. - head int - // size contains the number of elements in the ring. - size int +// ReadPassword reads a line of input from a terminal without local echo. This +// is commonly used for inputting passwords and other sensitive data. The slice +// returned does not include the \n. +func ReadPassword(fd int) ([]byte, error) { + return term.ReadPassword(fd) } -func (s *stRingBuffer) Add(a string) { - if s.entries == nil { - const defaultNumEntries = 100 - s.entries = make([]string, defaultNumEntries) - s.max = defaultNumEntries - } - - s.head = (s.head + 1) % s.max - s.entries[s.head] = a - if s.size < s.max { - s.size++ - } +// MakeRaw puts the terminal connected to the given file descriptor into raw +// mode and returns the previous state of the terminal so that it can be +// restored. +func MakeRaw(fd int) (*State, error) { + return term.MakeRaw(fd) } -// NthPreviousEntry returns the value passed to the nth previous call to Add. -// If n is zero then the immediately prior value is returned, if one, then the -// next most recent, and so on. If such an element doesn't exist then ok is -// false. -func (s *stRingBuffer) NthPreviousEntry(n int) (value string, ok bool) { - if n >= s.size { - return "", false - } - index := s.head - n - if index < 0 { - index += s.max - } - return s.entries[index], true +// Restore restores the terminal connected to the given file descriptor to a +// previous state. +func Restore(fd int, oldState *State) error { + return term.Restore(fd, oldState) } -// readPasswordLine reads from reader until it finds \n or io.EOF. -// The slice returned does not include the \n. -// readPasswordLine also ignores any \r it finds. -// Windows uses \r as end of line. So, on Windows, readPasswordLine -// reads until it finds \r and ignores any \n it finds during processing. -func readPasswordLine(reader io.Reader) ([]byte, error) { - var buf [1]byte - var ret []byte - - for { - n, err := reader.Read(buf[:]) - if n > 0 { - switch buf[0] { - case '\b': - if len(ret) > 0 { - ret = ret[:len(ret)-1] - } - case '\n': - if runtime.GOOS != "windows" { - return ret, nil - } - // otherwise ignore \n - case '\r': - if runtime.GOOS == "windows" { - return ret, nil - } - // otherwise ignore \r - default: - ret = append(ret, buf[0]) - } - continue - } - if err != nil { - if err == io.EOF && len(ret) > 0 { - return ret, nil - } - return ret, err - } - } +// GetState returns the current state of a terminal which may be useful to +// restore the terminal after a signal. +func GetState(fd int) (*State, error) { + return term.GetState(fd) +} + +// GetSize returns the dimensions of the given terminal. +func GetSize(fd int) (width, height int, err error) { + return term.GetSize(fd) } diff --git a/vendor/golang.org/x/crypto/ssh/terminal/util_linux.go b/vendor/golang.org/x/crypto/ssh/terminal/util_linux.go deleted file mode 100644 index 5fadfe8a1..000000000 --- a/vendor/golang.org/x/crypto/ssh/terminal/util_linux.go +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package terminal - -import "golang.org/x/sys/unix" - -const ioctlReadTermios = unix.TCGETS -const ioctlWriteTermios = unix.TCSETS diff --git a/vendor/golang.org/x/crypto/ssh/terminal/util_solaris.go b/vendor/golang.org/x/crypto/ssh/terminal/util_solaris.go deleted file mode 100644 index 3d5f06a9f..000000000 --- a/vendor/golang.org/x/crypto/ssh/terminal/util_solaris.go +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build solaris - -package terminal // import "golang.org/x/crypto/ssh/terminal" - -import ( - "golang.org/x/sys/unix" - "io" - "syscall" -) - -// State contains the state of a terminal. -type State struct { - termios unix.Termios -} - -// IsTerminal returns whether the given file descriptor is a terminal. -func IsTerminal(fd int) bool { - _, err := unix.IoctlGetTermio(fd, unix.TCGETA) - return err == nil -} - -// ReadPassword reads a line of input from a terminal without local echo. This -// is commonly used for inputting passwords and other sensitive data. The slice -// returned does not include the \n. -func ReadPassword(fd int) ([]byte, error) { - // see also: http://src.illumos.org/source/xref/illumos-gate/usr/src/lib/libast/common/uwin/getpass.c - val, err := unix.IoctlGetTermios(fd, unix.TCGETS) - if err != nil { - return nil, err - } - oldState := *val - - newState := oldState - newState.Lflag &^= syscall.ECHO - newState.Lflag |= syscall.ICANON | syscall.ISIG - newState.Iflag |= syscall.ICRNL - err = unix.IoctlSetTermios(fd, unix.TCSETS, &newState) - if err != nil { - return nil, err - } - - defer unix.IoctlSetTermios(fd, unix.TCSETS, &oldState) - - var buf [16]byte - var ret []byte - for { - n, err := syscall.Read(fd, buf[:]) - if err != nil { - return nil, err - } - if n == 0 { - if len(ret) == 0 { - return nil, io.EOF - } - break - } - if buf[n-1] == '\n' { - n-- - } - ret = append(ret, buf[:n]...) - if n < len(buf) { - break - } - } - - return ret, nil -} - -// MakeRaw puts the terminal connected to the given file descriptor into raw -// mode and returns the previous state of the terminal so that it can be -// restored. -// see http://cr.illumos.org/~webrev/andy_js/1060/ -func MakeRaw(fd int) (*State, error) { - termios, err := unix.IoctlGetTermios(fd, unix.TCGETS) - if err != nil { - return nil, err - } - - oldState := State{termios: *termios} - - termios.Iflag &^= unix.IGNBRK | unix.BRKINT | unix.PARMRK | unix.ISTRIP | unix.INLCR | unix.IGNCR | unix.ICRNL | unix.IXON - termios.Oflag &^= unix.OPOST - termios.Lflag &^= unix.ECHO | unix.ECHONL | unix.ICANON | unix.ISIG | unix.IEXTEN - termios.Cflag &^= unix.CSIZE | unix.PARENB - termios.Cflag |= unix.CS8 - termios.Cc[unix.VMIN] = 1 - termios.Cc[unix.VTIME] = 0 - - if err := unix.IoctlSetTermios(fd, unix.TCSETS, termios); err != nil { - return nil, err - } - - return &oldState, nil -} - -// Restore restores the terminal connected to the given file descriptor to a -// previous state. -func Restore(fd int, oldState *State) error { - return unix.IoctlSetTermios(fd, unix.TCSETS, &oldState.termios) -} - -// GetState returns the current state of a terminal which may be useful to -// restore the terminal after a signal. -func GetState(fd int) (*State, error) { - termios, err := unix.IoctlGetTermios(fd, unix.TCGETS) - if err != nil { - return nil, err - } - - return &State{termios: *termios}, nil -} - -// GetSize returns the dimensions of the given terminal. -func GetSize(fd int) (width, height int, err error) { - ws, err := unix.IoctlGetWinsize(fd, unix.TIOCGWINSZ) - if err != nil { - return 0, 0, err - } - return int(ws.Col), int(ws.Row), nil -} diff --git a/vendor/golang.org/x/net/html/const.go b/vendor/golang.org/x/net/html/const.go index 73804d347..ff7acf2d5 100644 --- a/vendor/golang.org/x/net/html/const.go +++ b/vendor/golang.org/x/net/html/const.go @@ -52,7 +52,7 @@ var isSpecialElementMap = map[string]bool{ "iframe": true, "img": true, "input": true, - "keygen": true, + "keygen": true, // "keygen" has been removed from the spec, but are kept here for backwards compatibility. "li": true, "link": true, "listing": true, diff --git a/vendor/golang.org/x/net/html/foreign.go b/vendor/golang.org/x/net/html/foreign.go index 74774c458..9da9e9dc4 100644 --- a/vendor/golang.org/x/net/html/foreign.go +++ b/vendor/golang.org/x/net/html/foreign.go @@ -161,65 +161,62 @@ var mathMLAttributeAdjustments = map[string]string{ } var svgAttributeAdjustments = map[string]string{ - "attributename": "attributeName", - "attributetype": "attributeType", - "basefrequency": "baseFrequency", - "baseprofile": "baseProfile", - "calcmode": "calcMode", - "clippathunits": "clipPathUnits", - "contentscripttype": "contentScriptType", - "contentstyletype": "contentStyleType", - "diffuseconstant": "diffuseConstant", - "edgemode": "edgeMode", - "externalresourcesrequired": "externalResourcesRequired", - "filterunits": "filterUnits", - "glyphref": "glyphRef", - "gradienttransform": "gradientTransform", - "gradientunits": "gradientUnits", - "kernelmatrix": "kernelMatrix", - "kernelunitlength": "kernelUnitLength", - "keypoints": "keyPoints", - "keysplines": "keySplines", - "keytimes": "keyTimes", - "lengthadjust": "lengthAdjust", - "limitingconeangle": "limitingConeAngle", - "markerheight": "markerHeight", - "markerunits": "markerUnits", - "markerwidth": "markerWidth", - "maskcontentunits": "maskContentUnits", - "maskunits": "maskUnits", - "numoctaves": "numOctaves", - "pathlength": "pathLength", - "patterncontentunits": "patternContentUnits", - "patterntransform": "patternTransform", - "patternunits": "patternUnits", - "pointsatx": "pointsAtX", - "pointsaty": "pointsAtY", - "pointsatz": "pointsAtZ", - "preservealpha": "preserveAlpha", - "preserveaspectratio": "preserveAspectRatio", - "primitiveunits": "primitiveUnits", - "refx": "refX", - "refy": "refY", - "repeatcount": "repeatCount", - "repeatdur": "repeatDur", - "requiredextensions": "requiredExtensions", - "requiredfeatures": "requiredFeatures", - "specularconstant": "specularConstant", - "specularexponent": "specularExponent", - "spreadmethod": "spreadMethod", - "startoffset": "startOffset", - "stddeviation": "stdDeviation", - "stitchtiles": "stitchTiles", - "surfacescale": "surfaceScale", - "systemlanguage": "systemLanguage", - "tablevalues": "tableValues", - "targetx": "targetX", - "targety": "targetY", - "textlength": "textLength", - "viewbox": "viewBox", - "viewtarget": "viewTarget", - "xchannelselector": "xChannelSelector", - "ychannelselector": "yChannelSelector", - "zoomandpan": "zoomAndPan", + "attributename": "attributeName", + "attributetype": "attributeType", + "basefrequency": "baseFrequency", + "baseprofile": "baseProfile", + "calcmode": "calcMode", + "clippathunits": "clipPathUnits", + "diffuseconstant": "diffuseConstant", + "edgemode": "edgeMode", + "filterunits": "filterUnits", + "glyphref": "glyphRef", + "gradienttransform": "gradientTransform", + "gradientunits": "gradientUnits", + "kernelmatrix": "kernelMatrix", + "kernelunitlength": "kernelUnitLength", + "keypoints": "keyPoints", + "keysplines": "keySplines", + "keytimes": "keyTimes", + "lengthadjust": "lengthAdjust", + "limitingconeangle": "limitingConeAngle", + "markerheight": "markerHeight", + "markerunits": "markerUnits", + "markerwidth": "markerWidth", + "maskcontentunits": "maskContentUnits", + "maskunits": "maskUnits", + "numoctaves": "numOctaves", + "pathlength": "pathLength", + "patterncontentunits": "patternContentUnits", + "patterntransform": "patternTransform", + "patternunits": "patternUnits", + "pointsatx": "pointsAtX", + "pointsaty": "pointsAtY", + "pointsatz": "pointsAtZ", + "preservealpha": "preserveAlpha", + "preserveaspectratio": "preserveAspectRatio", + "primitiveunits": "primitiveUnits", + "refx": "refX", + "refy": "refY", + "repeatcount": "repeatCount", + "repeatdur": "repeatDur", + "requiredextensions": "requiredExtensions", + "requiredfeatures": "requiredFeatures", + "specularconstant": "specularConstant", + "specularexponent": "specularExponent", + "spreadmethod": "spreadMethod", + "startoffset": "startOffset", + "stddeviation": "stdDeviation", + "stitchtiles": "stitchTiles", + "surfacescale": "surfaceScale", + "systemlanguage": "systemLanguage", + "tablevalues": "tableValues", + "targetx": "targetX", + "targety": "targetY", + "textlength": "textLength", + "viewbox": "viewBox", + "viewtarget": "viewTarget", + "xchannelselector": "xChannelSelector", + "ychannelselector": "yChannelSelector", + "zoomandpan": "zoomAndPan", } diff --git a/vendor/golang.org/x/net/html/parse.go b/vendor/golang.org/x/net/html/parse.go index 2cd12fc81..f91466f7c 100644 --- a/vendor/golang.org/x/net/html/parse.go +++ b/vendor/golang.org/x/net/html/parse.go @@ -728,7 +728,13 @@ func inHeadNoscriptIM(p *parser) bool { return inBodyIM(p) case a.Basefont, a.Bgsound, a.Link, a.Meta, a.Noframes, a.Style: return inHeadIM(p) - case a.Head, a.Noscript: + case a.Head: + // Ignore the token. + return true + case a.Noscript: + // Don't let the tokenizer go into raw text mode even when a
    ); }; diff --git a/ui/v2.5/src/components/Performers/PerformerDetails/PerformerDetailsPanel.tsx b/ui/v2.5/src/components/Performers/PerformerDetails/PerformerDetailsPanel.tsx index eaeb024bd..4ea7de9bc 100644 --- a/ui/v2.5/src/components/Performers/PerformerDetails/PerformerDetailsPanel.tsx +++ b/ui/v2.5/src/components/Performers/PerformerDetails/PerformerDetailsPanel.tsx @@ -23,18 +23,18 @@ export const PerformerDetailsPanel: React.FC = ({ } return ( -
    -
    + <> +
    -
    +
      {(performer.tags ?? []).map((tag) => ( ))}
    -
    + ); } @@ -44,14 +44,14 @@ export const PerformerDetailsPanel: React.FC = ({ } return ( -
    -
    + <> +
    :
    -
    +
    -
    + ); } @@ -61,9 +61,9 @@ export const PerformerDetailsPanel: React.FC = ({ } return ( -
    -
    StashIDs
    -
    + <> +
    StashIDs
    +
      {performer.stash_ids.map((stashID) => { const base = stashID.endpoint.match(/https?:\/\/.*?\//)?.[0]; @@ -86,7 +86,7 @@ export const PerformerDetailsPanel: React.FC = ({ })}
    -
    + ); } @@ -113,7 +113,7 @@ export const PerformerDetailsPanel: React.FC = ({ }; return ( - <> +
    = ({ {renderRating()} {renderTagsField()} {renderStashIDs()} - +
    ); }; diff --git a/ui/v2.5/src/components/Scenes/SceneDetails/SceneFileInfoPanel.tsx b/ui/v2.5/src/components/Scenes/SceneDetails/SceneFileInfoPanel.tsx index b0a78fda0..31b3ab384 100644 --- a/ui/v2.5/src/components/Scenes/SceneDetails/SceneFileInfoPanel.tsx +++ b/ui/v2.5/src/components/Scenes/SceneDetails/SceneFileInfoPanel.tsx @@ -1,8 +1,8 @@ import React from "react"; -import { FormattedMessage, FormattedNumber } from "react-intl"; +import { FormattedNumber } from "react-intl"; import * as GQL from "src/core/generated-graphql"; import { TextUtils } from "src/utils"; -import { TruncatedText } from "src/components/Shared"; +import { TextField, URLField } from "src/utils/field"; interface ISceneFileInfoPanelProps { scene: GQL.SceneDataFragment; @@ -11,61 +11,6 @@ interface ISceneFileInfoPanelProps { export const SceneFileInfoPanel: React.FC = ( props: ISceneFileInfoPanelProps ) => { - function renderOSHash() { - if (props.scene.oshash) { - return ( -
    - - - - -
    - ); - } - } - - function renderChecksum() { - if (props.scene.checksum) { - return ( -
    - - - - -
    - ); - } - } - - function renderPath() { - const { - scene: { path }, - } = props; - return ( -
    - - - - - - {" "} -
    - ); - } - - function renderStream() { - return ( -
    - - - - - - {" "} -
    - ); - } - function renderFileSize() { if (props.scene.file.size === undefined) { return; @@ -76,11 +21,8 @@ export const SceneFileInfoPanel: React.FC = ( ); return ( -
    - - - - + + = ( maximumFractionDigits={2} /> -
    - ); - } - - function renderDuration() { - if (props.scene.file.duration === undefined) { - return; - } - return ( -
    - - - - -
    - ); - } - - function renderDimensions() { - if (props.scene.file.duration === undefined) { - return; - } - return ( -
    - - - - -
    - ); - } - - function renderFrameRate() { - if (props.scene.file.framerate === undefined) { - return; - } - return ( -
    - - - - - frames per - second - -
    - ); - } - - function renderbitrate() { - // TODO: An upcoming react-intl version will support compound units, megabits-per-second - if (props.scene.file.bitrate === undefined) { - return; - } - return ( -
    - - - - - -  megabits per second - -
    - ); - } - - function renderVideoCodec() { - if (props.scene.file.video_codec === undefined) { - return; - } - return ( -
    - - - - -
    - ); - } - - function renderAudioCodec() { - if (props.scene.file.audio_codec === undefined) { - return; - } - return ( -
    - - - - -
    - ); - } - - function renderUrl() { - if (!props.scene.url || props.scene.url === "") { - return; - } - return ( -
    - - - - - - -
    + ); } @@ -216,76 +42,114 @@ export const SceneFileInfoPanel: React.FC = ( } return ( -
    - StashIDs -
      - {props.scene.stash_ids.map((stashID) => { - const base = stashID.endpoint.match(/https?:\/\/.*?\//)?.[0]; - const link = base ? ( - - {stashID.stash_id} - - ) : ( - stashID.stash_id - ); - return ( -
    • - {link} -
    • - ); - })} -
    -
    + <> +
    StashIDs
    +
    +
      + {props.scene.stash_ids.map((stashID) => { + const base = stashID.endpoint.match(/https?:\/\/.*?\//)?.[0]; + const link = base ? ( + + {stashID.stash_id} + + ) : ( + stashID.stash_id + ); + return ( +
    • + {link} +
    • + ); + })} +
    +
    + ); } - function renderPhash() { - if (props.scene.phash) { - return ( -
    - - - - -
    - ); - } - } - function renderFunscript() { if (props.scene.interactive) { return ( -
    - Funscript - - - {" "} -
    + ); } } return ( -
    - {renderOSHash()} - {renderChecksum()} - {renderPhash()} - {renderPath()} - {renderStream()} +
    + + + + + {renderFunscript()} {renderFileSize()} - {renderDuration()} - {renderDimensions()} - {renderFrameRate()} - {renderbitrate()} - {renderVideoCodec()} - {renderAudioCodec()} - {renderUrl()} + + + + frames per + second + + + {" "} + frames per second + + + + {renderStashIDs()} -
    + ); }; diff --git a/ui/v2.5/src/components/Shared/styles.scss b/ui/v2.5/src/components/Shared/styles.scss index 99a51bcb8..bff6a5907 100644 --- a/ui/v2.5/src/components/Shared/styles.scss +++ b/ui/v2.5/src/components/Shared/styles.scss @@ -186,6 +186,10 @@ button.collapse-button.btn-primary:not(:disabled):not(.disabled):active { max-width: 300px; white-space: pre-line; } + + .file-info-panel a > & { + word-break: break-all; + } } .RatingStars { diff --git a/ui/v2.5/src/index.scss b/ui/v2.5/src/index.scss index 58c81d61c..3fbad4278 100755 --- a/ui/v2.5/src/index.scss +++ b/ui/v2.5/src/index.scss @@ -643,3 +643,9 @@ div.dropdown-menu { border-bottom-right-radius: 0; } } + +dl.details-list { + display: grid; + grid-column-gap: 10px; + grid-template-columns: minmax(16.67%, auto) 1fr; +} diff --git a/ui/v2.5/src/utils/field.tsx b/ui/v2.5/src/utils/field.tsx index 7eaad5a12..68c8a8230 100644 --- a/ui/v2.5/src/utils/field.tsx +++ b/ui/v2.5/src/utils/field.tsx @@ -1,49 +1,85 @@ import React from "react"; import { FormattedMessage } from "react-intl"; +import { TruncatedText } from "../components/Shared"; interface ITextField { id?: string; name?: string; + abbr?: string | null; value?: string | null; + truncate?: boolean | null; } -export const TextField: React.FC = ({ id, name, value }) => { - if (!value) { +export const TextField: React.FC = ({ + id, + name, + value, + abbr, + truncate, + children, +}) => { + if (!value && !children) { return null; } + + const message = ( + <>{id ? : name}: + ); + return ( -
    -
    - {id ? : name}: -
    -
    {value ?? undefined}
    -
    + <> +
    {abbr ? {message} : message}
    +
    + {value ? truncate ? : value : children} +
    + ); }; interface IURLField { id?: string; name?: string; + abbr?: string | null; value?: string | null; url?: string | null; + truncate?: boolean | null; } -export const URLField: React.FC = ({ id, name, value, url }) => { - if (!value) { +export const URLField: React.FC = ({ + id, + name, + value, + url, + abbr, + truncate, + children, +}) => { + if (!value && !children) { return null; } + + const message = ( + <>{id ? : name}: + ); + return ( -
    -
    - {id ? : name}: -
    -
    + <> +
    {abbr ? {message} : message}
    +
    {url ? ( - {value} + {value ? ( + truncate ? ( + + ) : ( + value + ) + ) : ( + children + )} ) : undefined}
    -
    + ); }; From 915533b8c5e8695c78c48dd8eda2b3e9d796dd66 Mon Sep 17 00:00:00 2001 From: gitgiggety <79809426+gitgiggety@users.noreply.github.com> Date: Tue, 10 Aug 2021 06:58:14 +0200 Subject: [PATCH 22/51] Create default config directory during setup (#1623) * Create default config directory during setup Instead of creating the config directory during startup, create it during setup when needed. Fixes #1616 --- pkg/manager/manager.go | 9 ++++++++- ui/v2.5/src/components/Changelog/versions/v090.md | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/pkg/manager/manager.go b/pkg/manager/manager.go index 349851cc2..638332619 100644 --- a/pkg/manager/manager.go +++ b/pkg/manager/manager.go @@ -58,7 +58,6 @@ func GetInstance() *singleton { func Initialize() *singleton { once.Do(func() { - _ = utils.EnsureDir(paths.GetStashHomeDirectory()) cfg, err := config.Initialize() if err != nil { @@ -269,6 +268,14 @@ func setSetupDefaults(input *models.SetupInput) { func (s *singleton) Setup(input models.SetupInput) error { setSetupDefaults(&input) + // create the config directory if it does not exist + configDir := filepath.Dir(input.ConfigLocation) + if exists, _ := utils.DirExists(configDir); !exists { + if err := os.Mkdir(configDir, 0755); err != nil { + return fmt.Errorf("abc: %s", err.Error()) + } + } + // create the generated directory if it does not exist if exists, _ := utils.DirExists(input.GeneratedLocation); !exists { if err := os.Mkdir(input.GeneratedLocation, 0755); err != nil { diff --git a/ui/v2.5/src/components/Changelog/versions/v090.md b/ui/v2.5/src/components/Changelog/versions/v090.md index b2157a772..f4f3ea661 100644 --- a/ui/v2.5/src/components/Changelog/versions/v090.md +++ b/ui/v2.5/src/components/Changelog/versions/v090.md @@ -15,6 +15,7 @@ * Added de-DE language option. ([#1578](https://github.com/stashapp/stash/pull/1578)) ### 🐛 Bug fixes +* Create .stash directory in $HOME only if required. ([#1623](https://github.com/stashapp/stash/pull/1623)) * Include stash id when scraping performer from stash-box. ([#1608](https://github.com/stashapp/stash/pull/1608)) * Fix infinity framerate values causing resolver error. ([#1607](https://github.com/stashapp/stash/pull/1607)) * Fix unsetting performer gender not working correctly. ([#1606](https://github.com/stashapp/stash/pull/1606)) From c5e1a3ed72f0d8b70d1b4ab7341264b3c240fc8a Mon Sep 17 00:00:00 2001 From: kermieisinthehouse Date: Tue, 10 Aug 2021 17:13:17 -0700 Subject: [PATCH 23/51] Fix dropdown menus z-index issue (#1628) --- ui/v2.5/src/components/Scenes/styles.scss | 2 +- ui/v2.5/src/index.scss | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/v2.5/src/components/Scenes/styles.scss b/ui/v2.5/src/components/Scenes/styles.scss index b0c500310..b3294d85e 100644 --- a/ui/v2.5/src/components/Scenes/styles.scss +++ b/ui/v2.5/src/components/Scenes/styles.scss @@ -133,7 +133,7 @@ textarea.scene-description { position: absolute; right: 0.7rem; top: 0.7rem; - z-index: 9; + z-index: 8; .image-thumbnail { height: auto; diff --git a/ui/v2.5/src/index.scss b/ui/v2.5/src/index.scss index 3fbad4278..06b563582 100755 --- a/ui/v2.5/src/index.scss +++ b/ui/v2.5/src/index.scss @@ -229,7 +229,7 @@ div.react-select__menu, div.dropdown-menu { background-color: $secondary; color: $text-color; - z-index: 3; + z-index: 16; .react-select__option, .dropdown-item { From 53489106a65836d705dcb2032e267f10a8bad31c Mon Sep 17 00:00:00 2001 From: Still Hsu Date: Wed, 11 Aug 2021 09:26:30 +0900 Subject: [PATCH 24/51] Update zh-tw localization (#1631) * Fill missing zh-tw fields * Replace "Merge" verb hard string with i18n impl --- .../src/components/Tags/TagDetails/Tag.tsx | 5 +- .../Tags/TagDetails/TagMergeDialog.tsx | 5 +- ui/v2.5/src/locales/zh-TW.json | 56 ++++++++++++++++--- 3 files changed, 55 insertions(+), 11 deletions(-) diff --git a/ui/v2.5/src/components/Tags/TagDetails/Tag.tsx b/ui/v2.5/src/components/Tags/TagDetails/Tag.tsx index 923e82393..094dc8f91 100644 --- a/ui/v2.5/src/components/Tags/TagDetails/Tag.tsx +++ b/ui/v2.5/src/components/Tags/TagDetails/Tag.tsx @@ -219,7 +219,10 @@ export const Tag: React.FC = () => { function renderMergeButton() { return ( - Merge... + + + ... + = ({ show={show} header={title} icon={mergeType === "from" ? "sign-in-alt" : "sign-out-alt"} - accept={{ text: "Merge", onClick: () => onMerge() }} + accept={{ + text: intl.formatMessage({ id: "actions.merge" }), + onClick: () => onMerge(), + }} disabled={!canMerge()} cancel={{ variant: "secondary", diff --git a/ui/v2.5/src/locales/zh-TW.json b/ui/v2.5/src/locales/zh-TW.json index 83afac442..935f1ba6e 100644 --- a/ui/v2.5/src/locales/zh-TW.json +++ b/ui/v2.5/src/locales/zh-TW.json @@ -75,7 +75,11 @@ }, "temp_disable": "暫時關閉…", "temp_enable": "暫時啟用…", - "view_random": "隨機開啟" + "view_random": "隨機開啟", + "merge_from": "與其他項目合併", + "save_filter": "儲存過濾條件", + "set_as_default": "設為預設", + "merge_into": "合併至其他項目" }, "actions_name": "動作", "age": "年齡", @@ -118,7 +122,9 @@ "hash_matches": "{hash_type} 符合資料庫中的雜湊值", "match_failed_already_tagged": "短片先前已標記完畢", "match_failed_no_result": "未找到結果", - "match_success": "已成功標記短片" + "match_success": "已成功標記短片", + "duration_off": "片長差至少 {number} 秒", + "duration_unknown": "未知片長" }, "verb_match_fp": "特徵碼辨別", "verb_matched": "符合", @@ -235,7 +241,9 @@ "scrapers": "爬蟲", "search_by_name": "透過名稱搜尋", "supported_types": "支援類型", - "supported_urls": "支援網址" + "supported_urls": "支援網址", + "excluded_tag_patterns_head": "排除符合正則表達式的標籤", + "excluded_tag_patterns_desc": "自爬蟲結果中,排除符合以下正則表達式的標籤" }, "stashbox": { "add_instance": "新增 Stash-box 端點", @@ -342,7 +350,18 @@ "description": "幻燈片功能僅適用於「圖庫」種類下的預覽牆模式", "heading": "幻燈片延遲" }, - "title": "使用者介面" + "title": "使用者介面", + "performers": { + "options": { + "image_location": { + "description": "自訂演員圖像路徑,留空以使用內建預設。", + "heading": "自訂演員圖像路徑" + } + } + } + }, + "plugins": { + "triggers_on": "觸發於" } }, "configuration": "設定", @@ -413,7 +432,12 @@ "scrape_results_existing": "現有資訊", "scrape_results_scraped": "爬取資訊", "set_image_url_title": "圖片連結", - "unsaved_changes": "尚有未保存的更改。你確定要離開嗎?" + "unsaved_changes": "尚有未保存的更改。你確定要離開嗎?", + "merge_tags": { + "source": "來源", + "destination": "目的地" + }, + "overwrite_filter_confirm": "您確定要覆蓋現有的條件 {entityName} 嗎?" }, "dimensions": "解析度", "director": "導演", @@ -498,7 +522,8 @@ "age_context": "這齣戲裡面 {age} {years_old}" }, "stream": "串流連結", - "video_codec": "影片編碼" + "video_codec": "影片編碼", + "phash": "PHash" }, "movie": "電影", "movie_scene_number": "電影短片編號", @@ -538,7 +563,8 @@ "search_filter": { "add_filter": "新增篩選", "name": "篩選", - "update_filter": "更新篩選" + "update_filter": "更新篩選", + "saved_filters": "已儲存的過濾條件" }, "seconds": "秒", "settings": "設定", @@ -560,12 +586,24 @@ "generating_screenshot": "產生截圖中…", "rescanning_entity": "重新掃描{singularEntity}中…", "started_auto_tagging": "已開始自動套用標籤", - "updated_entity": "已更新{entity}" + "updated_entity": "已更新{entity}", + "merged_tags": "已合併的標籤", + "create_entity": "已建立 {entity}", + "default_filter_set": "已設定預設過濾選項", + "saved_entity": "已儲存 {entity}" }, "total": "總計", "up-dir": "往上一層", "updated_at": "更新於", "url": "連結", "weight": "體重", - "years_old": "歲" + "years_old": "歲", + "twitter": "Twitter", + "stash_id": "Stash ID", + "instagram": "Instagram", + "filters": "過濾條件", + "filter": "過濾", + "filter_name": "過濾條件名稱", + "detail": "詳情", + "include_child_studios": "包含子工作室" } From d4d45d5a068625af6fe1a63acc90f99a777f9e1a Mon Sep 17 00:00:00 2001 From: gitgiggety <79809426+gitgiggety@users.noreply.github.com> Date: Wed, 11 Aug 2021 06:44:18 +0200 Subject: [PATCH 25/51] Rebuild Studio page by splitting view and edit (#1629) * Rebuild Studio page by splitting view and edit * Fix parent studio id, open studio link in same tab Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com> --- .../src/components/Changelog/versions/v090.md | 1 + .../GalleryDetails/GalleryScrapeDialog.tsx | 2 +- .../Scenes/SceneDetails/SceneScrapeDialog.tsx | 2 +- ui/v2.5/src/components/Shared/Select.tsx | 2 +- .../Studios/StudioDetails/Studio.tsx | 326 ++++-------------- .../StudioDetails/StudioDetailsPanel.tsx | 59 ++++ .../Studios/StudioDetails/StudioEditPanel.tsx | 305 ++++++++++++++++ ui/v2.5/src/core/StashService.ts | 3 +- ui/v2.5/src/utils/field.tsx | 9 +- 9 files changed, 450 insertions(+), 259 deletions(-) create mode 100644 ui/v2.5/src/components/Studios/StudioDetails/StudioDetailsPanel.tsx create mode 100644 ui/v2.5/src/components/Studios/StudioDetails/StudioEditPanel.tsx diff --git a/ui/v2.5/src/components/Changelog/versions/v090.md b/ui/v2.5/src/components/Changelog/versions/v090.md index f4f3ea661..bdcc977f2 100644 --- a/ui/v2.5/src/components/Changelog/versions/v090.md +++ b/ui/v2.5/src/components/Changelog/versions/v090.md @@ -6,6 +6,7 @@ * Added not equals/greater than/less than modifiers for resolution criteria. ([#1568](https://github.com/stashapp/stash/pull/1568)) ### 🎨 Improvements +* Improve Studio UI. ([#1629](https://github.com/stashapp/stash/pull/1629)) * Improve link styling and ensure links open in a new tab. ([#1622](https://github.com/stashapp/stash/pull/1622)) * Added zh-CN language option. ([#1620](https://github.com/stashapp/stash/pull/1620)) * Moved scraping settings into the Scraping settings page. ([#1548](https://github.com/stashapp/stash/pull/1548)) diff --git a/ui/v2.5/src/components/Galleries/GalleryDetails/GalleryScrapeDialog.tsx b/ui/v2.5/src/components/Galleries/GalleryDetails/GalleryScrapeDialog.tsx index c7ec3e965..701bbe019 100644 --- a/ui/v2.5/src/components/Galleries/GalleryDetails/GalleryScrapeDialog.tsx +++ b/ui/v2.5/src/components/Galleries/GalleryDetails/GalleryScrapeDialog.tsx @@ -259,7 +259,7 @@ export const GalleryScrapeDialog: React.FC = ( new ScrapeResult(props.gallery.details, props.scraped.details) ); - const [createStudio] = useStudioCreate({ name: "" }); + const [createStudio] = useStudioCreate(); const [createPerformer] = usePerformerCreate(); const [createTag] = useTagCreate(); diff --git a/ui/v2.5/src/components/Scenes/SceneDetails/SceneScrapeDialog.tsx b/ui/v2.5/src/components/Scenes/SceneDetails/SceneScrapeDialog.tsx index 221dcc9ad..86989d358 100644 --- a/ui/v2.5/src/components/Scenes/SceneDetails/SceneScrapeDialog.tsx +++ b/ui/v2.5/src/components/Scenes/SceneDetails/SceneScrapeDialog.tsx @@ -321,7 +321,7 @@ export const SceneScrapeDialog: React.FC = ( new ScrapeResult(props.scene.cover_image, props.scraped.image) ); - const [createStudio] = useStudioCreate({ name: "" }); + const [createStudio] = useStudioCreate(); const [createPerformer] = usePerformerCreate(); const [createMovie] = useMovieCreate(); const [createTag] = useTagCreate(); diff --git a/ui/v2.5/src/components/Shared/Select.tsx b/ui/v2.5/src/components/Shared/Select.tsx index c8f3d456c..22f89cf4a 100644 --- a/ui/v2.5/src/components/Shared/Select.tsx +++ b/ui/v2.5/src/components/Shared/Select.tsx @@ -428,7 +428,7 @@ export const StudioSelect: React.FC< IFilterProps & { excludeIds?: string[] } > = (props) => { const { data, loading } = useAllStudiosForFilter(); - const [createStudio] = useStudioCreate({ name: "" }); + const [createStudio] = useStudioCreate(); const exclude = props.excludeIds ?? []; const studios = (data?.allStudios ?? []).filter( diff --git a/ui/v2.5/src/components/Studios/StudioDetails/Studio.tsx b/ui/v2.5/src/components/Studios/StudioDetails/Studio.tsx index c6042eb0d..aaeb8ff4b 100644 --- a/ui/v2.5/src/components/Studios/StudioDetails/Studio.tsx +++ b/ui/v2.5/src/components/Studios/StudioDetails/Studio.tsx @@ -1,6 +1,6 @@ -import { Button, Table, Tabs, Tab } from "react-bootstrap"; +import { Tabs, Tab } from "react-bootstrap"; import React, { useEffect, useState } from "react"; -import { useParams, useHistory, Link } from "react-router-dom"; +import { useParams, useHistory } from "react-router-dom"; import { FormattedMessage, useIntl } from "react-intl"; import cx from "classnames"; import Mousetrap from "mousetrap"; @@ -13,21 +13,21 @@ import { useStudioDestroy, mutateMetadataAutoTag, } from "src/core/StashService"; -import { ImageUtils, TableUtils } from "src/utils"; +import { ImageUtils } from "src/utils"; import { - Icon, DetailsEditNavbar, Modal, LoadingIndicator, - StudioSelect, + ErrorMessage, } from "src/components/Shared"; import { useToast } from "src/hooks"; -import { RatingStars } from "src/components/Scenes/SceneDetails/RatingStars"; import { StudioScenesPanel } from "./StudioScenesPanel"; import { StudioGalleriesPanel } from "./StudioGalleriesPanel"; import { StudioImagesPanel } from "./StudioImagesPanel"; import { StudioChildrenPanel } from "./StudioChildrenPanel"; import { StudioPerformersPanel } from "./StudioPerformersPanel"; +import { StudioEditPanel } from "./StudioEditPanel"; +import { StudioDetailsPanel } from "./StudioDetailsPanel"; interface IStudioParams { id?: string; @@ -45,83 +45,23 @@ export const Studio: React.FC = () => { const [isEditing, setIsEditing] = useState(isNew); const [isDeleteAlertOpen, setIsDeleteAlertOpen] = useState(false); - // Editing studio state - const [image, setImage] = useState(); - const [name, setName] = useState(); - const [url, setUrl] = useState(); - const [parentStudioId, setParentStudioId] = useState(); - const [rating, setRating] = useState(undefined); - const [details, setDetails] = useState(); - const [stashIDs, setStashIDs] = useState([]); - // Studio state - const [studio, setStudio] = useState>({}); - const [imagePreview, setImagePreview] = useState(); + const [image, setImage] = useState(); - const { data, error, loading } = useFindStudio(id); + const { data, error } = useFindStudio(id); + const studio = data?.findStudio; + + const [isLoading, setIsLoading] = useState(false); const [updateStudio] = useStudioUpdate(); - const [createStudio] = useStudioCreate( - getStudioInput() as GQL.StudioCreateInput - ); - const [deleteStudio] = useStudioDestroy( - getStudioInput() as GQL.StudioDestroyInput - ); - - function updateStudioEditState(state: Partial) { - setName(state.name); - setUrl(state.url ?? undefined); - setParentStudioId(state?.parent_studio?.id ?? undefined); - setRating(state.rating ?? undefined); - setDetails(state.details ?? undefined); - setStashIDs(state.stash_ids ?? []); - } - - function updateStudioData(studioData: Partial) { - setImage(undefined); - updateStudioEditState(studioData); - setImagePreview(studioData.image_path ?? undefined); - setStudio(studioData); - setRating(studioData.rating ?? undefined); - } + const [createStudio] = useStudioCreate(); + const [deleteStudio] = useStudioDestroy({ id }); // set up hotkeys useEffect(() => { - if (isEditing) { - Mousetrap.bind("s s", () => onSave()); - } - Mousetrap.bind("e", () => setIsEditing(true)); Mousetrap.bind("d d", () => onDelete()); - // numeric keypresses get caught by jwplayer, so blur the element - // if the rating sequence is started - Mousetrap.bind("r", () => { - if (document.activeElement instanceof HTMLElement) { - document.activeElement.blur(); - } - - Mousetrap.bind("0", () => setRating(NaN)); - Mousetrap.bind("1", () => setRating(1)); - Mousetrap.bind("2", () => setRating(2)); - Mousetrap.bind("3", () => setRating(3)); - Mousetrap.bind("4", () => setRating(4)); - Mousetrap.bind("5", () => setRating(5)); - - setTimeout(() => { - Mousetrap.unbind("0"); - Mousetrap.unbind("1"); - Mousetrap.unbind("2"); - Mousetrap.unbind("3"); - Mousetrap.unbind("4"); - Mousetrap.unbind("5"); - }, 1000); - }); - return () => { - if (isEditing) { - Mousetrap.unbind("s s"); - } - Mousetrap.unbind("e"); Mousetrap.unbind("d d"); }; @@ -130,58 +70,36 @@ export const Studio: React.FC = () => { useEffect(() => { if (data && data.findStudio) { setImage(undefined); - updateStudioEditState(data.findStudio); - setImagePreview(data.findStudio.image_path ?? undefined); - setStudio(data.findStudio); } }, [data]); function onImageLoad(imageData: string) { - setImagePreview(imageData); setImage(imageData); } const imageEncoding = ImageUtils.usePasteImage(onImageLoad, isEditing); - if (!isNew && !isEditing) { - if (!data?.findStudio || loading || !studio.id) return ; - if (error) return
    {error.message}
    ; - } - - function getStudioInput() { - const input: Partial = { - name, - url, - image, - details, - parent_id: parentStudioId ?? null, - rating: rating ?? null, - stash_ids: stashIDs.map((s) => ({ - stash_id: s.stash_id, - endpoint: s.endpoint, - })), - }; - - if (!isNew) { - (input as GQL.StudioUpdateInput).id = id; - } - return input; - } - - async function onSave() { + async function onSave( + input: Partial + ) { try { + setIsLoading(true); + if (!isNew) { const result = await updateStudio({ variables: { - input: getStudioInput() as GQL.StudioUpdateInput, + input: input as GQL.StudioUpdateInput, }, }); if (result.data?.studioUpdate) { - updateStudioData(result.data.studioUpdate); setIsEditing(false); } } else { - const result = await createStudio(); + const result = await createStudio({ + variables: { + input: input as GQL.StudioCreateInput, + }, + }); if (result.data?.studioCreate?.id) { history.push(`/studios/${result.data.studioCreate.id}`); setIsEditing(false); @@ -189,11 +107,13 @@ export const Studio: React.FC = () => { } } catch (e) { Toast.error(e); + } finally { + setIsLoading(false); } } async function onAutoTag() { - if (!studio.id) return; + if (!studio?.id) return; try { await mutateMetadataAutoTag({ studios: [studio.id] }); Toast.success({ @@ -215,19 +135,6 @@ export const Studio: React.FC = () => { history.push(`/studios`); } - const removeStashID = (stashID: GQL.StashIdInput) => { - setStashIDs( - stashIDs.filter( - (s) => - !(s.endpoint === stashID.endpoint && s.stash_id === stashID.stash_id) - ) - ); - }; - - function onImageChangeHandler(event: React.FormEvent) { - ImageUtils.onImageChange(event, onImageLoad); - } - function renderDeleteAlert() { return ( { id="dialogs.delete_confirm" values={{ entityName: - name ?? + studio?.name ?? intl.formatMessage({ id: "studio" }).toLocaleLowerCase(), }} /> @@ -254,64 +161,25 @@ export const Studio: React.FC = () => { ); } - function renderStashIDs() { - if (!studio.stash_ids?.length) { - return; - } - - return ( - - StashIDs - -
      - {stashIDs.map((stashID) => { - const base = stashID.endpoint.match(/https?:\/\/.*?\//)?.[0]; - const link = base ? ( - - {stashID.stash_id} - - ) : ( - stashID.stash_id - ); - return ( -
    • - {isEditing && ( - - )} - {link} -
    • - ); - })} -
    - - - ); - } - function onToggleEdit() { setIsEditing(!isEditing); - updateStudioData(studio); } - function onClearImage() { - setImage(null); - setImagePreview( - studio.image_path ? `${studio.image_path}&default=true` : undefined - ); + function renderImage() { + let studioImage = studio?.image_path; + if (isEditing) { + if (image === null) { + studioImage = `${studioImage}&default=true`; + } else if (image) { + studioImage = image; + } + } + + if (studioImage) { + return ( + {studio?.name + ); + } } const activeTabKey = @@ -328,28 +196,10 @@ export const Studio: React.FC = () => { } }; - function renderStudio() { - if (isEditing || !parentStudioId) { - return ( - - setParentStudioId(items.length > 0 ? items[0]?.id : undefined) - } - ids={parentStudioId ? [parentStudioId] : []} - isDisabled={!isEditing} - excludeIds={studio.id ? [studio.id] : []} - /> - ); - } - - if (studio.parent_studio) { - return ( - - {studio.parent_studio.name} - - ); - } - } + if (isLoading) return ; + if (error) return ; + if (!studio?.id && !isNew) + return ; return (
    @@ -370,66 +220,36 @@ export const Studio: React.FC = () => {
    {imageEncoding ? ( - ) : imagePreview ? ( - {name} ) : ( - "" + renderImage() )}
    - - - {TableUtils.renderInputGroup({ - title: intl.formatMessage({ id: "name" }), - value: name ?? "", - isEditing: !!isEditing, - onChange: setName, - })} - {TableUtils.renderInputGroup({ - title: intl.formatMessage({ id: "url" }), - value: url, - isEditing: !!isEditing, - onChange: setUrl, - })} - {TableUtils.renderTextArea({ - title: intl.formatMessage({ id: "details" }), - value: details, - isEditing: !!isEditing, - onChange: setDetails, - })} - - - - - - - - - {renderStashIDs()} - -
    {intl.formatMessage({ id: "parent_studios" })}{renderStudio()}
    {intl.formatMessage({ id: "rating" })}: - setRating(value ?? NaN)} - /> -
    - { - onClearImage(); - }} - onAutoTag={onAutoTag} - onDelete={onDelete} - acceptSVG - /> + {!isEditing && !isNew && studio ? ( + <> + + {}} + onImageChange={() => {}} + onClearImage={() => {}} + onAutoTag={onAutoTag} + onDelete={onDelete} + /> + + ) : ( + )} + onSubmit={onSave} + onCancel={onToggleEdit} + onDelete={onDelete} + onImageChange={setImage} + /> + )}
    - {!isNew && ( + {studio?.id && (
    ; +} + +export const StudioDetailsPanel: React.FC = ({ + studio, +}) => { + const intl = useIntl(); + + function renderRatingField() { + if (!studio.rating) { + return; + } + + return ( + <> +
    {intl.formatMessage({ id: "rating" })}
    +
    + +
    + + ); + } + + return ( +
    +
    +

    {studio.name}

    +
    + +
    + + + + + + + {renderRatingField()} +
    +
    + ); +}; diff --git a/ui/v2.5/src/components/Studios/StudioDetails/StudioEditPanel.tsx b/ui/v2.5/src/components/Studios/StudioDetails/StudioEditPanel.tsx new file mode 100644 index 000000000..e1222ac58 --- /dev/null +++ b/ui/v2.5/src/components/Studios/StudioDetails/StudioEditPanel.tsx @@ -0,0 +1,305 @@ +import React, { useEffect } from "react"; +import { useIntl } from "react-intl"; +import * as GQL from "src/core/generated-graphql"; +import * as yup from "yup"; +import Mousetrap from "mousetrap"; +import { Icon, StudioSelect, DetailsEditNavbar } from "src/components/Shared"; +import { Button, Form, Col, Row } from "react-bootstrap"; +import { FormUtils, ImageUtils } from "src/utils"; +import { RatingStars } from "src/components/Scenes/SceneDetails/RatingStars"; +import { useFormik } from "formik"; +import { Prompt } from "react-router-dom"; + +interface IStudioEditPanel { + studio: Partial; + onSubmit: ( + studio: Partial + ) => void; + onCancel: () => void; + onDelete: () => void; + onImageChange?: (image?: string | null) => void; + onImageEncoding?: (loading?: boolean) => void; +} + +export const StudioEditPanel: React.FC = ({ + studio, + onSubmit, + onCancel, + onDelete, + onImageChange, + onImageEncoding, +}) => { + const intl = useIntl(); + + const isNew = !studio || !studio.id; + + const imageEncoding = ImageUtils.usePasteImage(onImageLoad, true); + + const schema = yup.object({ + name: yup.string().required(), + url: yup.string().optional().nullable(), + details: yup.string().optional().nullable(), + image: yup.string().optional().nullable(), + rating: yup.number().optional().nullable(), + parent_id: yup.string().optional().nullable(), + stash_ids: yup.mixed().optional().nullable(), + }); + + const initialValues = { + name: studio.name ?? "", + url: studio.url ?? "", + details: studio.details ?? "", + image: undefined, + rating: studio.rating ?? null, + parent_id: studio.parent_studio?.id, + stash_ids: studio.stash_ids ?? undefined, + }; + + type InputValues = typeof initialValues; + + const formik = useFormik({ + initialValues, + validationSchema: schema, + onSubmit: (values) => onSubmit(getStudioInput(values)), + }); + + function setRating(v: number) { + formik.setFieldValue("rating", v); + } + + function onImageLoad(imageData: string) { + formik.setFieldValue("image", imageData); + } + + function getStudioInput(values: InputValues) { + const input: Partial = { + ...values, + }; + + if (studio && studio.id) { + (input as GQL.StudioUpdateInput).id = studio.id; + } + return input; + } + + // set up hotkeys + useEffect(() => { + Mousetrap.bind("s s", () => formik.handleSubmit()); + + // numeric keypresses get caught by jwplayer, so blur the element + // if the rating sequence is started + Mousetrap.bind("r", () => { + if (document.activeElement instanceof HTMLElement) { + document.activeElement.blur(); + } + + Mousetrap.bind("0", () => setRating(NaN)); + Mousetrap.bind("1", () => setRating(1)); + Mousetrap.bind("2", () => setRating(2)); + Mousetrap.bind("3", () => setRating(3)); + Mousetrap.bind("4", () => setRating(4)); + Mousetrap.bind("5", () => setRating(5)); + + setTimeout(() => { + Mousetrap.unbind("0"); + Mousetrap.unbind("1"); + Mousetrap.unbind("2"); + Mousetrap.unbind("3"); + Mousetrap.unbind("4"); + Mousetrap.unbind("5"); + }, 1000); + }); + + return () => { + Mousetrap.unbind("s s"); + + Mousetrap.unbind("e"); + }; + }); + + useEffect(() => { + if (onImageChange) { + onImageChange(formik.values.image); + } + return () => onImageChange?.(); + }, [formik.values.image, onImageChange]); + + useEffect(() => onImageEncoding?.(imageEncoding), [ + onImageEncoding, + imageEncoding, + ]); + + function onImageChangeHandler(event: React.FormEvent) { + ImageUtils.onImageChange(event, onImageLoad); + } + + function onImageChangeURL(url: string) { + formik.setFieldValue("image", url); + } + + const removeStashID = (stashID: GQL.StashIdInput) => { + formik.setFieldValue( + "stash_ids", + (formik.values.stash_ids ?? []).filter( + (s) => + !(s.endpoint === stashID.endpoint && s.stash_id === stashID.stash_id) + ) + ); + }; + + function renderStashIDs() { + if (!formik.values.stash_ids?.length) { + return; + } + + return ( + + StashIDs + +
      + {formik.values.stash_ids.map((stashID) => { + const base = stashID.endpoint.match(/https?:\/\/.*?\//)?.[0]; + const link = base ? ( + + {stashID.stash_id} + + ) : ( + stashID.stash_id + ); + return ( +
    • + + {link} +
    • + ); + })} +
    + +
    + ); + } + + return ( + <> + + +
    + + {FormUtils.renderLabel({ + title: intl.formatMessage({ id: "name" }), + })} + + + + {formik.errors.name} + + + + + + {FormUtils.renderLabel({ + title: intl.formatMessage({ id: "url" }), + })} + + + + {formik.errors.url} + + + + + + {FormUtils.renderLabel({ + title: intl.formatMessage({ id: "details" }), + })} + + + + {formik.errors.details} + + + + + + {FormUtils.renderLabel({ + title: intl.formatMessage({ id: "parent_studios" }), + })} + + + formik.setFieldValue( + "parent_id", + items.length > 0 ? items[0]?.id : null + ) + } + ids={formik.values.parent_id ? [formik.values.parent_id] : []} + excludeIds={studio.id ? [studio.id] : []} + /> + + + + + {FormUtils.renderLabel({ + title: intl.formatMessage({ id: "rating" }), + })} + + + formik.setFieldValue("rating", value ?? null) + } + /> + + + + {renderStashIDs()} +
    + + formik.handleSubmit()} + saveDisabled={!formik.dirty} + onImageChange={onImageChangeHandler} + onImageChangeURL={onImageChangeURL} + onClearImage={() => { + formik.setFieldValue("image", null); + }} + onDelete={onDelete} + acceptSVG + /> + + ); +}; diff --git a/ui/v2.5/src/core/StashService.ts b/ui/v2.5/src/core/StashService.ts index 44fc90b10..1762a6ff9 100644 --- a/ui/v2.5/src/core/StashService.ts +++ b/ui/v2.5/src/core/StashService.ts @@ -598,9 +598,8 @@ export const studioMutationImpactedQueries = [ GQL.AllStudiosForFilterDocument, ]; -export const useStudioCreate = (input: GQL.StudioCreateInput) => +export const useStudioCreate = () => GQL.useStudioCreateMutation({ - variables: { input }, refetchQueries: getQueryNames([GQL.AllStudiosForFilterDocument]), update: deleteCache([ GQL.FindStudiosDocument, diff --git a/ui/v2.5/src/utils/field.tsx b/ui/v2.5/src/utils/field.tsx index 68c8a8230..a22b042cc 100644 --- a/ui/v2.5/src/utils/field.tsx +++ b/ui/v2.5/src/utils/field.tsx @@ -43,6 +43,9 @@ interface IURLField { value?: string | null; url?: string | null; truncate?: boolean | null; + target?: string; + // use for internal links + trusted?: boolean; } export const URLField: React.FC = ({ @@ -53,6 +56,8 @@ export const URLField: React.FC = ({ abbr, truncate, children, + target, + trusted, }) => { if (!value && !children) { return null; @@ -62,12 +67,14 @@ export const URLField: React.FC = ({ <>{id ? : name}: ); + const rel = !trusted ? "noopener noreferrer" : undefined; + return ( <>
    {abbr ? {message} : message}
    {url ? ( - + {value ? ( truncate ? ( From 59c6fe046d0fe56fbb6df10791aa90f3bae82a27 Mon Sep 17 00:00:00 2001 From: WithoutPants <53250216+WithoutPants@users.noreply.github.com> Date: Wed, 11 Aug 2021 15:54:29 +1000 Subject: [PATCH 26/51] Fix scrape dialog not showing when scraping url (#1632) --- .../Performers/PerformerDetails/PerformerEditPanel.tsx | 2 +- .../Performers/PerformerDetails/PerformerScrapeDialog.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/v2.5/src/components/Performers/PerformerDetails/PerformerEditPanel.tsx b/ui/v2.5/src/components/Performers/PerformerDetails/PerformerEditPanel.tsx index 17480cf84..cc377d3d4 100644 --- a/ui/v2.5/src/components/Performers/PerformerDetails/PerformerEditPanel.tsx +++ b/ui/v2.5/src/components/Performers/PerformerDetails/PerformerEditPanel.tsx @@ -669,7 +669,7 @@ export const PerformerEditPanel: React.FC = ({ } function maybeRenderScrapeDialog() { - if (!scrapedPerformer || !scraper) { + if (!scrapedPerformer) { return; } diff --git a/ui/v2.5/src/components/Performers/PerformerDetails/PerformerScrapeDialog.tsx b/ui/v2.5/src/components/Performers/PerformerDetails/PerformerScrapeDialog.tsx index fd90cf433..2a48fca8c 100644 --- a/ui/v2.5/src/components/Performers/PerformerDetails/PerformerScrapeDialog.tsx +++ b/ui/v2.5/src/components/Performers/PerformerDetails/PerformerScrapeDialog.tsx @@ -130,7 +130,7 @@ export const PerformerScrapeDialog: React.FC = ( ) => { const intl = useIntl(); - const endpoint = (props.scraper as IStashBox).endpoint ?? undefined; + const endpoint = (props.scraper as IStashBox)?.endpoint ?? undefined; function getCurrentRemoteSiteID() { if (!endpoint) { From c29d8b547d90c8650f6c217c82a4c65988f8ad30 Mon Sep 17 00:00:00 2001 From: WithoutPants <53250216+WithoutPants@users.noreply.github.com> Date: Wed, 11 Aug 2021 16:08:10 +1000 Subject: [PATCH 27/51] Overwrite phash during generate if flag set (#1633) --- pkg/manager/manager_tasks.go | 1 + pkg/manager/task_generate_phash.go | 3 ++- ui/v2.5/src/components/Changelog/versions/v090.md | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/manager/manager_tasks.go b/pkg/manager/manager_tasks.go index abe8f7560..6173c30ed 100644 --- a/pkg/manager/manager_tasks.go +++ b/pkg/manager/manager_tasks.go @@ -322,6 +322,7 @@ func (s *singleton) Generate(ctx context.Context, input models.GenerateMetadataI Scene: *scene, fileNamingAlgorithm: fileNamingAlgo, txnManager: s.TxnManager, + Overwrite: overwrite, } wg.Add() go progress.ExecuteTask(fmt.Sprintf("Generating phash for %s", scene.Path), func() { diff --git a/pkg/manager/task_generate_phash.go b/pkg/manager/task_generate_phash.go index f8ef6d6be..0c1578ee5 100644 --- a/pkg/manager/task_generate_phash.go +++ b/pkg/manager/task_generate_phash.go @@ -13,6 +13,7 @@ import ( type GeneratePhashTask struct { Scene models.Scene + Overwrite bool fileNamingAlgorithm models.HashAlgorithm txnManager models.TransactionManager } @@ -58,5 +59,5 @@ func (t *GeneratePhashTask) Start(wg *sizedwaitgroup.SizedWaitGroup) { } func (t *GeneratePhashTask) shouldGenerate() bool { - return !t.Scene.Phash.Valid + return t.Overwrite || !t.Scene.Phash.Valid } diff --git a/ui/v2.5/src/components/Changelog/versions/v090.md b/ui/v2.5/src/components/Changelog/versions/v090.md index bdcc977f2..b4df3221f 100644 --- a/ui/v2.5/src/components/Changelog/versions/v090.md +++ b/ui/v2.5/src/components/Changelog/versions/v090.md @@ -16,6 +16,7 @@ * Added de-DE language option. ([#1578](https://github.com/stashapp/stash/pull/1578)) ### 🐛 Bug fixes +* Regenerate scene phash if overwrite flag is set. ([#1633](https://github.com/stashapp/stash/pull/1633)) * Create .stash directory in $HOME only if required. ([#1623](https://github.com/stashapp/stash/pull/1623)) * Include stash id when scraping performer from stash-box. ([#1608](https://github.com/stashapp/stash/pull/1608)) * Fix infinity framerate values causing resolver error. ([#1607](https://github.com/stashapp/stash/pull/1607)) From 7cb3d05535f209dee97e46fdc4d9f794331135dd Mon Sep 17 00:00:00 2001 From: gitgiggety <79809426+gitgiggety@users.noreply.github.com> Date: Thu, 12 Aug 2021 02:24:16 +0200 Subject: [PATCH 28/51] Add (not) between modifiers for number criterion (#1559) * Add (not) between modifiers for number criterion * Extract list filters into dedicated components Extract the filters from the AddFiltersDialog into custom components. This allows for further refactorring where components will be bound to criterions. * Add placeholders to number and duration criterions * Add backwards compatibility for saved filters Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com> --- graphql/schema/types/filters.graphql | 5 + pkg/sqlite/filter.go | 17 +- pkg/sqlite/performer.go | 43 +--- pkg/sqlite/query.go | 13 +- pkg/sqlite/scene.go | 32 +-- pkg/sqlite/sql.go | 35 +++- pkg/sqlite/tag.go | 35 +--- .../src/components/Changelog/versions/v090.md | 1 + .../src/components/List/AddFilterDialog.tsx | 186 ++++-------------- .../List/Filters/DurationFilter.tsx | 94 +++++++++ .../Filters/HierarchicalLabelValueFilter.tsx | 91 +++++++++ .../components/List/Filters/InputFilter.tsx | 31 +++ .../List/Filters/LabeledIdFilter.tsx | 46 +++++ .../components/List/Filters/NumberFilter.tsx | 114 +++++++++++ .../components/List/Filters/OptionsFilter.tsx | 48 +++++ .../src/components/Shared/DurationInput.tsx | 9 +- ui/v2.5/src/locales/en-GB.json | 9 +- .../models/list-filter/criteria/criterion.ts | 80 +++++++- ui/v2.5/src/models/list-filter/types.ts | 12 ++ 19 files changed, 623 insertions(+), 278 deletions(-) create mode 100644 ui/v2.5/src/components/List/Filters/DurationFilter.tsx create mode 100644 ui/v2.5/src/components/List/Filters/HierarchicalLabelValueFilter.tsx create mode 100644 ui/v2.5/src/components/List/Filters/InputFilter.tsx create mode 100644 ui/v2.5/src/components/List/Filters/LabeledIdFilter.tsx create mode 100644 ui/v2.5/src/components/List/Filters/NumberFilter.tsx create mode 100644 ui/v2.5/src/components/List/Filters/OptionsFilter.tsx diff --git a/graphql/schema/types/filters.graphql b/graphql/schema/types/filters.graphql index 06187a81f..989b95863 100644 --- a/graphql/schema/types/filters.graphql +++ b/graphql/schema/types/filters.graphql @@ -327,6 +327,10 @@ enum CriterionModifier { MATCHES_REGEX, """NOT MATCHES REGEX""" NOT_MATCHES_REGEX, + """>= AND <=""" + BETWEEN, + """< OR >""" + NOT_BETWEEN, } input StringCriterionInput { @@ -336,6 +340,7 @@ input StringCriterionInput { input IntCriterionInput { value: Int! + value2: Int modifier: CriterionModifier! } diff --git a/pkg/sqlite/filter.go b/pkg/sqlite/filter.go index 1f1f6c13d..cb8e56e97 100644 --- a/pkg/sqlite/filter.go +++ b/pkg/sqlite/filter.go @@ -368,13 +368,8 @@ func stringCriterionHandler(c *models.StringCriterionInput, column string) crite func intCriterionHandler(c *models.IntCriterionInput, column string) criterionHandlerFunc { return func(f *filterBuilder) { if c != nil { - clause, count := getIntCriterionWhereClause(column, *c) - - if count == 1 { - f.addWhere(clause, c.Value) - } else { - f.addWhere(clause) - } + clause, args := getIntCriterionWhereClause(column, *c) + f.addWhere(clause, args...) } } } @@ -495,13 +490,9 @@ type countCriterionHandlerBuilder struct { func (m *countCriterionHandlerBuilder) handler(criterion *models.IntCriterionInput) criterionHandlerFunc { return func(f *filterBuilder) { if criterion != nil { - clause, count := getCountCriterionClause(m.primaryTable, m.joinTable, m.primaryFK, *criterion) + clause, args := getCountCriterionClause(m.primaryTable, m.joinTable, m.primaryFK, *criterion) - if count == 1 { - f.addWhere(clause, criterion.Value) - } else { - f.addWhere(clause) - } + f.addWhere(clause, args...) } } } diff --git a/pkg/sqlite/performer.go b/pkg/sqlite/performer.go index fbe33eb62..4c7c4697a 100644 --- a/pkg/sqlite/performer.go +++ b/pkg/sqlite/performer.go @@ -3,7 +3,6 @@ package sqlite import ( "database/sql" "fmt" - "strconv" "strings" "github.com/stashapp/stash/pkg/models" @@ -356,25 +355,8 @@ func performerIsMissingCriterionHandler(qb *performerQueryBuilder, isMissing *st func yearFilterCriterionHandler(year *models.IntCriterionInput, col string) criterionHandlerFunc { return func(f *filterBuilder) { if year != nil && year.Modifier.IsValid() { - yearStr := strconv.Itoa(year.Value) - startOfYear := yearStr + "-01-01" - endOfYear := yearStr + "-12-31" - - switch year.Modifier { - case models.CriterionModifierEquals: - // between yyyy-01-01 and yyyy-12-31 - f.addWhere(col+" >= ?", startOfYear) - f.addWhere(col+" <= ?", endOfYear) - case models.CriterionModifierNotEquals: - // outside of yyyy-01-01 to yyyy-12-31 - f.addWhere(col+" < ? OR "+col+" > ?", startOfYear, endOfYear) - case models.CriterionModifierGreaterThan: - // > yyyy-12-31 - f.addWhere(col+" > ?", endOfYear) - case models.CriterionModifierLessThan: - // < yyyy-01-01 - f.addWhere(col+" < ?", startOfYear) - } + clause, args := getIntCriterionWhereClause("cast(strftime('%Y', "+col+") as int)", *year) + f.addWhere(clause, args...) } } } @@ -382,22 +364,11 @@ func yearFilterCriterionHandler(year *models.IntCriterionInput, col string) crit func performerAgeFilterCriterionHandler(age *models.IntCriterionInput) criterionHandlerFunc { return func(f *filterBuilder) { if age != nil && age.Modifier.IsValid() { - var op string - - switch age.Modifier { - case models.CriterionModifierEquals: - op = "==" - case models.CriterionModifierNotEquals: - op = "!=" - case models.CriterionModifierGreaterThan: - op = ">" - case models.CriterionModifierLessThan: - op = "<" - } - - if op != "" { - f.addWhere("cast(IFNULL(strftime('%Y.%m%d', performers.death_date), strftime('%Y.%m%d', 'now')) - strftime('%Y.%m%d', performers.birthdate) as int) "+op+" ?", age.Value) - } + clause, args := getIntCriterionWhereClause( + "cast(IFNULL(strftime('%Y.%m%d', performers.death_date), strftime('%Y.%m%d', 'now')) - strftime('%Y.%m%d', performers.birthdate) as int)", + *age, + ) + f.addWhere(clause, args...) } } } diff --git a/pkg/sqlite/query.go b/pkg/sqlite/query.go index 60b594f14..2d31ee583 100644 --- a/pkg/sqlite/query.go +++ b/pkg/sqlite/query.go @@ -135,11 +135,9 @@ func (qb *queryBuilder) addFilter(f *filterBuilder) { func (qb *queryBuilder) handleIntCriterionInput(c *models.IntCriterionInput, column string) { if c != nil { - clause, count := getIntCriterionWhereClause(column, *c) + clause, args := getIntCriterionWhereClause(column, *c) qb.addWhere(clause) - if count == 1 { - qb.addArg(c.Value) - } + qb.addArg(args...) } } @@ -192,12 +190,9 @@ func (qb *queryBuilder) handleStringCriterionInput(c *models.StringCriterionInpu func (qb *queryBuilder) handleCountCriterion(countFilter *models.IntCriterionInput, primaryTable, joinTable, primaryFK string) { if countFilter != nil { - clause, count := getCountCriterionClause(primaryTable, joinTable, primaryFK, *countFilter) - - if count == 1 { - qb.addArg(countFilter.Value) - } + clause, args := getCountCriterionClause(primaryTable, joinTable, primaryFK, *countFilter) qb.addWhere(clause) + qb.addArg(args...) } } diff --git a/pkg/sqlite/scene.go b/pkg/sqlite/scene.go index 2c34936a0..fbbaaeb3c 100644 --- a/pkg/sqlite/scene.go +++ b/pkg/sqlite/scene.go @@ -461,40 +461,12 @@ func phashCriterionHandler(phashFilter *models.StringCriterionInput) criterionHa func durationCriterionHandler(durationFilter *models.IntCriterionInput, column string) criterionHandlerFunc { return func(f *filterBuilder) { if durationFilter != nil { - clause, thisArgs := getDurationWhereClause(*durationFilter, column) - f.addWhere(clause, thisArgs...) + clause, args := getIntCriterionWhereClause("cast("+column+" as int)", *durationFilter) + f.addWhere(clause, args...) } } } -func getDurationWhereClause(durationFilter models.IntCriterionInput, column string) (string, []interface{}) { - // special case for duration. We accept duration as seconds as int but the - // field is floating point. Change the equals filter to return a range - // between x and x + 1 - // likewise, not equals needs to be duration < x OR duration >= x - var clause string - args := []interface{}{} - - value := durationFilter.Value - if durationFilter.Modifier == models.CriterionModifierEquals { - clause = fmt.Sprintf("%[1]s >= ? AND %[1]s < ?", column) - args = append(args, value) - args = append(args, value+1) - } else if durationFilter.Modifier == models.CriterionModifierNotEquals { - clause = fmt.Sprintf("(%[1]s < ? OR %[1]s >= ?)", column) - args = append(args, value) - args = append(args, value+1) - } else { - var count int - clause, count = getIntCriterionWhereClause(column, durationFilter) - if count == 1 { - args = append(args, value) - } - } - - return clause, args -} - func resolutionCriterionHandler(resolution *models.ResolutionCriterionInput, heightColumn string, widthColumn string) criterionHandlerFunc { return func(f *filterBuilder) { if resolution != nil && resolution.Value.IsValid() { diff --git a/pkg/sqlite/sql.go b/pkg/sqlite/sql.go index b683e1a07..b3bcdd514 100644 --- a/pkg/sqlite/sql.go +++ b/pkg/sqlite/sql.go @@ -160,7 +160,7 @@ func getCriterionModifierBinding(criterionModifier models.CriterionModifier, val } if modifier := criterionModifier.String(); criterionModifier.IsValid() { switch modifier { - case "EQUALS", "NOT_EQUALS", "GREATER_THAN", "LESS_THAN", "IS_NULL", "NOT_NULL": + case "EQUALS", "NOT_EQUALS", "GREATER_THAN", "LESS_THAN", "IS_NULL", "NOT_NULL", "BETWEEN", "NOT_BETWEEN": return getSimpleCriterionClause(criterionModifier, "?") case "INCLUDES": return "IN " + getInBinding(length), length // TODO? @@ -189,6 +189,10 @@ func getSimpleCriterionClause(criterionModifier models.CriterionModifier, rhs st return "IS NULL", 0 case "NOT_NULL": return "IS NOT NULL", 0 + case "BETWEEN": + return "BETWEEN (" + rhs + ") AND (" + rhs + ")", 2 + case "NOT_BETWEEN": + return "NOT BETWEEN (" + rhs + ") AND (" + rhs + ")", 2 default: logger.Errorf("todo") return "= ?", 1 // TODO @@ -198,9 +202,30 @@ func getSimpleCriterionClause(criterionModifier models.CriterionModifier, rhs st return "= ?", 1 // TODO } -func getIntCriterionWhereClause(column string, input models.IntCriterionInput) (string, int) { - binding, count := getCriterionModifierBinding(input.Modifier, input.Value) - return column + " " + binding, count +func getIntCriterionWhereClause(column string, input models.IntCriterionInput) (string, []interface{}) { + binding, _ := getSimpleCriterionClause(input.Modifier, "?") + var args []interface{} + + switch input.Modifier { + case "EQUALS", "NOT_EQUALS": + args = []interface{}{input.Value} + break + case "LESS_THAN": + args = []interface{}{input.Value} + break + case "GREATER_THAN": + args = []interface{}{input.Value} + break + case "BETWEEN", "NOT_BETWEEN": + upper := 0 + if input.Value2 != nil { + upper = *input.Value2 + } + args = []interface{}{input.Value, upper} + break + } + + return column + " " + binding, args } // returns where clause and having clause @@ -226,7 +251,7 @@ func getMultiCriterionClause(primaryTable, foreignTable, joinTable, primaryFK, f return whereClause, havingClause } -func getCountCriterionClause(primaryTable, joinTable, primaryFK string, criterion models.IntCriterionInput) (string, int) { +func getCountCriterionClause(primaryTable, joinTable, primaryFK string, criterion models.IntCriterionInput) (string, []interface{}) { lhs := fmt.Sprintf("(SELECT COUNT(*) FROM %s s WHERE s.%s = %s.id)", joinTable, primaryFK, primaryTable) return getIntCriterionWhereClause(lhs, criterion) } diff --git a/pkg/sqlite/tag.go b/pkg/sqlite/tag.go index bc6aac9c8..ca97e5460 100644 --- a/pkg/sqlite/tag.go +++ b/pkg/sqlite/tag.go @@ -359,12 +359,7 @@ func tagSceneCountCriterionHandler(qb *tagQueryBuilder, sceneCount *models.IntCr return func(f *filterBuilder) { if sceneCount != nil { f.addJoin("scenes_tags", "", "scenes_tags.tag_id = tags.id") - clause, count := getIntCriterionWhereClause("count(distinct scenes_tags.scene_id)", *sceneCount) - - args := []interface{}{} - if count == 1 { - args = append(args, sceneCount.Value) - } + clause, args := getIntCriterionWhereClause("count(distinct scenes_tags.scene_id)", *sceneCount) f.addHaving(clause, args...) } @@ -375,12 +370,7 @@ func tagImageCountCriterionHandler(qb *tagQueryBuilder, imageCount *models.IntCr return func(f *filterBuilder) { if imageCount != nil { f.addJoin("images_tags", "", "images_tags.tag_id = tags.id") - clause, count := getIntCriterionWhereClause("count(distinct images_tags.image_id)", *imageCount) - - args := []interface{}{} - if count == 1 { - args = append(args, imageCount.Value) - } + clause, args := getIntCriterionWhereClause("count(distinct images_tags.image_id)", *imageCount) f.addHaving(clause, args...) } @@ -391,12 +381,7 @@ func tagGalleryCountCriterionHandler(qb *tagQueryBuilder, galleryCount *models.I return func(f *filterBuilder) { if galleryCount != nil { f.addJoin("galleries_tags", "", "galleries_tags.tag_id = tags.id") - clause, count := getIntCriterionWhereClause("count(distinct galleries_tags.gallery_id)", *galleryCount) - - args := []interface{}{} - if count == 1 { - args = append(args, galleryCount.Value) - } + clause, args := getIntCriterionWhereClause("count(distinct galleries_tags.gallery_id)", *galleryCount) f.addHaving(clause, args...) } @@ -407,12 +392,7 @@ func tagPerformerCountCriterionHandler(qb *tagQueryBuilder, performerCount *mode return func(f *filterBuilder) { if performerCount != nil { f.addJoin("performers_tags", "", "performers_tags.tag_id = tags.id") - clause, count := getIntCriterionWhereClause("count(distinct performers_tags.performer_id)", *performerCount) - - args := []interface{}{} - if count == 1 { - args = append(args, performerCount.Value) - } + clause, args := getIntCriterionWhereClause("count(distinct performers_tags.performer_id)", *performerCount) f.addHaving(clause, args...) } @@ -424,12 +404,7 @@ func tagMarkerCountCriterionHandler(qb *tagQueryBuilder, markerCount *models.Int if markerCount != nil { f.addJoin("scene_markers_tags", "", "scene_markers_tags.tag_id = tags.id") f.addJoin("scene_markers", "", "scene_markers_tags.scene_marker_id = scene_markers.id OR scene_markers.primary_tag_id = tags.id") - clause, count := getIntCriterionWhereClause("count(distinct scene_markers.id)", *markerCount) - - args := []interface{}{} - if count == 1 { - args = append(args, markerCount.Value) - } + clause, args := getIntCriterionWhereClause("count(distinct scene_markers.id)", *markerCount) f.addHaving(clause, args...) } diff --git a/ui/v2.5/src/components/Changelog/versions/v090.md b/ui/v2.5/src/components/Changelog/versions/v090.md index b4df3221f..6564451ba 100644 --- a/ui/v2.5/src/components/Changelog/versions/v090.md +++ b/ui/v2.5/src/components/Changelog/versions/v090.md @@ -1,4 +1,5 @@ ### ✨ New Features +* Added between/not between modifiers for number criteria. ([#1559](https://github.com/stashapp/stash/pull/1559)) * Support excluding tag patterns when scraping. ([#1617](https://github.com/stashapp/stash/pull/1617)) * Support setting a custom directory for default performer images. ([#1489](https://github.com/stashapp/stash/pull/1489)) * Added filtering and sorting on scene marker count for tags. ([#1603](https://github.com/stashapp/stash/pull/1603)) diff --git a/ui/v2.5/src/components/List/AddFilterDialog.tsx b/ui/v2.5/src/components/List/AddFilterDialog.tsx index c58c1a276..d67e523b9 100644 --- a/ui/v2.5/src/components/List/AddFilterDialog.tsx +++ b/ui/v2.5/src/components/List/AddFilterDialog.tsx @@ -1,13 +1,14 @@ import _ from "lodash"; import React, { useEffect, useRef, useState } from "react"; import { Button, Form, Modal } from "react-bootstrap"; -import { FilterSelect, DurationInput } from "src/components/Shared"; import { CriterionModifier } from "src/core/generated-graphql"; import { DurationCriterion, CriterionValue, Criterion, IHierarchicalLabeledIdCriterion, + NumberCriterion, + ILabeledIdCriterion, } from "src/models/list-filter/criteria/criterion"; import { NoneCriterion, @@ -15,11 +16,18 @@ import { } from "src/models/list-filter/criteria/none"; import { makeCriteria } from "src/models/list-filter/criteria/factory"; import { ListFilterOptions } from "src/models/list-filter/filter-options"; -import { defineMessages, FormattedMessage, useIntl } from "react-intl"; +import { FormattedMessage, useIntl } from "react-intl"; import { criterionIsHierarchicalLabelValue, + criterionIsNumberValue, CriterionType, } from "src/models/list-filter/types"; +import { DurationFilter } from "./Filters/DurationFilter"; +import { NumberFilter } from "./Filters/NumberFilter"; +import { LabeledIdFilter } from "./Filters/LabeledIdFilter"; +import { HierarchicalLabelValueFilter } from "./Filters/HierarchicalLabelValueFilter"; +import { OptionsFilter } from "./Filters/OptionsFilter"; +import { InputFilter } from "./Filters/InputFilter"; interface IAddFilterProps { onAddCriterion: ( @@ -48,13 +56,6 @@ export const AddFilterDialog: React.FC = ({ const intl = useIntl(); - const messages = defineMessages({ - studio_depth: { - id: "studio_depth", - defaultMessage: "Levels (empty for all)", - }, - }); - // Configure if we are editing an existing criterion useEffect(() => { if (!editingCriterion) { @@ -64,6 +65,10 @@ export const AddFilterDialog: React.FC = ({ } }, [editingCriterion]); + useEffect(() => { + valueStage.current = criterion.value; + }, [criterion]); + function onChangedCriteriaType(event: React.ChangeEvent) { const newCriterionType = event.target.value as CriterionType; const newCriterion = makeCriteria(newCriterionType); @@ -78,41 +83,13 @@ export const AddFilterDialog: React.FC = ({ setCriterion(newCriterion); } - function onChangedSingleSelect(event: React.ChangeEvent) { + function onValueChanged(value: CriterionValue) { const newCriterion = _.cloneDeep(criterion); - newCriterion.value = event.target.value; - setCriterion(newCriterion); - } - - function onChangedInput(event: React.ChangeEvent) { - valueStage.current = event.target.value; - } - - function onChangedDuration(valueAsNumber: number) { - valueStage.current = valueAsNumber; - onBlurInput(); - } - - function onBlurInput() { - const newCriterion = _.cloneDeep(criterion); - newCriterion.value = valueStage.current; + newCriterion.value = value; setCriterion(newCriterion); } function onAddFilter() { - if (!Array.isArray(criterion.value) && defaultValue.current !== undefined) { - const value = defaultValue.current; - if ( - options && - (value === undefined || value === "" || typeof value === "number") - ) { - criterion.value = options[0].toString(); - } else if (typeof value === "number" && value === undefined) { - criterion.value = 0; - } else if (value === undefined) { - criterion.value = ""; - } - } const oldId = editingCriterion ? editingCriterion.getId() : undefined; onAddCriterion(criterion, oldId); } @@ -151,136 +128,57 @@ export const AddFilterDialog: React.FC = ({ return; } - if (Array.isArray(criterion.value)) { - if ( - criterion.criterionOption.type !== "performers" && - criterion.criterionOption.type !== "studios" && - criterion.criterionOption.type !== "parent_studios" && - criterion.criterionOption.type !== "tags" && - criterion.criterionOption.type !== "sceneTags" && - criterion.criterionOption.type !== "performerTags" && - criterion.criterionOption.type !== "movies" - ) - return; - + if (criterion instanceof ILabeledIdCriterion) { return ( - { - const newCriterion = _.cloneDeep(criterion); - newCriterion.value = items.map((i) => ({ - id: i.id, - label: i.name!, - })); - setCriterion(newCriterion); - }} - ids={criterion.value.map((labeled) => labeled.id)} + ); } if (criterion instanceof IHierarchicalLabeledIdCriterion) { - if (criterion.criterionOption.type !== "studios") return; - return ( - { - const newCriterion = _.cloneDeep(criterion); - newCriterion.value.items = items.map((i) => ({ - id: i.id, - label: i.name!, - })); - setCriterion(newCriterion); - }} - ids={criterion.value.items.map((labeled) => labeled.id)} + ); } - if (options && !criterionIsHierarchicalLabelValue(criterion.value)) { + if ( + options && + !criterionIsHierarchicalLabelValue(criterion.value) && + !criterionIsNumberValue(criterion.value) && + !Array.isArray(criterion.value) + ) { defaultValue.current = criterion.value; return ( - - {options.map((c) => ( - - ))} - + ); } if (criterion instanceof DurationCriterion) { - // render duration control return ( - ); } - return ( - - ); - } - function renderAdditional() { - if (criterion instanceof IHierarchicalLabeledIdCriterion) { + if (criterion instanceof NumberCriterion) { return ( - <> - - { - const newCriterion = _.cloneDeep(criterion); - newCriterion.value.depth = - newCriterion.value.depth !== 0 ? 0 : -1; - setCriterion(newCriterion); - }} - /> - - {criterion.value.depth !== 0 && ( - - { - const newCriterion = _.cloneDeep(criterion); - newCriterion.value.depth = e.target.value - ? parseInt(e.target.value, 10) - : -1; - setCriterion(newCriterion); - }} - defaultValue={ - criterion.value && criterion.value.depth !== -1 - ? criterion.value.depth - : "" - } - min="1" - /> - - )} - + ); } + return ( + + ); } return ( <> {renderModifier()} - {renderSelect()} - {renderAdditional()} + {renderSelect()} ); }; diff --git a/ui/v2.5/src/components/List/Filters/DurationFilter.tsx b/ui/v2.5/src/components/List/Filters/DurationFilter.tsx new file mode 100644 index 000000000..3fffa954a --- /dev/null +++ b/ui/v2.5/src/components/List/Filters/DurationFilter.tsx @@ -0,0 +1,94 @@ +import React from "react"; +import { Form } from "react-bootstrap"; +import { useIntl } from "react-intl"; +import { CriterionModifier } from "../../../core/generated-graphql"; +import { DurationInput } from "../../Shared"; +import { INumberValue } from "../../../models/list-filter/types"; +import { Criterion } from "../../../models/list-filter/criteria/criterion"; + +interface IDurationFilterProps { + criterion: Criterion; + onValueChanged: (value: INumberValue) => void; +} + +export const DurationFilter: React.FC = ({ + criterion, + onValueChanged, +}) => { + const intl = useIntl(); + + function onChanged(valueAsNumber: number, property: "value" | "value2") { + const { value } = criterion; + value[property] = valueAsNumber; + onValueChanged(value); + } + + let equalsControl: JSX.Element | null = null; + if ( + criterion.modifier === CriterionModifier.Equals || + criterion.modifier === CriterionModifier.NotEquals + ) { + equalsControl = ( + + onChanged(v, "value")} + placeholder={intl.formatMessage({ id: "criterion.value" })} + /> + + ); + } + + let lowerControl: JSX.Element | null = null; + if ( + criterion.modifier === CriterionModifier.GreaterThan || + criterion.modifier === CriterionModifier.Between || + criterion.modifier === CriterionModifier.NotBetween + ) { + lowerControl = ( + + onChanged(v, "value")} + placeholder={intl.formatMessage({ id: "criterion.greater_than" })} + /> + + ); + } + + let upperControl: JSX.Element | null = null; + if ( + criterion.modifier === CriterionModifier.LessThan || + criterion.modifier === CriterionModifier.Between || + criterion.modifier === CriterionModifier.NotBetween + ) { + upperControl = ( + + + onChanged( + v, + criterion.modifier === CriterionModifier.LessThan + ? "value" + : "value2" + ) + } + placeholder={intl.formatMessage({ id: "criterion.less_than" })} + /> + + ); + } + + return ( + <> + {equalsControl} + {lowerControl} + {upperControl} + + ); +}; diff --git a/ui/v2.5/src/components/List/Filters/HierarchicalLabelValueFilter.tsx b/ui/v2.5/src/components/List/Filters/HierarchicalLabelValueFilter.tsx new file mode 100644 index 000000000..151a813c6 --- /dev/null +++ b/ui/v2.5/src/components/List/Filters/HierarchicalLabelValueFilter.tsx @@ -0,0 +1,91 @@ +import React from "react"; +import { Form } from "react-bootstrap"; +import { defineMessages, useIntl } from "react-intl"; +import { FilterSelect, ValidTypes } from "../../Shared"; +import { Criterion } from "../../../models/list-filter/criteria/criterion"; +import { IHierarchicalLabelValue } from "../../../models/list-filter/types"; + +interface IHierarchicalLabelValueFilterProps { + criterion: Criterion; + onValueChanged: (value: IHierarchicalLabelValue) => void; +} + +export const HierarchicalLabelValueFilter: React.FC = ({ + criterion, + onValueChanged, +}) => { + const intl = useIntl(); + + if ( + criterion.criterionOption.type !== "performers" && + criterion.criterionOption.type !== "studios" && + criterion.criterionOption.type !== "parent_studios" && + criterion.criterionOption.type !== "tags" && + criterion.criterionOption.type !== "sceneTags" && + criterion.criterionOption.type !== "performerTags" && + criterion.criterionOption.type !== "movies" + ) + return null; + + const messages = defineMessages({ + studio_depth: { + id: "studio_depth", + defaultMessage: "Levels (empty for all)", + }, + }); + + function onSelectionChanged(items: ValidTypes[]) { + const { value } = criterion; + value.items = items.map((i) => ({ + id: i.id, + label: i.name!, + })); + onValueChanged(value); + } + + function onDepthChanged(depth: number) { + const { value } = criterion; + value.depth = depth; + onValueChanged(value); + } + + return ( + <> + + labeled.id)} + /> + + + + onDepthChanged(criterion.value.depth !== 0 ? 0 : -1)} + /> + + + {criterion.value.depth !== 0 && ( + + + onDepthChanged(e.target.value ? parseInt(e.target.value, 10) : -1) + } + defaultValue={ + criterion.value && criterion.value.depth !== -1 + ? criterion.value.depth + : "" + } + min="1" + /> + + )} + + ); +}; diff --git a/ui/v2.5/src/components/List/Filters/InputFilter.tsx b/ui/v2.5/src/components/List/Filters/InputFilter.tsx new file mode 100644 index 000000000..95e6ce15d --- /dev/null +++ b/ui/v2.5/src/components/List/Filters/InputFilter.tsx @@ -0,0 +1,31 @@ +import React from "react"; +import { Form } from "react-bootstrap"; +import { + Criterion, + CriterionValue, +} from "../../../models/list-filter/criteria/criterion"; + +interface IInputFilterProps { + criterion: Criterion; + onValueChanged: (value: string) => void; +} + +export const InputFilter: React.FC = ({ + criterion, + onValueChanged, +}) => { + function onChanged(event: React.ChangeEvent) { + onValueChanged(event.target.value); + } + + return ( + + + + ); +}; diff --git a/ui/v2.5/src/components/List/Filters/LabeledIdFilter.tsx b/ui/v2.5/src/components/List/Filters/LabeledIdFilter.tsx new file mode 100644 index 000000000..df47f49dc --- /dev/null +++ b/ui/v2.5/src/components/List/Filters/LabeledIdFilter.tsx @@ -0,0 +1,46 @@ +import React from "react"; +import { Form } from "react-bootstrap"; +import { FilterSelect, ValidTypes } from "../../Shared"; +import { Criterion } from "../../../models/list-filter/criteria/criterion"; +import { ILabeledId } from "../../../models/list-filter/types"; + +interface ILabeledIdFilterProps { + criterion: Criterion; + onValueChanged: (value: ILabeledId[]) => void; +} + +export const LabeledIdFilter: React.FC = ({ + criterion, + onValueChanged, +}) => { + if ( + criterion.criterionOption.type !== "performers" && + criterion.criterionOption.type !== "studios" && + criterion.criterionOption.type !== "parent_studios" && + criterion.criterionOption.type !== "tags" && + criterion.criterionOption.type !== "sceneTags" && + criterion.criterionOption.type !== "performerTags" && + criterion.criterionOption.type !== "movies" + ) + return null; + + function onSelectionChanged(items: ValidTypes[]) { + onValueChanged( + items.map((i) => ({ + id: i.id, + label: i.name!, + })) + ); + } + + return ( + + labeled.id)} + /> + + ); +}; diff --git a/ui/v2.5/src/components/List/Filters/NumberFilter.tsx b/ui/v2.5/src/components/List/Filters/NumberFilter.tsx new file mode 100644 index 000000000..d636b5fbd --- /dev/null +++ b/ui/v2.5/src/components/List/Filters/NumberFilter.tsx @@ -0,0 +1,114 @@ +import React, { useRef } from "react"; +import { Form } from "react-bootstrap"; +import { useIntl } from "react-intl"; +import { CriterionModifier } from "../../../core/generated-graphql"; +import { INumberValue } from "../../../models/list-filter/types"; +import { Criterion } from "../../../models/list-filter/criteria/criterion"; + +interface IDurationFilterProps { + criterion: Criterion; + onValueChanged: (value: INumberValue) => void; +} + +export const NumberFilter: React.FC = ({ + criterion, + onValueChanged, +}) => { + const intl = useIntl(); + + const valueStage = useRef(criterion.value); + + function onChanged( + event: React.ChangeEvent, + property: "value" | "value2" + ) { + const value = parseInt(event.target.value, 10); + valueStage.current[property] = !Number.isNaN(value) ? value : 0; + } + + function onBlurInput() { + onValueChanged(valueStage.current); + } + + let equalsControl: JSX.Element | null = null; + if ( + criterion.modifier === CriterionModifier.Equals || + criterion.modifier === CriterionModifier.NotEquals + ) { + equalsControl = ( + + ) => + onChanged(e, "value") + } + onBlur={onBlurInput} + defaultValue={criterion.value?.value ?? ""} + placeholder={intl.formatMessage({ id: "criterion.value" })} + /> + + ); + } + + let lowerControl: JSX.Element | null = null; + if ( + criterion.modifier === CriterionModifier.GreaterThan || + criterion.modifier === CriterionModifier.Between || + criterion.modifier === CriterionModifier.NotBetween + ) { + lowerControl = ( + + ) => + onChanged(e, "value") + } + onBlur={onBlurInput} + defaultValue={criterion.value?.value ?? ""} + placeholder={intl.formatMessage({ id: "criterion.greater_than" })} + /> + + ); + } + + let upperControl: JSX.Element | null = null; + if ( + criterion.modifier === CriterionModifier.LessThan || + criterion.modifier === CriterionModifier.Between || + criterion.modifier === CriterionModifier.NotBetween + ) { + upperControl = ( + + ) => + onChanged( + e, + criterion.modifier === CriterionModifier.LessThan + ? "value" + : "value2" + ) + } + onBlur={onBlurInput} + defaultValue={ + (criterion.modifier === CriterionModifier.LessThan + ? criterion.value?.value + : criterion.value?.value2) ?? "" + } + placeholder={intl.formatMessage({ id: "criterion.less_than" })} + /> + + ); + } + + return ( + <> + {equalsControl} + {lowerControl} + {upperControl} + + ); +}; diff --git a/ui/v2.5/src/components/List/Filters/OptionsFilter.tsx b/ui/v2.5/src/components/List/Filters/OptionsFilter.tsx new file mode 100644 index 000000000..c0d6baead --- /dev/null +++ b/ui/v2.5/src/components/List/Filters/OptionsFilter.tsx @@ -0,0 +1,48 @@ +import React from "react"; +import { Form } from "react-bootstrap"; +import { + Criterion, + CriterionValue, +} from "../../../models/list-filter/criteria/criterion"; + +interface IOptionsFilterProps { + criterion: Criterion; + onValueChanged: (value: CriterionValue) => void; +} + +export const OptionsFilter: React.FC = ({ + criterion, + onValueChanged, +}) => { + function onChanged(event: React.ChangeEvent) { + onValueChanged(event.target.value); + } + + const options = criterion.criterionOption.options ?? []; + + if ( + options && + (criterion.value === undefined || + criterion.value === "" || + typeof criterion.value === "number") + ) { + onValueChanged(options[0].toString()); + } + + return ( + + + {options.map((c) => ( + + ))} + + + ); +}; diff --git a/ui/v2.5/src/components/Shared/DurationInput.tsx b/ui/v2.5/src/components/Shared/DurationInput.tsx index d8363b882..4329ffcb2 100644 --- a/ui/v2.5/src/components/Shared/DurationInput.tsx +++ b/ui/v2.5/src/components/Shared/DurationInput.tsx @@ -13,6 +13,7 @@ interface IProps { ): void; onReset?(): void; className?: string; + placeholder?: string; } export const DurationInput: React.FC = (props: IProps) => { @@ -108,7 +109,13 @@ export const DurationInput: React.FC = (props: IProps) => { props.onValueChange(undefined); } }} - placeholder={!props.disabled ? "hh:mm:ss" : undefined} + placeholder={ + !props.disabled + ? props.placeholder + ? `${props.placeholder} (hh:mm:ss)` + : "hh:mm:ss" + : undefined + } /> {maybeRenderReset()} diff --git a/ui/v2.5/src/locales/en-GB.json b/ui/v2.5/src/locales/en-GB.json index 8477bb1aa..c38e54134 100644 --- a/ui/v2.5/src/locales/en-GB.json +++ b/ui/v2.5/src/locales/en-GB.json @@ -380,6 +380,11 @@ "country": "Country", "cover_image": "Cover Image", "created_at": "Created At", + "criterion": { + "greater_than": "Greater than", + "less_than": "Less than", + "value": "Value" + }, "criterion_modifier": { "equals": "is", "excludes": "excludes", @@ -392,7 +397,9 @@ "matches_regex": "matches regex", "not_equals": "is not", "not_matches_regex": "not matches regex", - "not_null": "is not null" + "not_null": "is not null", + "between": "between", + "not_between": "not between" }, "date": "Date", "death_date": "Death Date", diff --git a/ui/v2.5/src/models/list-filter/criteria/criterion.ts b/ui/v2.5/src/models/list-filter/criteria/criterion.ts index 2e2b8b380..26d2cac03 100644 --- a/ui/v2.5/src/models/list-filter/criteria/criterion.ts +++ b/ui/v2.5/src/models/list-filter/criteria/criterion.ts @@ -4,24 +4,26 @@ import { IntlShape } from "react-intl"; import { CriterionModifier, HierarchicalMultiCriterionInput, + IntCriterionInput, MultiCriterionInput, } from "src/core/generated-graphql"; import DurationUtils from "src/utils/duration"; import { CriterionType, encodeILabeledId, + IHierarchicalLabelValue, ILabeledId, ILabeledValue, + INumberValue, IOptionType, - IHierarchicalLabelValue, } from "../types"; export type Option = string | number | IOptionType; export type CriterionValue = | string - | number | ILabeledId[] - | IHierarchicalLabelValue; + | IHierarchicalLabelValue + | INumberValue; const modifierMessageIDs = { [CriterionModifier.Equals]: "criterion_modifier.equals", @@ -35,6 +37,8 @@ const modifierMessageIDs = { [CriterionModifier.Excludes]: "criterion_modifier.excludes", [CriterionModifier.MatchesRegex]: "criterion_modifier.matches_regex", [CriterionModifier.NotMatchesRegex]: "criterion_modifier.not_matches_regex", + [CriterionModifier.Between]: "criterion_modifier.between", + [CriterionModifier.NotBetween]: "criterion_modifier.not_between", }; // V = criterion value type @@ -293,6 +297,8 @@ export class NumberCriterionOption extends CriterionOption { CriterionModifier.LessThan, CriterionModifier.IsNull, CriterionModifier.NotNull, + CriterionModifier.Between, + CriterionModifier.NotBetween, ], defaultModifier: CriterionModifier.Equals, options, @@ -305,13 +311,42 @@ export function createNumberCriterionOption(value: CriterionType) { return new NumberCriterionOption(value, value, value); } -export class NumberCriterion extends Criterion { +export class NumberCriterion extends Criterion { + private getValue() { + // backwards compatibility - if this.value is a number, use that + if (typeof this.value !== "object") { + return this.value as number; + } + + return this.value.value; + } + + public encodeValue() { + return { + value: this.getValue(), + value2: this.value.value2, + }; + } + + protected toCriterionInput(): IntCriterionInput { + // backwards compatibility - if this.value is a number, use that + return { + modifier: this.modifier, + value: this.getValue(), + value2: this.value.value2, + }; + } + public getLabelValue() { - return this.value.toString(); + const value = this.getValue(); + return this.modifier === CriterionModifier.Between || + this.modifier === CriterionModifier.NotBetween + ? `${value}, ${this.value.value2 ?? 0}` + : `${value}`; } constructor(type: CriterionOption) { - super(type, 0); + super(type, { value: 0, value2: undefined }); } } @@ -415,6 +450,8 @@ export class MandatoryNumberCriterionOption extends CriterionOption { CriterionModifier.NotEquals, CriterionModifier.GreaterThan, CriterionModifier.LessThan, + CriterionModifier.Between, + CriterionModifier.NotBetween, ], defaultModifier: CriterionModifier.Equals, inputType: "number", @@ -426,12 +463,37 @@ export function createMandatoryNumberCriterionOption(value: CriterionType) { return new MandatoryNumberCriterionOption(value, value, value); } -export class DurationCriterion extends Criterion { +export class DurationCriterion extends Criterion { constructor(type: CriterionOption) { - super(type, 0); + super(type, { value: 0, value2: undefined }); + } + + public encodeValue() { + return { + value: this.value.value, + value2: this.value.value2, + }; + } + + protected toCriterionInput(): IntCriterionInput { + return { + modifier: this.modifier, + value: this.value.value, + value2: this.value.value2, + }; } public getLabelValue() { - return DurationUtils.secondsToString(this.value); + return this.modifier === CriterionModifier.Between || + this.modifier === CriterionModifier.NotBetween + ? `${DurationUtils.secondsToString( + this.value.value + )} ${DurationUtils.secondsToString(this.value.value2 ?? 0)}` + : this.modifier === CriterionModifier.GreaterThan || + this.modifier === CriterionModifier.LessThan || + this.modifier === CriterionModifier.Equals || + this.modifier === CriterionModifier.NotEquals + ? DurationUtils.secondsToString(this.value.value) + : "?"; } } diff --git a/ui/v2.5/src/models/list-filter/types.ts b/ui/v2.5/src/models/list-filter/types.ts index 025dc3050..910ac78c1 100644 --- a/ui/v2.5/src/models/list-filter/types.ts +++ b/ui/v2.5/src/models/list-filter/types.ts @@ -23,6 +23,11 @@ export interface IHierarchicalLabelValue { depth: number; } +export interface INumberValue { + value: number; + value2: number | undefined; +} + export function criterionIsHierarchicalLabelValue( // eslint-disable-next-line @typescript-eslint/no-explicit-any value: any @@ -30,6 +35,13 @@ export function criterionIsHierarchicalLabelValue( return typeof value === "object" && "items" in value && "depth" in value; } +export function criterionIsNumberValue( + // eslint-disable-next-line @typescript-eslint/no-explicit-any + value: any +): value is INumberValue { + return typeof value === "object" && "value" in value && "value2" in value; +} + export function encodeILabeledId(o: ILabeledId) { // escape " and \ and by encoding to JSON so that it encodes to JSON correctly down the line const adjustedLabel = JSON.stringify(o.label).slice(1, -1); From b6d15cc077c319b205237ae6a3c61e435142e8b8 Mon Sep 17 00:00:00 2001 From: WithoutPants <53250216+WithoutPants@users.noreply.github.com> Date: Mon, 16 Aug 2021 10:16:05 +1000 Subject: [PATCH 29/51] Make performer scrape button a dropdown (#1634) --- .../src/components/Changelog/versions/v090.md | 1 + .../PerformerDetails/PerformerEditPanel.tsx | 92 +++++++++---------- 2 files changed, 43 insertions(+), 50 deletions(-) diff --git a/ui/v2.5/src/components/Changelog/versions/v090.md b/ui/v2.5/src/components/Changelog/versions/v090.md index 6564451ba..af123a8d6 100644 --- a/ui/v2.5/src/components/Changelog/versions/v090.md +++ b/ui/v2.5/src/components/Changelog/versions/v090.md @@ -7,6 +7,7 @@ * Added not equals/greater than/less than modifiers for resolution criteria. ([#1568](https://github.com/stashapp/stash/pull/1568)) ### 🎨 Improvements +* Made performer scrape menu scrollable. ([#1634](https://github.com/stashapp/stash/pull/1634)) * Improve Studio UI. ([#1629](https://github.com/stashapp/stash/pull/1629)) * Improve link styling and ensure links open in a new tab. ([#1622](https://github.com/stashapp/stash/pull/1622)) * Added zh-CN language option. ([#1620](https://github.com/stashapp/stash/pull/1620)) diff --git a/ui/v2.5/src/components/Performers/PerformerDetails/PerformerEditPanel.tsx b/ui/v2.5/src/components/Performers/PerformerDetails/PerformerEditPanel.tsx index cc377d3d4..354143ff9 100644 --- a/ui/v2.5/src/components/Performers/PerformerDetails/PerformerEditPanel.tsx +++ b/ui/v2.5/src/components/Performers/PerformerDetails/PerformerEditPanel.tsx @@ -1,13 +1,12 @@ import React, { useEffect, useState } from "react"; import { Button, - Popover, - OverlayTrigger, Form, Col, InputGroup, Row, Badge, + Dropdown, } from "react-bootstrap"; import { FormattedMessage, useIntl } from "react-intl"; import Mousetrap from "mousetrap"; @@ -604,58 +603,51 @@ export const PerformerEditPanel: React.FC = ({ const stashBoxes = stashConfig.data?.configuration.general.stashBoxes ?? []; const popover = ( - - - <> - {stashBoxes.map((s, index) => ( -
    - -
    - ))} - {queryableScrapers - ? queryableScrapers.map((s) => ( -
    - -
    - )) - : ""} -
    - -
    - -
    -
    + + {stashBoxes.map((s, index) => ( + onScraperSelected({ ...s, index })} + > + {s.name ?? "Stash-Box"} + + ))} + {queryableScrapers + ? queryableScrapers.map((s) => ( + onScraperSelected(s)} + > + {s.name} + + )) + : ""} + onReloadScrapers()} + > + + + + + + + + ); return ( - - - + + {popover} + ); } From 0fc5a063327c3c9ead89a68b3800ad8510b56e9a Mon Sep 17 00:00:00 2001 From: WithoutPants <53250216+WithoutPants@users.noreply.github.com> Date: Mon, 16 Aug 2021 14:14:39 +1000 Subject: [PATCH 30/51] Add scene queue keyboard shortcuts (#1635) --- ui/v2.5/src/components/Changelog/versions/v090.md | 1 + ui/v2.5/src/components/Scenes/SceneDetails/Scene.tsx | 12 +++++++++++- ui/v2.5/src/docs/en/KeyboardShortcuts.md | 4 ++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/ui/v2.5/src/components/Changelog/versions/v090.md b/ui/v2.5/src/components/Changelog/versions/v090.md index af123a8d6..51c28b421 100644 --- a/ui/v2.5/src/components/Changelog/versions/v090.md +++ b/ui/v2.5/src/components/Changelog/versions/v090.md @@ -7,6 +7,7 @@ * Added not equals/greater than/less than modifiers for resolution criteria. ([#1568](https://github.com/stashapp/stash/pull/1568)) ### 🎨 Improvements +* Added keyboard shortcuts for scene queue navigation. ([#1635](https://github.com/stashapp/stash/pull/1635)) * Made performer scrape menu scrollable. ([#1634](https://github.com/stashapp/stash/pull/1634)) * Improve Studio UI. ([#1629](https://github.com/stashapp/stash/pull/1629)) * Improve link styling and ensure links open in a new tab. ([#1622](https://github.com/stashapp/stash/pull/1622)) diff --git a/ui/v2.5/src/components/Scenes/SceneDetails/Scene.tsx b/ui/v2.5/src/components/Scenes/SceneDetails/Scene.tsx index 3c103c442..0e2d14220 100644 --- a/ui/v2.5/src/components/Scenes/SceneDetails/Scene.tsx +++ b/ui/v2.5/src/components/Scenes/SceneDetails/Scene.tsx @@ -291,7 +291,9 @@ export const Scene: React.FC = () => { const { query } = sceneQueue; const pages = Math.ceil(queueTotal / query.itemsPerPage); const page = Math.floor(Math.random() * pages) + 1; - const index = Math.floor(Math.random() * query.itemsPerPage); + const index = Math.floor( + Math.random() * Math.min(query.itemsPerPage, queueTotal) + ); const filterCopy = sceneQueue.query.clone(); filterCopy.currentPage = page; const queryResults = await queryFindScenes(filterCopy); @@ -554,17 +556,25 @@ export const Scene: React.FC = () => { // set up hotkeys useEffect(() => { Mousetrap.bind("a", () => setActiveTabKey("scene-details-panel")); + Mousetrap.bind("q", () => setActiveTabKey("scene-queue-panel")); Mousetrap.bind("e", () => setActiveTabKey("scene-edit-panel")); Mousetrap.bind("k", () => setActiveTabKey("scene-markers-panel")); Mousetrap.bind("f", () => setActiveTabKey("scene-file-info-panel")); Mousetrap.bind("o", () => onIncrementClick()); + Mousetrap.bind("p n", () => onQueueNext()); + Mousetrap.bind("p p", () => onQueuePrevious()); + Mousetrap.bind("p r", () => onQueueRandom()); return () => { Mousetrap.unbind("a"); + Mousetrap.unbind("q"); Mousetrap.unbind("e"); Mousetrap.unbind("k"); Mousetrap.unbind("f"); Mousetrap.unbind("o"); + Mousetrap.unbind("p n"); + Mousetrap.unbind("p p"); + Mousetrap.unbind("p r"); }; }); diff --git a/ui/v2.5/src/docs/en/KeyboardShortcuts.md b/ui/v2.5/src/docs/en/KeyboardShortcuts.md index b1bf8e1ca..c57957120 100644 --- a/ui/v2.5/src/docs/en/KeyboardShortcuts.md +++ b/ui/v2.5/src/docs/en/KeyboardShortcuts.md @@ -54,10 +54,14 @@ | Keyboard sequence | Action | |-------------------|--------| | `a` | Details tab | +| `q` | Queue tab | | `k` | Markers tab | | `f` | File info tab | | `e` | Edit tab | | `o` | Increment O-Counter | +| `p n` | Play next scene in queue | +| `p p` | Play previous scene in queue | +| `p r` | Play random scene in queue | ### Scene Markers tab shortcuts From fc6cafa15f42516373e452e75eacacf981e70c2e Mon Sep 17 00:00:00 2001 From: gitgiggety <79809426+gitgiggety@users.noreply.github.com> Date: Tue, 17 Aug 2021 05:43:22 +0200 Subject: [PATCH 31/51] Fix hierarchical criteria performance issue (#1643) * Fix hierarchical criteria performance issue Don't apply recursive clause to hierarchical criteria when the depth is set to 0 (i.e.: no recursion is needed). This undoes the current performance penalty on for example the studios page. This as reported in #1519, using a database of 4M images, 30K scenes and 500 studios. Without this fix loading the studios overview, with the default of 40 items per page, takes 6 to 7 seconds. With this fix it only takes 0,07 seconds reverting the performance back to the pre-hierarchical filtering performance (tested against 508f7b84 which was the last commit before #1397 was merged). --- pkg/sqlite/filter.go | 23 +++++++++++++------ .../src/components/Changelog/versions/v090.md | 1 + 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/pkg/sqlite/filter.go b/pkg/sqlite/filter.go index cb8e56e97..1517bf99a 100644 --- a/pkg/sqlite/filter.go +++ b/pkg/sqlite/filter.go @@ -539,18 +539,27 @@ func addHierarchicalWithClause(f *filterBuilder, value []string, derivedTable, t depthCondition = fmt.Sprintf("WHERE depth < %d", depth) } - withClause := utils.StrFormat(`RECURSIVE {derivedTable} AS ( -SELECT id as id, id as child_id, 0 as depth FROM {table} -WHERE id in {inBinding} -UNION SELECT p.id, c.id, depth + 1 FROM {table} as c -INNER JOIN {derivedTable} as p ON c.{parentFK} = p.child_id {depthCondition}) -`, utils.StrFormatMap{ + withClauseMap := utils.StrFormatMap{ "derivedTable": derivedTable, "table": table, "inBinding": getInBinding(inCount), "parentFK": parentFK, "depthCondition": depthCondition, - }) + "unionClause": "", + } + + if depth != 0 { + withClauseMap["unionClause"] = utils.StrFormat(` +UNION SELECT p.id, c.id, depth + 1 FROM {table} as c +INNER JOIN {derivedTable} as p ON c.{parentFK} = p.child_id {depthCondition} +`, withClauseMap) + } + + withClause := utils.StrFormat(`RECURSIVE {derivedTable} AS ( +SELECT id as id, id as child_id, 0 as depth FROM {table} +WHERE id in {inBinding} +{unionClause}) +`, withClauseMap) f.addWith(withClause, args...) } diff --git a/ui/v2.5/src/components/Changelog/versions/v090.md b/ui/v2.5/src/components/Changelog/versions/v090.md index 51c28b421..69c23e827 100644 --- a/ui/v2.5/src/components/Changelog/versions/v090.md +++ b/ui/v2.5/src/components/Changelog/versions/v090.md @@ -19,6 +19,7 @@ * Added de-DE language option. ([#1578](https://github.com/stashapp/stash/pull/1578)) ### 🐛 Bug fixes +* Fix performance issue on Studios page getting studio image count. ([#1643](https://github.com/stashapp/stash/pull/1643)) * Regenerate scene phash if overwrite flag is set. ([#1633](https://github.com/stashapp/stash/pull/1633)) * Create .stash directory in $HOME only if required. ([#1623](https://github.com/stashapp/stash/pull/1623)) * Include stash id when scraping performer from stash-box. ([#1608](https://github.com/stashapp/stash/pull/1608)) From 680af72dcf40ff5aff8c6cddd93e7d4d56927dd1 Mon Sep 17 00:00:00 2001 From: WithoutPants <53250216+WithoutPants@users.noreply.github.com> Date: Wed, 18 Aug 2021 12:14:56 +1000 Subject: [PATCH 32/51] Custom page size and saved zoom level (#1636) * Allow custom page sizes * Save zoom level in filters --- .../src/components/Changelog/versions/v090.md | 2 + .../src/components/Galleries/GalleryList.tsx | 10 +- ui/v2.5/src/components/Images/ImageList.tsx | 13 +- ui/v2.5/src/components/List/ListFilter.tsx | 119 +++++++++++++++--- ui/v2.5/src/components/Scenes/SceneList.tsx | 10 +- ui/v2.5/src/components/Tags/TagList.tsx | 10 +- ui/v2.5/src/hooks/ListHook.tsx | 21 ++-- ui/v2.5/src/locales/en-GB.json | 1 + ui/v2.5/src/models/list-filter/filter.ts | 18 ++- 9 files changed, 144 insertions(+), 60 deletions(-) diff --git a/ui/v2.5/src/components/Changelog/versions/v090.md b/ui/v2.5/src/components/Changelog/versions/v090.md index 69c23e827..02cd38300 100644 --- a/ui/v2.5/src/components/Changelog/versions/v090.md +++ b/ui/v2.5/src/components/Changelog/versions/v090.md @@ -1,4 +1,6 @@ ### ✨ New Features +* Allow saving query page zoom level in saved and default filters. ([#1636](https://github.com/stashapp/stash/pull/1636)) +* Support custom page sizes in the query page size dropdown. ([#1636](https://github.com/stashapp/stash/pull/1636)) * Added between/not between modifiers for number criteria. ([#1559](https://github.com/stashapp/stash/pull/1559)) * Support excluding tag patterns when scraping. ([#1617](https://github.com/stashapp/stash/pull/1617)) * Support setting a custom directory for default performer images. ([#1489](https://github.com/stashapp/stash/pull/1489)) diff --git a/ui/v2.5/src/components/Galleries/GalleryList.tsx b/ui/v2.5/src/components/Galleries/GalleryList.tsx index 91d1cedea..e56f728fa 100644 --- a/ui/v2.5/src/components/Galleries/GalleryList.tsx +++ b/ui/v2.5/src/components/Galleries/GalleryList.tsx @@ -156,8 +156,7 @@ export const GalleryList: React.FC = ({ function renderGalleries( result: FindGalleriesQueryResult, filter: ListFilterModel, - selectedIds: Set, - zoomIndex: number + selectedIds: Set ) { if (!result.data || !result.data.findGalleries) { return; @@ -169,7 +168,7 @@ export const GalleryList: React.FC = ({ 0} selected={selectedIds.has(gallery.id)} onSelectedChanged={(selected: boolean, shiftKey: boolean) => @@ -235,13 +234,12 @@ export const GalleryList: React.FC = ({ function renderContent( result: FindGalleriesQueryResult, filter: ListFilterModel, - selectedIds: Set, - zoomIndex: number + selectedIds: Set ) { return ( <> {maybeRenderGalleryExportDialog(selectedIds)} - {renderGalleries(result, filter, selectedIds, zoomIndex)} + {renderGalleries(result, filter, selectedIds)} ); } diff --git a/ui/v2.5/src/components/Images/ImageList.tsx b/ui/v2.5/src/components/Images/ImageList.tsx index 76fc329bd..7e7e2305d 100644 --- a/ui/v2.5/src/components/Images/ImageList.tsx +++ b/ui/v2.5/src/components/Images/ImageList.tsx @@ -262,7 +262,6 @@ export const ImageList: React.FC = ({ result: FindImagesQueryResult, filter: ListFilterModel, selectedIds: Set, - zoomIndex: number, onChangePage: (page: number) => void, pageCount: number ) { @@ -273,7 +272,7 @@ export const ImageList: React.FC = ({ return (
    {result.data.findImages.images.map((image) => - renderImageCard(image, selectedIds, zoomIndex) + renderImageCard(image, selectedIds, filter.zoomIndex) )}
    ); @@ -294,21 +293,13 @@ export const ImageList: React.FC = ({ result: FindImagesQueryResult, filter: ListFilterModel, selectedIds: Set, - zoomIndex: number, onChangePage: (page: number) => void, pageCount: number ) { return ( <> {maybeRenderImageExportDialog(selectedIds)} - {renderImages( - result, - filter, - selectedIds, - zoomIndex, - onChangePage, - pageCount - )} + {renderImages(result, filter, selectedIds, onChangePage, pageCount)} ); } diff --git a/ui/v2.5/src/components/List/ListFilter.tsx b/ui/v2.5/src/components/List/ListFilter.tsx index b064c7b21..1adaa37fb 100644 --- a/ui/v2.5/src/components/List/ListFilter.tsx +++ b/ui/v2.5/src/components/List/ListFilter.tsx @@ -1,5 +1,5 @@ import _, { debounce } from "lodash"; -import React, { HTMLAttributes, useEffect } from "react"; +import React, { HTMLAttributes, useEffect, useRef, useState } from "react"; import Mousetrap from "mousetrap"; import { SortDirectionEnum } from "src/core/generated-graphql"; import { @@ -11,6 +11,8 @@ import { Tooltip, InputGroup, FormControl, + Popover, + Overlay, } from "react-bootstrap"; import { Icon } from "src/components/Shared"; @@ -40,7 +42,10 @@ export const ListFilter: React.FC = ({ openFilterDialog, persistState, }) => { + const [customPageSizeShowing, setCustomPageSizeShowing] = useState(false); const [queryRef, setQueryFocus] = useFocus(); + const perPageSelect = useRef(null); + const [perPageInput, perPageFocus] = useFocus(); const searchCallback = debounce((value: string) => { const newFilter = _.cloneDeep(filter); @@ -65,11 +70,29 @@ export const ListFilter: React.FC = ({ }; }); - function onChangePageSize(event: React.ChangeEvent) { - const val = event.currentTarget.value; + useEffect(() => { + if (customPageSizeShowing) { + perPageFocus(); + } + }, [customPageSizeShowing, perPageFocus]); + + function onChangePageSize(val: string) { + if (val === "custom") { + // added timeout since Firefox seems to trigger the rootClose immediately + // without it + setTimeout(() => setCustomPageSizeShowing(true), 0); + return; + } + + setCustomPageSizeShowing(false); + + const pp = parseInt(val, 10); + if (Number.isNaN(pp) || pp <= 0) { + return; + } const newFilter = _.cloneDeep(filter); - newFilter.itemsPerPage = parseInt(val, 10); + newFilter.itemsPerPage = pp; newFilter.currentPage = 1; onFilterUpdate(newFilter); } @@ -144,6 +167,25 @@ export const ListFilter: React.FC = ({ (o) => o.value === filter.sortBy ); + const pageSizeOptions = PAGE_SIZE_OPTIONS.map((o) => { + return { + label: o, + value: o, + }; + }); + const currentPerPage = filter.itemsPerPage.toString(); + if (!pageSizeOptions.find((o) => o.value === currentPerPage)) { + pageSizeOptions.push({ label: currentPerPage, value: currentPerPage }); + pageSizeOptions.sort( + (a, b) => parseInt(a.value, 10) - parseInt(b.value, 10) + ); + } + + pageSizeOptions.push({ + label: `${intl.formatMessage({ id: "custom" })}...`, + value: "custom", + }); + return ( <>
    @@ -240,18 +282,63 @@ export const ListFilter: React.FC = ({ )} - - {PAGE_SIZE_OPTIONS.map((s) => ( - - ))} - +
    + onChangePageSize(e.target.value)} + value={filter.itemsPerPage.toString()} + className="btn-secondary mx-1 mb-1" + > + {pageSizeOptions.map((s) => ( + + ))} + + setCustomPageSizeShowing(false)} + > + +
    + + ) => { + if (e.key === "Enter") { + onChangePageSize( + (perPageInput.current as HTMLInputElement)?.value ?? + "" + ); + e.preventDefault(); + } + }} + /> + + + + +
    +
    +
    +
    ); } diff --git a/ui/v2.5/src/components/Scenes/SceneList.tsx b/ui/v2.5/src/components/Scenes/SceneList.tsx index 792e089d2..347b0cbf1 100644 --- a/ui/v2.5/src/components/Scenes/SceneList.tsx +++ b/ui/v2.5/src/components/Scenes/SceneList.tsx @@ -194,8 +194,7 @@ export const SceneList: React.FC = ({ function renderScenes( result: FindScenesQueryResult, filter: ListFilterModel, - selectedIds: Set, - zoomIndex: number + selectedIds: Set ) { if (!result.data || !result.data.findScenes) { return; @@ -208,7 +207,7 @@ export const SceneList: React.FC = ({ listData.onSelectChange(id, selected, shiftKey) @@ -234,14 +233,13 @@ export const SceneList: React.FC = ({ function renderContent( result: FindScenesQueryResult, filter: ListFilterModel, - selectedIds: Set, - zoomIndex: number + selectedIds: Set ) { return ( <> {maybeRenderSceneGenerateDialog(selectedIds)} {maybeRenderSceneExportDialog(selectedIds)} - {renderScenes(result, filter, selectedIds, zoomIndex)} + {renderScenes(result, filter, selectedIds)} ); } diff --git a/ui/v2.5/src/components/Tags/TagList.tsx b/ui/v2.5/src/components/Tags/TagList.tsx index 8c0f0600b..bf29af891 100644 --- a/ui/v2.5/src/components/Tags/TagList.tsx +++ b/ui/v2.5/src/components/Tags/TagList.tsx @@ -195,8 +195,7 @@ export const TagList: React.FC = ({ filterHook }) => { function renderTags( result: FindTagsQueryResult, filter: ListFilterModel, - selectedIds: Set, - zoomIndex: number + selectedIds: Set ) { if (!result.data?.findTags) return; @@ -207,7 +206,7 @@ export const TagList: React.FC = ({ filterHook }) => { 0} selected={selectedIds.has(tag.id)} onSelectedChanged={(selected: boolean, shiftKey: boolean) => @@ -310,13 +309,12 @@ export const TagList: React.FC = ({ filterHook }) => { function renderContent( result: FindTagsQueryResult, filter: ListFilterModel, - selectedIds: Set, - zoomIndex: number + selectedIds: Set ) { return ( <> {maybeRenderExportDialog(selectedIds)} - {renderTags(result, filter, selectedIds, zoomIndex)} + {renderTags(result, filter, selectedIds)} ); } diff --git a/ui/v2.5/src/hooks/ListHook.tsx b/ui/v2.5/src/hooks/ListHook.tsx index 16370df1a..3a5ebb2a1 100644 --- a/ui/v2.5/src/hooks/ListHook.tsx +++ b/ui/v2.5/src/hooks/ListHook.tsx @@ -124,7 +124,6 @@ interface IListHookOptions { result: T, filter: ListFilterModel, selectedIds: Set, - zoomIndex: number, onChangePage: (page: number) => void, pageCount: number ) => React.ReactNode; @@ -170,7 +169,6 @@ const RenderList = < QueryResult extends IQueryResult, QueryData extends IDataItem >({ - defaultZoomIndex, filter, filterOptions, onChangePage, @@ -194,7 +192,6 @@ const RenderList = < const [isDeleteDialogOpen, setIsDeleteDialogOpen] = useState(false); const [selectedIds, setSelectedIds] = useState>(new Set()); const [lastClickedId, setLastClickedId] = useState(); - const [zoomIndex, setZoomIndex] = useState(defaultZoomIndex ?? 1); const [editingCriterion, setEditingCriterion] = useState< Criterion | undefined @@ -334,7 +331,9 @@ const RenderList = < } function onChangeZoom(newZoomIndex: number) { - setZoomIndex(newZoomIndex); + const newFilter = _.cloneDeep(filter); + newFilter.zoomIndex = newZoomIndex; + updateQueryParams(newFilter); } async function onOperationClicked(o: IListHookOperation) { @@ -405,14 +404,7 @@ const RenderList = < return ( <> {renderPagination()} - {renderContent( - result, - filter, - selectedIds, - zoomIndex, - onChangePage, - pages - )} + {renderContent(result, filter, selectedIds, onChangePage, pages)} @@ -566,7 +558,8 @@ const useList = ( options.filterMode, queryString.parse(location.search), defaultSort, - defaultDisplayMode + defaultDisplayMode, + options.defaultZoomIndex ) ); diff --git a/ui/v2.5/src/locales/en-GB.json b/ui/v2.5/src/locales/en-GB.json index c38e54134..6a373b07c 100644 --- a/ui/v2.5/src/locales/en-GB.json +++ b/ui/v2.5/src/locales/en-GB.json @@ -401,6 +401,7 @@ "between": "between", "not_between": "not between" }, + "custom": "Custom", "date": "Date", "death_date": "Death Date", "death_year": "Death Year", diff --git a/ui/v2.5/src/models/list-filter/filter.ts b/ui/v2.5/src/models/list-filter/filter.ts index c08337258..809529422 100644 --- a/ui/v2.5/src/models/list-filter/filter.ts +++ b/ui/v2.5/src/models/list-filter/filter.ts @@ -16,6 +16,7 @@ interface IQueryParameters { q?: string; p?: string; c?: string[]; + z?: string; } const DEFAULT_PARAMS = { @@ -34,19 +35,26 @@ export class ListFilterModel { public sortDirection: SortDirectionEnum = SortDirectionEnum.Asc; public sortBy?: string; public displayMode: DisplayMode = DEFAULT_PARAMS.displayMode; + public zoomIndex: number = 1; public criteria: Array> = []; public randomSeed = -1; + private defaultZoomIndex: number = 1; public constructor( mode: FilterMode, rawParms?: ParsedQuery, defaultSort?: string, - defaultDisplayMode?: DisplayMode + defaultDisplayMode?: DisplayMode, + defaultZoomIndex?: number ) { this.mode = mode; const params = rawParms as IQueryParameters; this.sortBy = defaultSort; if (defaultDisplayMode !== undefined) this.displayMode = defaultDisplayMode; + if (defaultZoomIndex !== undefined) { + this.defaultZoomIndex = defaultZoomIndex; + this.zoomIndex = defaultZoomIndex; + } if (params) this.configureFromQueryParameters(params); } @@ -85,6 +93,12 @@ export class ListFilterModel { this.currentPage = Number.parseInt(params.p, 10); } if (params.perPage) this.itemsPerPage = Number.parseInt(params.perPage, 10); + if (params.z !== undefined) { + const zoomIndex = Number.parseInt(params.z, 10); + if (zoomIndex >= 0 && !Number.isNaN(zoomIndex)) { + this.zoomIndex = zoomIndex; + } + } if (params.c !== undefined) { this.criteria = []; @@ -158,6 +172,7 @@ export class ListFilterModel { this.currentPage !== DEFAULT_PARAMS.currentPage ? this.currentPage : undefined, + z: this.zoomIndex !== this.defaultZoomIndex ? this.zoomIndex : undefined, c: encodedCriteria, }; @@ -176,6 +191,7 @@ export class ListFilterModel { this.sortDirection === SortDirectionEnum.Desc ? "desc" : undefined, disp: this.displayMode, q: this.searchTerm, + z: this.zoomIndex, c: encodedCriteria, }; From 9803684535b615d9680f4bcba099b37a0d9ffec6 Mon Sep 17 00:00:00 2001 From: EnameEtavir <84581448+EnameEtavir@users.noreply.github.com> Date: Wed, 18 Aug 2021 04:56:52 +0200 Subject: [PATCH 33/51] UI: Add checkbox to scenes List view (#1642) --- .../src/components/Changelog/versions/v090.md | 1 + ui/v2.5/src/components/Scenes/SceneList.tsx | 9 ++++++- .../src/components/Scenes/SceneListTable.tsx | 26 ++++++++++++++++++- 3 files changed, 34 insertions(+), 2 deletions(-) diff --git a/ui/v2.5/src/components/Changelog/versions/v090.md b/ui/v2.5/src/components/Changelog/versions/v090.md index 02cd38300..22cb7935e 100644 --- a/ui/v2.5/src/components/Changelog/versions/v090.md +++ b/ui/v2.5/src/components/Changelog/versions/v090.md @@ -9,6 +9,7 @@ * Added not equals/greater than/less than modifiers for resolution criteria. ([#1568](https://github.com/stashapp/stash/pull/1568)) ### 🎨 Improvements +* Added checkboxes to scene list view. ([#1642](https://github.com/stashapp/stash/pull/1642)) * Added keyboard shortcuts for scene queue navigation. ([#1635](https://github.com/stashapp/stash/pull/1635)) * Made performer scrape menu scrollable. ([#1634](https://github.com/stashapp/stash/pull/1634)) * Improve Studio UI. ([#1629](https://github.com/stashapp/stash/pull/1629)) diff --git a/ui/v2.5/src/components/Scenes/SceneList.tsx b/ui/v2.5/src/components/Scenes/SceneList.tsx index 347b0cbf1..65eb6bed0 100644 --- a/ui/v2.5/src/components/Scenes/SceneList.tsx +++ b/ui/v2.5/src/components/Scenes/SceneList.tsx @@ -217,7 +217,14 @@ export const SceneList: React.FC = ({ } if (filter.displayMode === DisplayMode.List) { return ( - + + listData.onSelectChange(id, selected, shiftKey) + } + /> ); } if (filter.displayMode === DisplayMode.Wall) { diff --git a/ui/v2.5/src/components/Scenes/SceneListTable.tsx b/ui/v2.5/src/components/Scenes/SceneListTable.tsx index 0cd73e8b7..c6b20c382 100644 --- a/ui/v2.5/src/components/Scenes/SceneListTable.tsx +++ b/ui/v2.5/src/components/Scenes/SceneListTable.tsx @@ -1,7 +1,7 @@ // @ts-nocheck /* eslint-disable jsx-a11y/control-has-associated-label */ import React from "react"; -import { Table, Button } from "react-bootstrap"; +import { Table, Button, Form } from "react-bootstrap"; import { Link } from "react-router-dom"; import * as GQL from "src/core/generated-graphql"; import { NavUtils, TextUtils } from "src/utils"; @@ -11,6 +11,8 @@ import { FormattedMessage } from "react-intl"; interface ISceneListTableProps { scenes: GQL.SlimSceneDataFragment[]; queue?: SceneQueue; + selectedIds: Set; + onSelectChange: (id: string, selected: boolean, shiftKey: boolean) => void; } export const SceneListTable: React.FC = ( @@ -44,8 +46,29 @@ export const SceneListTable: React.FC = ( ? props.queue.makeLink(scene.id, { sceneIndex: index }) : `/scenes/${scene.id}`; + let shiftKey = false; return ( + + + props.onSelectChange!( + scene.id, + !props.selectedIds.has(scene.id), + shiftKey + ) + } + onClick={( + event: React.MouseEvent + ) => { + // eslint-disable-next-line prefer-destructuring + shiftKey = event.shiftKey; + event.stopPropagation(); + }} + /> + = ( + + + + {formik.getFieldMeta(field).error} + + + + ); + } + if (isLoading) return ; return ( + {renderScraperMenu()} + - - {renderScraperMenu()} - - -
    -
    - {FormUtils.renderInputGroup({ - title: intl.formatMessage({ id: "title" }), - value: title, - onChange: setTitle, - isEditing: true, - })} - -
    - - {intl.formatMessage({ id: "url" })} - -
    - {maybeRenderScrapeButton()} -
    - - - {EditableTextUtils.renderInputGroup({ - title: intl.formatMessage({ id: "url" }), - value: url, - onChange: setUrl, - isEditing: true, +
    +
    + {renderTextField("title", intl.formatMessage({ id: "title" }))} + +
    + + + +
    + {maybeRenderScrapeButton()} +
    + + + + + + {renderTextField( + "date", + intl.formatMessage({ id: "date" }), + "YYYY-MM-DD" + )} + + {FormUtils.renderLabel({ + title: intl.formatMessage({ id: "rating" }), })} - - - {FormUtils.renderInputGroup({ - title: intl.formatMessage({ id: "date" }), - value: date, - isEditing: true, - onChange: setDate, - placeholder: "YYYY-MM-DD", - })} - - {FormUtils.renderLabel({ - title: intl.formatMessage({ id: "rating" }), - })} - - setRating(value ?? NaN)} - /> - - + + + formik.setFieldValue("rating", value ?? null) + } + /> + + - - {FormUtils.renderLabel({ - title: intl.formatMessage({ id: "studio" }), - })} - - - setStudioId(items.length > 0 ? items[0]?.id : undefined) + + {FormUtils.renderLabel({ + title: intl.formatMessage({ id: "studio" }), + })} + + + formik.setFieldValue( + "studio_id", + items.length > 0 ? items[0]?.id : null + ) + } + ids={formik.values.studio_id ? [formik.values.studio_id] : []} + /> + + + + + {FormUtils.renderLabel({ + title: intl.formatMessage({ id: "performers" }), + labelProps: { + column: true, + sm: 3, + xl: 12, + }, + })} + + + formik.setFieldValue( + "performer_ids", + items.map((item) => item.id) + ) + } + ids={formik.values.performer_ids} + /> + + + + + {FormUtils.renderLabel({ + title: intl.formatMessage({ id: "tags" }), + labelProps: { + column: true, + sm: 3, + xl: 12, + }, + })} + + + formik.setFieldValue( + "tag_ids", + items.map((item) => item.id) + ) + } + ids={formik.values.tag_ids} + /> + + + + + {FormUtils.renderLabel({ + title: intl.formatMessage({ id: "scenes" }), + labelProps: { + column: true, + sm: 3, + xl: 12, + }, + })} + + onSetScenes(items)} + /> + + + +
    + + + + + ) => + formik.setFieldValue("details", newValue.currentTarget.value) } - ids={studioId ? [studioId] : []} + value={formik.values.details} /> - - - - - {FormUtils.renderLabel({ - title: intl.formatMessage({ id: "performers" }), - labelProps: { - column: true, - sm: 3, - xl: 12, - }, - })} -
    - - setPerformerIds(items.map((item) => item.id)) - } - ids={performerIds} - /> - - - - - {FormUtils.renderLabel({ - title: intl.formatMessage({ id: "tags" }), - labelProps: { - column: true, - sm: 3, - xl: 12, - }, - })} - - setTagIds(items.map((item) => item.id))} - ids={tagIds} - /> - - - - - {FormUtils.renderLabel({ - title: intl.formatMessage({ id: "scenes" }), - labelProps: { - column: true, - sm: 3, - xl: 12, - }, - })} - - setScenes(items)} - /> - - + + -
    - - - - - ) => - setDetails(newValue.currentTarget.value) - } - value={details} - /> - -
    - + ); }; From 28b092885c83d8a9aee279c30f51c9cd3996f2e4 Mon Sep 17 00:00:00 2001 From: gitgiggety <79809426+gitgiggety@users.noreply.github.com> Date: Tue, 24 Aug 2021 04:14:37 +0200 Subject: [PATCH 38/51] Add option to filename parser to skip organized scenes (#1665) Fixes #1219 --- graphql/schema/types/scene.graphql | 3 ++- pkg/manager/filename_parser.go | 5 +++++ .../SceneFilenameParser/ParserInput.tsx | 19 +++++++++++++++++++ .../SceneFilenameParser.tsx | 2 ++ ui/v2.5/src/locales/en-GB.json | 1 + ui/v2.5/src/locales/en-US.json | 7 ++++++- 6 files changed, 35 insertions(+), 2 deletions(-) diff --git a/graphql/schema/types/scene.graphql b/graphql/schema/types/scene.graphql index a1ec113d7..734b5f596 100644 --- a/graphql/schema/types/scene.graphql +++ b/graphql/schema/types/scene.graphql @@ -125,7 +125,8 @@ type FindScenesResultType { input SceneParserInput { ignoreWords: [String!], whitespaceCharacters: String, - capitalizeTitle: Boolean + capitalizeTitle: Boolean, + ignoreOrganized: Boolean } type SceneMovieID { diff --git a/pkg/manager/filename_parser.go b/pkg/manager/filename_parser.go index 5be8ed178..991261941 100644 --- a/pkg/manager/filename_parser.go +++ b/pkg/manager/filename_parser.go @@ -484,6 +484,11 @@ func (p *SceneFilenameParser) Parse(repo models.ReaderRepository) ([]*models.Sce }, } + if p.ParserInput.IgnoreOrganized != nil && *p.ParserInput.IgnoreOrganized { + organized := false + sceneFilter.Organized = &organized + } + p.Filter.Q = nil scenes, total, err := repo.Scene().Query(sceneFilter, p.Filter) diff --git a/ui/v2.5/src/components/SceneFilenameParser/ParserInput.tsx b/ui/v2.5/src/components/SceneFilenameParser/ParserInput.tsx index 7e613ac94..a04bc20fa 100644 --- a/ui/v2.5/src/components/SceneFilenameParser/ParserInput.tsx +++ b/ui/v2.5/src/components/SceneFilenameParser/ParserInput.tsx @@ -63,6 +63,7 @@ export interface IParserInput { page: number; pageSize: number; findClicked: boolean; + ignoreOrganized: boolean; } interface IParserRecipe { @@ -95,6 +96,9 @@ export const ParserInput: React.FC = ( const [capitalizeTitle, setCapitalizeTitle] = useState( props.input.capitalizeTitle ); + const [ignoreOrganized, setIgnoreOrganized] = useState( + props.input.ignoreOrganized + ); function onFind() { props.onFind({ @@ -105,6 +109,7 @@ export const ParserInput: React.FC = ( page: 1, pageSize: props.input.pageSize, findClicked: props.input.findClicked, + ignoreOrganized, }); } @@ -226,6 +231,20 @@ export const ParserInput: React.FC = ( })} + + setIgnoreOrganized(!ignoreOrganized)} + /> + + {intl.formatMessage({ + id: "config.tools.scene_filename_parser.ignore_organized", + })} + + {/* TODO - mapping stuff will go here */} diff --git a/ui/v2.5/src/components/SceneFilenameParser/SceneFilenameParser.tsx b/ui/v2.5/src/components/SceneFilenameParser/SceneFilenameParser.tsx index 402056bcf..f58dc0970 100644 --- a/ui/v2.5/src/components/SceneFilenameParser/SceneFilenameParser.tsx +++ b/ui/v2.5/src/components/SceneFilenameParser/SceneFilenameParser.tsx @@ -24,6 +24,7 @@ const initialParserInput = { page: 1, pageSize: 20, findClicked: false, + ignoreOrganized: true, }; const initialShowFieldsState = new Map([ @@ -127,6 +128,7 @@ export const SceneFilenameParser: React.FC = () => { ignoreWords: parserInput.ignoreWords, whitespaceCharacters: parserInput.whitespaceCharacters, capitalizeTitle: parserInput.capitalizeTitle, + ignoreOrganized: parserInput.ignoreOrganized, }; queryParseSceneFilenames(parserFilter, parserInputData) diff --git a/ui/v2.5/src/locales/en-GB.json b/ui/v2.5/src/locales/en-GB.json index 70bbc37aa..dfa998624 100644 --- a/ui/v2.5/src/locales/en-GB.json +++ b/ui/v2.5/src/locales/en-GB.json @@ -295,6 +295,7 @@ "escape_chars": "Use \\ to escape literal characters", "filename": "Filename", "filename_pattern": "Filename Pattern", + "ignore_organized": "Ignore organised scenes", "ignored_words": "Ignored words", "matches_with": "Matches with {i}", "select_parser_recipe": "Select Parser Recipe", diff --git a/ui/v2.5/src/locales/en-US.json b/ui/v2.5/src/locales/en-US.json index 102a069c8..ecc49e3dd 100644 --- a/ui/v2.5/src/locales/en-US.json +++ b/ui/v2.5/src/locales/en-US.json @@ -2,5 +2,10 @@ "eye_color": "Eye Color", "favourite": "Favorite", "hair_color": "Hair Color", - "organized": "Organized" + "organized": "Organized", + "tools": { + "scene_filename_parser": { + "ignore_organized": "Ignore organized scenes" + } + } } From da8803925cf7781863e81ba9ed926260bc346619 Mon Sep 17 00:00:00 2001 From: gitgiggety <79809426+gitgiggety@users.noreply.github.com> Date: Tue, 24 Aug 2021 07:04:17 +0200 Subject: [PATCH 39/51] Add date, duration and rating to Movie sorting (#1663) * Add date, duration and rating to Movie sorting Fixes: #1637 --- ui/v2.5/src/components/Changelog/versions/v090.md | 1 + ui/v2.5/src/models/list-filter/movies.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/v2.5/src/components/Changelog/versions/v090.md b/ui/v2.5/src/components/Changelog/versions/v090.md index 8855adad5..7dfbbdcc1 100644 --- a/ui/v2.5/src/components/Changelog/versions/v090.md +++ b/ui/v2.5/src/components/Changelog/versions/v090.md @@ -1,4 +1,5 @@ ### ✨ New Features +* Added sort by options for date, duration and rating for movies. ([#1663](https://github.com/stashapp/stash/pull/1663)) * Allow saving query page zoom level in saved and default filters. ([#1636](https://github.com/stashapp/stash/pull/1636)) * Support custom page sizes in the query page size dropdown. ([#1636](https://github.com/stashapp/stash/pull/1636)) * Added between/not between modifiers for number criteria. ([#1559](https://github.com/stashapp/stash/pull/1559)) diff --git a/ui/v2.5/src/models/list-filter/movies.ts b/ui/v2.5/src/models/list-filter/movies.ts index 1c2b8e0f6..65b7af112 100644 --- a/ui/v2.5/src/models/list-filter/movies.ts +++ b/ui/v2.5/src/models/list-filter/movies.ts @@ -10,7 +10,7 @@ import { DisplayMode } from "./types"; const defaultSortBy = "name"; -const sortByOptions = ["name", "random"] +const sortByOptions = ["name", "random", "date", "duration", "rating"] .map(ListFilterOptions.createSortBy) .concat([ { From cb6dab3c5f83e4cd9d947bc90b4aec0839058635 Mon Sep 17 00:00:00 2001 From: EnameEtavir <84581448+EnameEtavir@users.noreply.github.com> Date: Tue, 24 Aug 2021 07:18:30 +0200 Subject: [PATCH 40/51] Fix: config race conditions with RWMutex (#1645) * Fix: config race conditions with RWMutex Added RWMutex to config.Instance which read or write locks all instances where viper is used. Refactored checksum manager to only use config and not viper directly anymore. All stash viper operations are now "behind" the config.Instance and thus mutex "protected". --- pkg/manager/checksum.go | 7 +- pkg/manager/config/config.go | 177 +++++++++++++++++- pkg/manager/config/config_concurrency_test.go | 100 ++++++++++ .../src/components/Changelog/versions/v090.md | 1 + 4 files changed, 272 insertions(+), 13 deletions(-) create mode 100644 pkg/manager/config/config_concurrency_test.go diff --git a/pkg/manager/checksum.go b/pkg/manager/checksum.go index a545008b6..bc41ddfe1 100644 --- a/pkg/manager/checksum.go +++ b/pkg/manager/checksum.go @@ -4,7 +4,6 @@ import ( "context" "errors" - "github.com/spf13/viper" "github.com/stashapp/stash/pkg/logger" "github.com/stashapp/stash/pkg/manager/config" "github.com/stashapp/stash/pkg/models" @@ -26,16 +25,12 @@ func setInitialMD5Config(txnManager models.TransactionManager) { usingMD5 := count != 0 defaultAlgorithm := models.HashAlgorithmOshash - if usingMD5 { defaultAlgorithm = models.HashAlgorithmMd5 } - // TODO - this should use the config instance - viper.SetDefault(config.VideoFileNamingAlgorithm, defaultAlgorithm) - viper.SetDefault(config.CalculateMD5, usingMD5) - config := config.GetInstance() + config.SetChecksumDefaultValues(defaultAlgorithm, usingMD5) if err := config.Write(); err != nil { logger.Errorf("Error while writing configuration file: %s", err.Error()) } diff --git a/pkg/manager/config/config.go b/pkg/manager/config/config.go index 4a62c7cbc..eb1db30dc 100644 --- a/pkg/manager/config/config.go +++ b/pkg/manager/config/config.go @@ -9,6 +9,9 @@ import ( "runtime" "strings" + "sync" + //"github.com/sasha-s/go-deadlock" // if you have deadlock issues + "golang.org/x/crypto/bcrypt" "github.com/spf13/viper" @@ -165,6 +168,8 @@ func HasTLSConfig() bool { type Instance struct { cpuProfilePath string isNewSystem bool + sync.RWMutex + //deadlock.RWMutex // for deadlock testing/issues } var instance *Instance @@ -181,6 +186,8 @@ func (i *Instance) IsNewSystem() bool { } func (i *Instance) SetConfigFile(fn string) { + i.Lock() + defer i.Unlock() viper.SetConfigFile(fn) } @@ -192,6 +199,8 @@ func (i *Instance) GetCPUProfilePath() string { } func (i *Instance) Set(key string, value interface{}) { + i.Lock() + defer i.Unlock() viper.Set(key, value) } @@ -205,11 +214,15 @@ func (i *Instance) SetPassword(value string) { } func (i *Instance) Write() error { + i.Lock() + defer i.Unlock() return viper.WriteConfig() } // GetConfigFile returns the full path to the used configuration file. func (i *Instance) GetConfigFile() string { + i.RLock() + defer i.RUnlock() return viper.ConfigFileUsed() } @@ -226,6 +239,8 @@ func (i *Instance) GetDefaultDatabaseFilePath() string { } func (i *Instance) GetStashPaths() []*models.StashConfig { + i.RLock() + defer i.RUnlock() var ret []*models.StashConfig if err := viper.UnmarshalKey(Stash, &ret); err != nil || len(ret) == 0 { // fallback to legacy format @@ -243,30 +258,44 @@ func (i *Instance) GetStashPaths() []*models.StashConfig { } func (i *Instance) GetConfigFilePath() string { + i.RLock() + defer i.RUnlock() return viper.ConfigFileUsed() } func (i *Instance) GetCachePath() string { + i.RLock() + defer i.RUnlock() return viper.GetString(Cache) } func (i *Instance) GetGeneratedPath() string { + i.RLock() + defer i.RUnlock() return viper.GetString(Generated) } func (i *Instance) GetMetadataPath() string { + i.RLock() + defer i.RUnlock() return viper.GetString(Metadata) } func (i *Instance) GetDatabasePath() string { + i.RLock() + defer i.RUnlock() return viper.GetString(Database) } func (i *Instance) GetJWTSignKey() []byte { + i.RLock() + defer i.RUnlock() return []byte(viper.GetString(JWTSignKey)) } func (i *Instance) GetSessionStoreKey() []byte { + i.RLock() + defer i.RUnlock() return []byte(viper.GetString(SessionStoreKey)) } @@ -279,14 +308,20 @@ func (i *Instance) GetDefaultScrapersPath() string { } func (i *Instance) GetExcludes() []string { + i.RLock() + defer i.RUnlock() return viper.GetStringSlice(Exclude) } func (i *Instance) GetImageExcludes() []string { + i.RLock() + defer i.RUnlock() return viper.GetStringSlice(ImageExclude) } func (i *Instance) GetVideoExtensions() []string { + i.RLock() + defer i.RUnlock() ret := viper.GetStringSlice(VideoExtensions) if ret == nil { ret = defaultVideoExtensions @@ -295,6 +330,8 @@ func (i *Instance) GetVideoExtensions() []string { } func (i *Instance) GetImageExtensions() []string { + i.RLock() + defer i.RUnlock() ret := viper.GetStringSlice(ImageExtensions) if ret == nil { ret = defaultImageExtensions @@ -303,6 +340,8 @@ func (i *Instance) GetImageExtensions() []string { } func (i *Instance) GetGalleryExtensions() []string { + i.RLock() + defer i.RUnlock() ret := viper.GetStringSlice(GalleryExtensions) if ret == nil { ret = defaultGalleryExtensions @@ -311,10 +350,14 @@ func (i *Instance) GetGalleryExtensions() []string { } func (i *Instance) GetCreateGalleriesFromFolders() bool { + i.RLock() + defer i.RUnlock() return viper.GetBool(CreateGalleriesFromFolders) } func (i *Instance) GetLanguage() string { + i.RLock() + defer i.RUnlock() ret := viper.GetString(Language) // default to English @@ -328,12 +371,16 @@ func (i *Instance) GetLanguage() string { // IsCalculateMD5 returns true if MD5 checksums should be generated for // scene video files. func (i *Instance) IsCalculateMD5() bool { + i.RLock() + defer i.RUnlock() return viper.GetBool(CalculateMD5) } // GetVideoFileNamingAlgorithm returns what hash algorithm should be used for // naming generated scene video files. func (i *Instance) GetVideoFileNamingAlgorithm() models.HashAlgorithm { + i.RLock() + defer i.RUnlock() ret := viper.GetString(VideoFileNamingAlgorithm) // default to oshash @@ -345,22 +392,30 @@ func (i *Instance) GetVideoFileNamingAlgorithm() models.HashAlgorithm { } func (i *Instance) GetScrapersPath() string { + i.RLock() + defer i.RUnlock() return viper.GetString(ScrapersPath) } func (i *Instance) GetScraperUserAgent() string { + i.RLock() + defer i.RUnlock() return viper.GetString(ScraperUserAgent) } // GetScraperCDPPath gets the path to the Chrome executable or remote address // to an instance of Chrome. func (i *Instance) GetScraperCDPPath() string { + i.RLock() + defer i.RUnlock() return viper.GetString(ScraperCDPPath) } // GetScraperCertCheck returns true if the scraper should check for insecure // certificates when fetching an image or a page. func (i *Instance) GetScraperCertCheck() bool { + i.RLock() + defer i.RUnlock() ret := true if viper.IsSet(ScraperCertCheck) { ret = viper.GetBool(ScraperCertCheck) @@ -370,6 +425,8 @@ func (i *Instance) GetScraperCertCheck() bool { } func (i *Instance) GetScraperExcludeTagPatterns() []string { + i.RLock() + defer i.RUnlock() var ret []string if viper.IsSet(ScraperExcludeTagPatterns) { ret = viper.GetStringSlice(ScraperExcludeTagPatterns) @@ -379,6 +436,8 @@ func (i *Instance) GetScraperExcludeTagPatterns() []string { } func (i *Instance) GetStashBoxes() []*models.StashBox { + i.RLock() + defer i.RUnlock() var boxes []*models.StashBox viper.UnmarshalKey(StashBoxes, &boxes) return boxes @@ -392,34 +451,48 @@ func (i *Instance) GetDefaultPluginsPath() string { } func (i *Instance) GetPluginsPath() string { + i.RLock() + defer i.RUnlock() return viper.GetString(PluginsPath) } func (i *Instance) GetHost() string { + i.RLock() + defer i.RUnlock() return viper.GetString(Host) } func (i *Instance) GetPort() int { + i.RLock() + defer i.RUnlock() return viper.GetInt(Port) } func (i *Instance) GetExternalHost() string { + i.RLock() + defer i.RUnlock() return viper.GetString(ExternalHost) } // GetPreviewSegmentDuration returns the duration of a single segment in a // scene preview file, in seconds. func (i *Instance) GetPreviewSegmentDuration() float64 { + i.RLock() + defer i.RUnlock() return viper.GetFloat64(PreviewSegmentDuration) } // GetParallelTasks returns the number of parallel tasks that should be started // by scan or generate task. func (i *Instance) GetParallelTasks() int { + i.RLock() + defer i.RUnlock() return viper.GetInt(ParallelTasks) } func (i *Instance) GetParallelTasksWithAutoDetection() int { + i.RLock() + defer i.RUnlock() parallelTasks := viper.GetInt(ParallelTasks) if parallelTasks <= 0 { parallelTasks = (runtime.NumCPU() / 4) + 1 @@ -428,11 +501,15 @@ func (i *Instance) GetParallelTasksWithAutoDetection() int { } func (i *Instance) GetPreviewAudio() bool { + i.RLock() + defer i.RUnlock() return viper.GetBool(PreviewAudio) } // GetPreviewSegments returns the amount of segments in a scene preview file. func (i *Instance) GetPreviewSegments() int { + i.RLock() + defer i.RUnlock() return viper.GetInt(PreviewSegments) } @@ -443,6 +520,8 @@ func (i *Instance) GetPreviewSegments() int { // in the preview. If the value is suffixed with a '%' character (for example // '2%'), then it is interpreted as a proportion of the total video duration. func (i *Instance) GetPreviewExcludeStart() string { + i.RLock() + defer i.RUnlock() return viper.GetString(PreviewExcludeStart) } @@ -452,12 +531,16 @@ func (i *Instance) GetPreviewExcludeStart() string { // when generating previews. If the value is suffixed with a '%' character, // then it is interpreted as a proportion of the total video duration. func (i *Instance) GetPreviewExcludeEnd() string { + i.RLock() + defer i.RUnlock() return viper.GetString(PreviewExcludeEnd) } // GetPreviewPreset returns the preset when generating previews. Defaults to // Slow. func (i *Instance) GetPreviewPreset() models.PreviewPreset { + i.RLock() + defer i.RUnlock() ret := viper.GetString(PreviewPreset) // default to slow @@ -469,6 +552,8 @@ func (i *Instance) GetPreviewPreset() models.PreviewPreset { } func (i *Instance) GetMaxTranscodeSize() models.StreamingResolutionEnum { + i.RLock() + defer i.RUnlock() ret := viper.GetString(MaxTranscodeSize) // default to original @@ -480,6 +565,8 @@ func (i *Instance) GetMaxTranscodeSize() models.StreamingResolutionEnum { } func (i *Instance) GetMaxStreamingTranscodeSize() models.StreamingResolutionEnum { + i.RLock() + defer i.RUnlock() ret := viper.GetString(MaxStreamingTranscodeSize) // default to original @@ -491,19 +578,27 @@ func (i *Instance) GetMaxStreamingTranscodeSize() models.StreamingResolutionEnum } func (i *Instance) GetAPIKey() string { + i.RLock() + defer i.RUnlock() return viper.GetString(ApiKey) } func (i *Instance) GetUsername() string { + i.RLock() + defer i.RUnlock() return viper.GetString(Username) } func (i *Instance) GetPasswordHash() string { + i.RLock() + defer i.RUnlock() return viper.GetString(Password) } func (i *Instance) GetCredentials() (string, string) { if i.HasCredentials() { + i.RLock() + defer i.RUnlock() return viper.GetString(Username), viper.GetString(Password) } @@ -511,12 +606,14 @@ func (i *Instance) GetCredentials() (string, string) { } func (i *Instance) HasCredentials() bool { + i.RLock() + defer i.RUnlock() if !viper.IsSet(Username) || !viper.IsSet(Password) { return false } - username := i.GetUsername() - pwHash := i.GetPasswordHash() + username := viper.GetString(Username) + pwHash := viper.GetString(Password) return username != "" && pwHash != "" } @@ -565,6 +662,8 @@ func (i *Instance) ValidateStashBoxes(boxes []*models.StashBoxInput) error { // GetMaxSessionAge gets the maximum age for session cookies, in seconds. // Session cookie expiry times are refreshed every request. func (i *Instance) GetMaxSessionAge() int { + i.Lock() + defer i.Unlock() viper.SetDefault(MaxSessionAge, DefaultMaxSessionAge) return viper.GetInt(MaxSessionAge) } @@ -572,15 +671,21 @@ func (i *Instance) GetMaxSessionAge() int { // GetCustomServedFolders gets the map of custom paths to their applicable // filesystem locations func (i *Instance) GetCustomServedFolders() URLMap { + i.RLock() + defer i.RUnlock() return viper.GetStringMapString(CustomServedFolders) } func (i *Instance) GetCustomUILocation() string { + i.RLock() + defer i.RUnlock() return viper.GetString(CustomUILocation) } // Interface options func (i *Instance) GetMenuItems() []string { + i.RLock() + defer i.RUnlock() if viper.IsSet(MenuItems) { return viper.GetStringSlice(MenuItems) } @@ -588,46 +693,63 @@ func (i *Instance) GetMenuItems() []string { } func (i *Instance) GetSoundOnPreview() bool { + i.RLock() + defer i.RUnlock() return viper.GetBool(SoundOnPreview) } func (i *Instance) GetWallShowTitle() bool { + i.Lock() + defer i.Unlock() viper.SetDefault(WallShowTitle, true) return viper.GetBool(WallShowTitle) } func (i *Instance) GetCustomPerformerImageLocation() string { - // don't set the default, as it causes race condition crashes - // viper.SetDefault(CustomPerformerImageLocation, "") + i.Lock() + defer i.Unlock() + viper.SetDefault(CustomPerformerImageLocation, "") return viper.GetString(CustomPerformerImageLocation) } func (i *Instance) GetWallPlayback() string { + i.Lock() + defer i.Unlock() viper.SetDefault(WallPlayback, "video") return viper.GetString(WallPlayback) } func (i *Instance) GetMaximumLoopDuration() int { + i.Lock() + defer i.Unlock() viper.SetDefault(MaximumLoopDuration, 0) return viper.GetInt(MaximumLoopDuration) } func (i *Instance) GetAutostartVideo() bool { + i.Lock() + defer i.Unlock() viper.SetDefault(AutostartVideo, false) return viper.GetBool(AutostartVideo) } func (i *Instance) GetShowStudioAsText() bool { + i.Lock() + defer i.Unlock() viper.SetDefault(ShowStudioAsText, false) return viper.GetBool(ShowStudioAsText) } func (i *Instance) GetSlideshowDelay() int { + i.Lock() + defer i.Unlock() viper.SetDefault(SlideshowDelay, 5000) return viper.GetInt(SlideshowDelay) } func (i *Instance) GetCSSPath() string { + i.RLock() + defer i.RUnlock() // use custom.css in the same directory as the config file configFileUsed := viper.ConfigFileUsed() configDir := filepath.Dir(configFileUsed) @@ -655,6 +777,8 @@ func (i *Instance) GetCSS() string { } func (i *Instance) SetCSS(css string) { + i.RLock() + defer i.RUnlock() fn := i.GetCSSPath() buf := []byte(css) @@ -663,39 +787,53 @@ func (i *Instance) SetCSS(css string) { } func (i *Instance) GetCSSEnabled() bool { + i.RLock() + defer i.RUnlock() return viper.GetBool(CSSEnabled) } func (i *Instance) GetHandyKey() string { + i.RLock() + defer i.RUnlock() return viper.GetString(HandyKey) } // GetDLNAServerName returns the visible name of the DLNA server. If empty, // "stash" will be used. func (i *Instance) GetDLNAServerName() string { + i.RLock() + defer i.RUnlock() return viper.GetString(DLNAServerName) } // GetDLNADefaultEnabled returns true if the DLNA is enabled by default. func (i *Instance) GetDLNADefaultEnabled() bool { + i.RLock() + defer i.RUnlock() return viper.GetBool(DLNADefaultEnabled) } // GetDLNADefaultIPWhitelist returns a list of IP addresses/wildcards that // are allowed to use the DLNA service. func (i *Instance) GetDLNADefaultIPWhitelist() []string { + i.RLock() + defer i.RUnlock() return viper.GetStringSlice(DLNADefaultIPWhitelist) } // GetDLNAInterfaces returns a list of interface names to expose DLNA on. If // empty, runs on all interfaces. func (i *Instance) GetDLNAInterfaces() []string { + i.RLock() + defer i.RUnlock() return viper.GetStringSlice(DLNAInterfaces) } // GetLogFile returns the filename of the file to output logs to. // An empty string means that file logging will be disabled. func (i *Instance) GetLogFile() string { + i.RLock() + defer i.RUnlock() return viper.GetString(LogFile) } @@ -703,6 +841,8 @@ func (i *Instance) GetLogFile() string { // in addition to writing to a log file. Logging will be output to the // terminal if file logging is disabled. Defaults to true. func (i *Instance) GetLogOut() bool { + i.RLock() + defer i.RUnlock() ret := true if viper.IsSet(LogOut) { ret = viper.GetBool(LogOut) @@ -714,6 +854,8 @@ func (i *Instance) GetLogOut() bool { // GetLogLevel returns the lowest log level to write to the log. // Should be one of "Debug", "Info", "Warning", "Error" func (i *Instance) GetLogLevel() string { + i.RLock() + defer i.RUnlock() const defaultValue = "Info" value := viper.GetString(LogLevel) @@ -727,6 +869,8 @@ func (i *Instance) GetLogLevel() string { // GetLogAccess returns true if http requests should be logged to the terminal. // HTTP requests are not logged to the log file. Defaults to true. func (i *Instance) GetLogAccess() bool { + i.RLock() + defer i.RUnlock() ret := true if viper.IsSet(LogAccess) { ret = viper.GetBool(LogAccess) @@ -737,6 +881,8 @@ func (i *Instance) GetLogAccess() bool { // Max allowed graphql upload size in megabytes func (i *Instance) GetMaxUploadSize() int64 { + i.RLock() + defer i.RUnlock() ret := int64(1024) if viper.IsSet(MaxUploadSize) { ret = viper.GetInt64(MaxUploadSize) @@ -745,6 +891,8 @@ func (i *Instance) GetMaxUploadSize() int64 { } func (i *Instance) Validate() error { + i.RLock() + defer i.RUnlock() mandatoryPaths := []string{ Database, Generated, @@ -767,7 +915,22 @@ func (i *Instance) Validate() error { return nil } +func (i *Instance) SetChecksumDefaultValues(defaultAlgorithm models.HashAlgorithm, usingMD5 bool) { + i.Lock() + defer i.Unlock() + viper.SetDefault(VideoFileNamingAlgorithm, defaultAlgorithm) + viper.SetDefault(CalculateMD5, usingMD5) +} + func (i *Instance) setDefaultValues() error { + + // read data before write lock scope + defaultDatabaseFilePath := i.GetDefaultDatabaseFilePath() + defaultScrapersPath := i.GetDefaultScrapersPath() + defaultPluginsPath := i.GetDefaultPluginsPath() + + i.Lock() + defer i.Unlock() viper.SetDefault(ParallelTasks, parallelTasksDefault) viper.SetDefault(PreviewSegmentDuration, previewSegmentDurationDefault) viper.SetDefault(PreviewSegments, previewSegmentsDefault) @@ -776,14 +939,14 @@ func (i *Instance) setDefaultValues() error { viper.SetDefault(PreviewAudio, previewAudioDefault) viper.SetDefault(SoundOnPreview, false) - viper.SetDefault(Database, i.GetDefaultDatabaseFilePath()) + viper.SetDefault(Database, defaultDatabaseFilePath) // Set generated to the metadata path for backwards compat viper.SetDefault(Generated, viper.GetString(Metadata)) // Set default scrapers and plugins paths - viper.SetDefault(ScrapersPath, i.GetDefaultScrapersPath()) - viper.SetDefault(PluginsPath, i.GetDefaultPluginsPath()) + viper.SetDefault(ScrapersPath, defaultScrapersPath) + viper.SetDefault(PluginsPath, defaultPluginsPath) return viper.WriteConfig() } diff --git a/pkg/manager/config/config_concurrency_test.go b/pkg/manager/config/config_concurrency_test.go new file mode 100644 index 000000000..2f86f332e --- /dev/null +++ b/pkg/manager/config/config_concurrency_test.go @@ -0,0 +1,100 @@ +package config + +import ( + "sync" + "testing" +) + +// should be run with -race +func TestConcurrentConfigAccess(t *testing.T) { + i := GetInstance() + + const workers = 8 + //const loops = 1000 + const loops = 200 + var wg sync.WaitGroup + for t := 0; t < workers; t++ { + wg.Add(1) + go func() { + for l := 0; l < loops; l++ { + i.SetInitialConfig() + + i.HasCredentials() + i.GetCPUProfilePath() + i.GetConfigFile() + i.GetConfigPath() + i.GetDefaultDatabaseFilePath() + i.GetStashPaths() + i.GetConfigFilePath() + i.Set(Cache, i.GetCachePath()) + i.Set(Generated, i.GetGeneratedPath()) + i.Set(Metadata, i.GetMetadataPath()) + i.Set(Database, i.GetDatabasePath()) + i.Set(JWTSignKey, i.GetJWTSignKey()) + i.Set(SessionStoreKey, i.GetSessionStoreKey()) + i.GetDefaultScrapersPath() + i.Set(Exclude, i.GetExcludes()) + i.Set(ImageExclude, i.GetImageExcludes()) + i.Set(VideoExtensions, i.GetVideoExtensions()) + i.Set(ImageExtensions, i.GetImageExtensions()) + i.Set(GalleryExtensions, i.GetGalleryExtensions()) + i.Set(CreateGalleriesFromFolders, i.GetCreateGalleriesFromFolders()) + i.Set(Language, i.GetLanguage()) + i.Set(VideoFileNamingAlgorithm, i.GetVideoFileNamingAlgorithm()) + i.Set(ScrapersPath, i.GetScrapersPath()) + i.Set(ScraperUserAgent, i.GetScraperUserAgent()) + i.Set(ScraperCDPPath, i.GetScraperCDPPath()) + i.Set(ScraperCertCheck, i.GetScraperCertCheck()) + i.Set(ScraperExcludeTagPatterns, i.GetScraperExcludeTagPatterns()) + i.Set(StashBoxes, i.GetStashBoxes()) + i.GetDefaultPluginsPath() + i.Set(PluginsPath, i.GetPluginsPath()) + i.Set(Host, i.GetHost()) + i.Set(Port, i.GetPort()) + i.Set(ExternalHost, i.GetExternalHost()) + i.Set(PreviewSegmentDuration, i.GetPreviewSegmentDuration()) + i.Set(ParallelTasks, i.GetParallelTasks()) + i.Set(ParallelTasks, i.GetParallelTasksWithAutoDetection()) + i.Set(PreviewAudio, i.GetPreviewAudio()) + i.Set(PreviewSegments, i.GetPreviewSegments()) + i.Set(PreviewExcludeStart, i.GetPreviewExcludeStart()) + i.Set(PreviewExcludeEnd, i.GetPreviewExcludeEnd()) + i.Set(PreviewPreset, i.GetPreviewPreset()) + i.Set(MaxTranscodeSize, i.GetMaxTranscodeSize()) + i.Set(MaxStreamingTranscodeSize, i.GetMaxStreamingTranscodeSize()) + i.Set(ApiKey, i.GetAPIKey()) + i.Set(Username, i.GetUsername()) + i.Set(Password, i.GetPasswordHash()) + i.GetCredentials() + i.Set(MaxSessionAge, i.GetMaxSessionAge()) + i.Set(CustomServedFolders, i.GetCustomServedFolders()) + i.Set(CustomUILocation, i.GetCustomUILocation()) + i.Set(MenuItems, i.GetMenuItems()) + i.Set(SoundOnPreview, i.GetSoundOnPreview()) + i.Set(WallShowTitle, i.GetWallShowTitle()) + i.Set(CustomPerformerImageLocation, i.GetCustomPerformerImageLocation()) + i.Set(WallPlayback, i.GetWallPlayback()) + i.Set(MaximumLoopDuration, i.GetMaximumLoopDuration()) + i.Set(AutostartVideo, i.GetAutostartVideo()) + i.Set(ShowStudioAsText, i.GetShowStudioAsText()) + i.Set(SlideshowDelay, i.GetSlideshowDelay()) + i.GetCSSPath() + i.GetCSS() + i.Set(CSSEnabled, i.GetCSSEnabled()) + i.Set(HandyKey, i.GetHandyKey()) + i.Set(DLNAServerName, i.GetDLNAServerName()) + i.Set(DLNADefaultEnabled, i.GetDLNADefaultEnabled()) + i.Set(DLNADefaultIPWhitelist, i.GetDLNADefaultIPWhitelist()) + i.Set(DLNAInterfaces, i.GetDLNAInterfaces()) + i.Set(LogFile, i.GetLogFile()) + i.Set(LogOut, i.GetLogOut()) + i.Set(LogLevel, i.GetLogLevel()) + i.Set(LogAccess, i.GetLogAccess()) + i.Set(MaxUploadSize, i.GetMaxUploadSize()) + } + wg.Done() + }() + } + + wg.Wait() +} diff --git a/ui/v2.5/src/components/Changelog/versions/v090.md b/ui/v2.5/src/components/Changelog/versions/v090.md index 7dfbbdcc1..929556c08 100644 --- a/ui/v2.5/src/components/Changelog/versions/v090.md +++ b/ui/v2.5/src/components/Changelog/versions/v090.md @@ -25,6 +25,7 @@ * Added de-DE language option. ([#1578](https://github.com/stashapp/stash/pull/1578)) ### 🐛 Bug fixes +* Fix race condition panic when reading and writing config concurrently. ([#1645](https://github.com/stashapp/stash/issues/1343)) * Fix performance issue on Studios page getting studio image count. ([#1643](https://github.com/stashapp/stash/pull/1643)) * Regenerate scene phash if overwrite flag is set. ([#1633](https://github.com/stashapp/stash/pull/1633)) * Create .stash directory in $HOME only if required. ([#1623](https://github.com/stashapp/stash/pull/1623)) From 177339c14e2a959a8fdca89c667fe7a1a1e986b9 Mon Sep 17 00:00:00 2001 From: Still Hsu Date: Thu, 26 Aug 2021 06:51:54 +0800 Subject: [PATCH 41/51] Update zh-tw strings & fix various hard strings (#1666) * Update unlocalized strings & fix various hard strings * Fix incorrect placement of ignore_organized in en-US * Add missing strings * Fix hard string in PerformerList --- ui/v2.5/.vscode/settings.json | 11 +++++- .../components/Performers/PerformerList.tsx | 2 +- .../DirectorySelectionDialog.tsx | 4 +-- ui/v2.5/src/components/Shared/ImageInput.tsx | 9 +++-- ui/v2.5/src/locales/en-GB.json | 6 +++- ui/v2.5/src/locales/en-US.json | 8 +++-- ui/v2.5/src/locales/zh-TW.json | 36 ++++++++++++++----- 7 files changed, 58 insertions(+), 18 deletions(-) diff --git a/ui/v2.5/.vscode/settings.json b/ui/v2.5/.vscode/settings.json index 5265cba16..ba5be62ee 100644 --- a/ui/v2.5/.vscode/settings.json +++ b/ui/v2.5/.vscode/settings.json @@ -13,5 +13,14 @@ "src/locales" ], "i18n-ally.keystyle": "nested", - "i18n-ally.sourceLanguage": "en-GB" + "i18n-ally.sourceLanguage": "en-GB", + "spellright.language": [ + "en" + ], + "spellright.documentTypes": [ + "markdown", + "latex", + "plaintext", + "typescriptreact" + ] } \ No newline at end of file diff --git a/ui/v2.5/src/components/Performers/PerformerList.tsx b/ui/v2.5/src/components/Performers/PerformerList.tsx index d6019e81e..cdff5c00a 100644 --- a/ui/v2.5/src/components/Performers/PerformerList.tsx +++ b/ui/v2.5/src/components/Performers/PerformerList.tsx @@ -39,7 +39,7 @@ export const PerformerList: React.FC = ({ const otherOperations = [ { - text: "Open Random", + text: intl.formatMessage({ id: "actions.open_random" }), onClick: getRandom, }, { diff --git a/ui/v2.5/src/components/Settings/SettingsTasksPanel/DirectorySelectionDialog.tsx b/ui/v2.5/src/components/Settings/SettingsTasksPanel/DirectorySelectionDialog.tsx index d534e1001..0c5a4f179 100644 --- a/ui/v2.5/src/components/Settings/SettingsTasksPanel/DirectorySelectionDialog.tsx +++ b/ui/v2.5/src/components/Settings/SettingsTasksPanel/DirectorySelectionDialog.tsx @@ -35,12 +35,12 @@ export const DirectorySelectionDialog: React.FC show disabled={paths.length === 0} icon="pencil-alt" - header="Select folders" + header={intl.formatMessage({ id: "actions.select_folders" })} accept={{ onClick: () => { props.onClose(paths); }, - text: "Confirm", + text: intl.formatMessage({ id: "actions.confirm" }), }} cancel={{ onClick: () => props.onClose(), diff --git a/ui/v2.5/src/components/Shared/ImageInput.tsx b/ui/v2.5/src/components/Shared/ImageInput.tsx index aaea404a2..3417cb7c9 100644 --- a/ui/v2.5/src/components/Shared/ImageInput.tsx +++ b/ui/v2.5/src/components/Shared/ImageInput.tsx @@ -36,7 +36,9 @@ export const ImageInput: React.FC = ({ // just return the file input return ( - + = ({ show={!!isShowDialog} onHide={() => setIsShowDialog(false)} header={intl.formatMessage({ id: "dialogs.set_image_url_title" })} - accept={{ onClick: onConfirmURL, text: "Confirm" }} + accept={{ + onClick: onConfirmURL, + text: intl.formatMessage({ id: "actions.confirm" }), + }} >
    diff --git a/ui/v2.5/src/locales/en-GB.json b/ui/v2.5/src/locales/en-GB.json index dfa998624..2ffd8cc45 100644 --- a/ui/v2.5/src/locales/en-GB.json +++ b/ui/v2.5/src/locales/en-GB.json @@ -79,7 +79,11 @@ }, "temp_disable": "Disable temporarily…", "temp_enable": "Enable temporarily…", - "view_random": "View Random" + "view_random": "View Random", + "confirm": "Confirm", + "select_folders": "Select folders", + "browse_for_image": "Browse for image…", + "open_random": "Open Random" }, "actions_name": "Actions", "age": "Age", diff --git a/ui/v2.5/src/locales/en-US.json b/ui/v2.5/src/locales/en-US.json index ecc49e3dd..dc2af732f 100644 --- a/ui/v2.5/src/locales/en-US.json +++ b/ui/v2.5/src/locales/en-US.json @@ -3,9 +3,11 @@ "favourite": "Favorite", "hair_color": "Hair Color", "organized": "Organized", - "tools": { - "scene_filename_parser": { - "ignore_organized": "Ignore organized scenes" + "config": { + "tools": { + "scene_filename_parser": { + "ignore_organized": "Ignore organized scenes" + } } } } diff --git a/ui/v2.5/src/locales/zh-TW.json b/ui/v2.5/src/locales/zh-TW.json index 935f1ba6e..24add9259 100644 --- a/ui/v2.5/src/locales/zh-TW.json +++ b/ui/v2.5/src/locales/zh-TW.json @@ -79,7 +79,11 @@ "merge_from": "與其他項目合併", "save_filter": "儲存過濾條件", "set_as_default": "設為預設", - "merge_into": "合併至其他項目" + "merge_into": "合併至其他項目", + "confirm": "確認", + "select_folders": "選擇資料夾", + "browse_for_image": "選擇圖像…", + "open_random": "隨機開啟" }, "actions_name": "動作", "age": "年齡", @@ -220,7 +224,7 @@ "maximum_streaming_transcode_size_head": "最大的串流轉碼解析度大小", "maximum_transcode_size_desc": "轉碼生成的影片最大大小", "maximum_transcode_size_head": "最大的轉碼解析度大小", - "number_of_parallel_task_for_scan_generation_desc": "設置為 0 以自動偵測。請注意,運行比使用 100% CPU 使用率所需的排成數量,可能會降低性能並導致其他問題。", + "number_of_parallel_task_for_scan_generation_desc": "設置為 0 以自動偵測。請注意,運行比使用 100% CPU 使用率所需的排程數量,可能會降低性能並導致其他問題。", "number_of_parallel_task_for_scan_generation_head": "掃描/生成的並行排程數量", "parallel_scan_head": "並行掃描/生成", "preview_generation": "預覽檔案生成", @@ -255,7 +259,7 @@ "title": "Stash-box 端點" }, "tasks": { - "added_job_to_queue": "已新增『{operation_name}』至作業排成", + "added_job_to_queue": "已將『{operation_name}』加入至工作排程", "auto_tag_based_on_filenames": "根據檔案名稱自動標記內容。", "auto_tagging": "自動套用標籤", "backing_up_database": "備份資料庫中", @@ -295,7 +299,8 @@ "select_parser_recipe": "選擇預設分析字串", "title": "短片名稱分析工具", "whitespace_chars": "空白字元", - "whitespace_chars_desc": "這些字元將在標題中被的空格替換" + "whitespace_chars_desc": "這些字元將在標題中被的空格替換", + "ignore_organized": "忽略已整理的短片" }, "scene_tools": "短片工具" }, @@ -390,7 +395,9 @@ "matches_regex": "符合正則表達式", "not_equals": "不是", "not_matches_regex": "不符合正則表達式", - "not_null": "不為空" + "not_null": "不為空", + "between": "與 ... 之間", + "not_between": "不與 ... 之間" }, "date": "日期", "death_date": "去世日期", @@ -580,12 +587,12 @@ "title": "標題", "toast": { "added_entity": "已新增{singularEntity}", - "added_generation_job_to_queue": "將生成作業新增至工作排程", + "added_generation_job_to_queue": "已將『生成作業』加入至工作排程", "delete_entity": "刪除{singularEntity}", "delete_past_tense": "已刪除{singularEntity}", "generating_screenshot": "產生截圖中…", "rescanning_entity": "重新掃描{singularEntity}中…", - "started_auto_tagging": "已開始自動套用標籤", + "started_auto_tagging": "已將『自動套用標籤』加入至工作排程", "updated_entity": "已更新{entity}", "merged_tags": "已合併的標籤", "create_entity": "已建立 {entity}", @@ -605,5 +612,18 @@ "filter": "過濾", "filter_name": "過濾條件名稱", "detail": "詳情", - "include_child_studios": "包含子工作室" + "include_child_studios": "包含子工作室", + "criterion": { + "greater_than": "大於", + "less_than": "小於", + "value": "數值" + }, + "custom": "自訂", + "frames_per_second": "{value} 幀/秒", + "megabits_per_second": "{value} megabits/秒", + "tools": { + "scene_filename_parser": { + "ignore_organized": "忽略已整理的短片" + } + } } From 4c144db5107302cb90adf6d4dd3ad1544d335060 Mon Sep 17 00:00:00 2001 From: gitgiggety <79809426+gitgiggety@users.noreply.github.com> Date: Thu, 26 Aug 2021 01:41:18 +0200 Subject: [PATCH 42/51] Performers listing improvements (#1671) * Add sorting on image and gallery count to performers * Make performer table headers translatable * Add image and gallery count to performers table * Make sure list table container fits the table Make the table container minimally as wide as the table. This fixes the table "overflowing" to the left and right and the left not being accessible. * Remove unnecessary truncation in tables IMO there is no need to truncate the title in the scenes table and the name in the performers table. This because both tables also contain an image which means that multiple lines should be possible without really extending the height of the row. Furthermore both tables contain other values which might be way longer and also aren't wrapped (like tags and performers for scenes, and aliases for performers). --- pkg/sqlite/performer.go | 6 ++++ .../src/components/Changelog/versions/v090.md | 1 + .../Performers/PerformerListTable.tsx | 33 +++++++++++++------ .../src/components/Scenes/SceneListTable.tsx | 8 ++--- ui/v2.5/src/index.scss | 4 +++ ui/v2.5/src/models/list-filter/performers.ts | 8 +++++ 6 files changed, 44 insertions(+), 16 deletions(-) diff --git a/pkg/sqlite/performer.go b/pkg/sqlite/performer.go index 4c7c4697a..0cba2dcfe 100644 --- a/pkg/sqlite/performer.go +++ b/pkg/sqlite/performer.go @@ -500,6 +500,12 @@ func (qb *performerQueryBuilder) getPerformerSort(findFilter *models.FindFilterT if sort == "scenes_count" { return getCountSort(performerTable, performersScenesTable, performerIDColumn, direction) } + if sort == "images_count" { + return getCountSort(performerTable, performersImagesTable, performerIDColumn, direction) + } + if sort == "galleries_count" { + return getCountSort(performerTable, performersGalleriesTable, performerIDColumn, direction) + } return getSort(sort, direction, "performers") } diff --git a/ui/v2.5/src/components/Changelog/versions/v090.md b/ui/v2.5/src/components/Changelog/versions/v090.md index 929556c08..b53c8a86b 100644 --- a/ui/v2.5/src/components/Changelog/versions/v090.md +++ b/ui/v2.5/src/components/Changelog/versions/v090.md @@ -1,4 +1,5 @@ ### ✨ New Features +* Added sort by options for image and gallery count for performers. ([#1671](https://github.com/stashapp/stash/pull/1671)) * Added sort by options for date, duration and rating for movies. ([#1663](https://github.com/stashapp/stash/pull/1663)) * Allow saving query page zoom level in saved and default filters. ([#1636](https://github.com/stashapp/stash/pull/1636)) * Support custom page sizes in the query page size dropdown. ([#1636](https://github.com/stashapp/stash/pull/1636)) diff --git a/ui/v2.5/src/components/Performers/PerformerListTable.tsx b/ui/v2.5/src/components/Performers/PerformerListTable.tsx index c746b1e9d..c96e4ce1b 100644 --- a/ui/v2.5/src/components/Performers/PerformerListTable.tsx +++ b/ui/v2.5/src/components/Performers/PerformerListTable.tsx @@ -1,10 +1,11 @@ /* eslint-disable jsx-a11y/control-has-associated-label */ import React from "react"; +import { useIntl } from "react-intl"; import { Button, Table } from "react-bootstrap"; import { Link } from "react-router-dom"; import * as GQL from "src/core/generated-graphql"; -import { Icon, TruncatedText } from "src/components/Shared"; +import { Icon } from "src/components/Shared"; import { NavUtils } from "src/utils"; interface IPerformerListTableProps { @@ -14,6 +15,8 @@ interface IPerformerListTableProps { export const PerformerListTable: React.FC = ( props: IPerformerListTableProps ) => { + const intl = useIntl(); + const renderPerformerRow = (performer: GQL.PerformerDataFragment) => (
    @@ -45,6 +46,16 @@ export const PerformerListTable: React.FC = (
    {performer.scene_count}
    +
    + @@ -56,12 +67,14 @@ export const PerformerListTable: React.FC = ( - - - - - + + + + + + + + {props.performers.map(renderPerformerRow)} diff --git a/ui/v2.5/src/components/Scenes/SceneListTable.tsx b/ui/v2.5/src/components/Scenes/SceneListTable.tsx index c6b20c382..d5b8f8f02 100644 --- a/ui/v2.5/src/components/Scenes/SceneListTable.tsx +++ b/ui/v2.5/src/components/Scenes/SceneListTable.tsx @@ -5,7 +5,7 @@ import { Table, Button, Form } from "react-bootstrap"; import { Link } from "react-router-dom"; import * as GQL from "src/core/generated-graphql"; import { NavUtils, TextUtils } from "src/utils"; -import { Icon, TruncatedText } from "src/components/Shared"; +import { Icon } from "src/components/Shared"; import { FormattedMessage } from "react-intl"; interface ISceneListTableProps { @@ -80,11 +80,7 @@ export const SceneListTable: React.FC = ( diff --git a/ui/v2.5/src/index.scss b/ui/v2.5/src/index.scss index 06b563582..c290aaeeb 100755 --- a/ui/v2.5/src/index.scss +++ b/ui/v2.5/src/index.scss @@ -89,6 +89,10 @@ textarea.text-input { overflow-y: scroll; } +.table-list { + min-width: min-content; +} + .table-list a { color: $text-color; } diff --git a/ui/v2.5/src/models/list-filter/performers.ts b/ui/v2.5/src/models/list-filter/performers.ts index 6fc10e5bf..4cc5eb045 100644 --- a/ui/v2.5/src/models/list-filter/performers.ts +++ b/ui/v2.5/src/models/list-filter/performers.ts @@ -27,6 +27,14 @@ const sortByOptions = [ messageID: "scene_count", value: "scenes_count", }, + { + messageID: "image_count", + value: "images_count", + }, + { + messageID: "gallery_count", + value: "galleries_count", + }, ]); const displayModeOptions = [ From 3f888a03351f80331654aa348fd8f151c70969f8 Mon Sep 17 00:00:00 2001 From: gitgiggety <79809426+gitgiggety@users.noreply.github.com> Date: Thu, 26 Aug 2021 02:03:56 +0200 Subject: [PATCH 43/51] Fix error when creating scene queue of single item (#1674) * Fix error when creating scene queue of single item --- ui/v2.5/src/components/Changelog/versions/v090.md | 1 + ui/v2.5/src/models/sceneQueue.ts | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ui/v2.5/src/components/Changelog/versions/v090.md b/ui/v2.5/src/components/Changelog/versions/v090.md index b53c8a86b..24d211f04 100644 --- a/ui/v2.5/src/components/Changelog/versions/v090.md +++ b/ui/v2.5/src/components/Changelog/versions/v090.md @@ -26,6 +26,7 @@ * Added de-DE language option. ([#1578](https://github.com/stashapp/stash/pull/1578)) ### 🐛 Bug fixes +* Fix Play Selected scene UI error when one scene is selected. ([#1674](https://github.com/stashapp/stash/pull/1674)) * Fix race condition panic when reading and writing config concurrently. ([#1645](https://github.com/stashapp/stash/issues/1343)) * Fix performance issue on Studios page getting studio image count. ([#1643](https://github.com/stashapp/stash/pull/1643)) * Regenerate scene phash if overwrite flag is set. ([#1633](https://github.com/stashapp/stash/pull/1633)) diff --git a/ui/v2.5/src/models/sceneQueue.ts b/ui/v2.5/src/models/sceneQueue.ts index 512927bde..a1d2516e8 100644 --- a/ui/v2.5/src/models/sceneQueue.ts +++ b/ui/v2.5/src/models/sceneQueue.ts @@ -103,7 +103,9 @@ export class SceneQueue { ret.query = query; } else if (parsed.qs) { // must be scene list - ret.sceneIDs = parsed.qs.map((v) => Number(v)); + ret.sceneIDs = Array.isArray(parsed.qs) + ? parsed.qs.map((v) => Number(v)) + : [Number(parsed.qs)]; } return ret; From e98302fcd030f860d9d4e363e23211b72b4dd024 Mon Sep 17 00:00:00 2001 From: gitgiggety <79809426+gitgiggety@users.noreply.github.com> Date: Thu, 26 Aug 2021 02:18:13 +0200 Subject: [PATCH 44/51] Add image and gallery count to tag listing (#1672) --- .../src/components/Changelog/versions/v090.md | 1 + ui/v2.5/src/components/Tags/TagList.tsx | 35 ++++++++++++++++++- 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/ui/v2.5/src/components/Changelog/versions/v090.md b/ui/v2.5/src/components/Changelog/versions/v090.md index 24d211f04..2d2798242 100644 --- a/ui/v2.5/src/components/Changelog/versions/v090.md +++ b/ui/v2.5/src/components/Changelog/versions/v090.md @@ -11,6 +11,7 @@ * Added not equals/greater than/less than modifiers for resolution criteria. ([#1568](https://github.com/stashapp/stash/pull/1568)) ### 🎨 Improvements +* Add image and gallery counts to tag list view. ([#1672](https://github.com/stashapp/stash/pull/1672)) * Prompt when leaving gallery edit page with unsaved changes. ([#1654](https://github.com/stashapp/stash/pull/1654)) * Show largest duplicates first in scene duplicate checker. ([#1639](https://github.com/stashapp/stash/pull/1639)) * Added checkboxes to scene list view. ([#1642](https://github.com/stashapp/stash/pull/1642)) diff --git a/ui/v2.5/src/components/Tags/TagList.tsx b/ui/v2.5/src/components/Tags/TagList.tsx index bf29af891..d96320e85 100644 --- a/ui/v2.5/src/components/Tags/TagList.tsx +++ b/ui/v2.5/src/components/Tags/TagList.tsx @@ -266,6 +266,34 @@ export const TagList: React.FC = ({ filterHook }) => { : + + - - )} - - {onDelete && ( - - {intl.formatMessage({ id: "actions.delete" })} - - } - > - - - )} + {buttons.map((button) => { + return ( + {button.text}} + > + + + ); + })} ); } @@ -165,7 +184,7 @@ export const ListOperationButtons: React.FC = ({ return ( <> - {maybeRenderSelectedButtons()} + {maybeRenderButtons()}
    {renderMore()}
    diff --git a/ui/v2.5/src/components/Scenes/SceneList.tsx b/ui/v2.5/src/components/Scenes/SceneList.tsx index 65eb6bed0..8f64035ec 100644 --- a/ui/v2.5/src/components/Scenes/SceneList.tsx +++ b/ui/v2.5/src/components/Scenes/SceneList.tsx @@ -3,6 +3,7 @@ import _ from "lodash"; import { useIntl } from "react-intl"; import { useHistory } from "react-router-dom"; import Mousetrap from "mousetrap"; +import { IconProp } from "@fortawesome/fontawesome-svg-core"; import { FindScenesQueryResult, SlimSceneDataFragment, @@ -44,6 +45,7 @@ export const SceneList: React.FC = ({ text: intl.formatMessage({ id: "actions.play_selected" }), onClick: playSelected, isDisplayed: showWhenSelected, + icon: "play" as IconProp, }, { text: intl.formatMessage({ id: "actions.play_random" }), diff --git a/ui/v2.5/src/hooks/ListHook.tsx b/ui/v2.5/src/hooks/ListHook.tsx index 3a5ebb2a1..0d9d040d4 100644 --- a/ui/v2.5/src/hooks/ListHook.tsx +++ b/ui/v2.5/src/hooks/ListHook.tsx @@ -10,6 +10,7 @@ import React, { import { ApolloError } from "@apollo/client"; import { useHistory, useLocation } from "react-router-dom"; import Mousetrap from "mousetrap"; +import { IconProp } from "@fortawesome/fontawesome-svg-core"; import { SlimSceneDataFragment, SceneMarkerDataFragment, @@ -96,6 +97,8 @@ export interface IListHookOperation { selectedIds: Set ) => boolean; postRefetch?: boolean; + icon?: IconProp; + buttonVariant?: string; } export enum PersistanceLevel { @@ -357,6 +360,8 @@ const RenderList = < return true; }, + icon: o.icon, + buttonVariant: o.buttonVariant, })); function onEdit() { From 50217f63189e6bd75c2699fdb64bda340739aae3 Mon Sep 17 00:00:00 2001 From: gitgiggety <79809426+gitgiggety@users.noreply.github.com> Date: Thu, 26 Aug 2021 03:24:49 +0200 Subject: [PATCH 46/51] Rebuild image edit using formik (#1669) * Rebuild image edit using formik * Prompt on page leave when changes are not saved * Only enables save when changes are made * Wrap in
    (not sure if this does anything) --- .../src/components/Changelog/versions/v090.md | 2 +- .../Images/ImageDetails/ImageEditPanel.tsx | 260 +++++++++++------- 2 files changed, 161 insertions(+), 101 deletions(-) diff --git a/ui/v2.5/src/components/Changelog/versions/v090.md b/ui/v2.5/src/components/Changelog/versions/v090.md index b84aba52c..62219fc91 100644 --- a/ui/v2.5/src/components/Changelog/versions/v090.md +++ b/ui/v2.5/src/components/Changelog/versions/v090.md @@ -13,7 +13,7 @@ ### 🎨 Improvements * Move Play Selected Scenes, and Add/Remove Gallery Image buttons to button toolbar. ([#1673](https://github.com/stashapp/stash/pull/1673)) * Add image and gallery counts to tag list view. ([#1672](https://github.com/stashapp/stash/pull/1672)) -* Prompt when leaving gallery edit page with unsaved changes. ([#1654](https://github.com/stashapp/stash/pull/1654)) +* Prompt when leaving gallery and image edit pages with unsaved changes. ([#1654](https://github.com/stashapp/stash/pull/1654), [#1669](https://github.com/stashapp/stash/pull/1669)) * Show largest duplicates first in scene duplicate checker. ([#1639](https://github.com/stashapp/stash/pull/1639)) * Added checkboxes to scene list view. ([#1642](https://github.com/stashapp/stash/pull/1642)) * Added keyboard shortcuts for scene queue navigation. ([#1635](https://github.com/stashapp/stash/pull/1635)) diff --git a/ui/v2.5/src/components/Images/ImageDetails/ImageEditPanel.tsx b/ui/v2.5/src/components/Images/ImageDetails/ImageEditPanel.tsx index efeae41bc..ffce99e37 100644 --- a/ui/v2.5/src/components/Images/ImageDetails/ImageEditPanel.tsx +++ b/ui/v2.5/src/components/Images/ImageDetails/ImageEditPanel.tsx @@ -3,6 +3,7 @@ import { Button, Form, Col, Row } from "react-bootstrap"; import { FormattedMessage, useIntl } from "react-intl"; import Mousetrap from "mousetrap"; import * as GQL from "src/core/generated-graphql"; +import * as yup from "yup"; import { useImageUpdate } from "src/core/StashService"; import { PerformerSelect, @@ -12,6 +13,8 @@ import { } from "src/components/Shared"; import { useToast } from "src/hooks"; import { FormUtils } from "src/utils"; +import { useFormik } from "formik"; +import { Prompt } from "react-router"; import { RatingStars } from "src/components/Scenes/SceneDetails/RatingStars"; interface IProps { @@ -27,25 +30,44 @@ export const ImageEditPanel: React.FC = ({ }) => { const intl = useIntl(); const Toast = useToast(); - const [title, setTitle] = useState(image?.title ?? ""); - const [rating, setRating] = useState(image.rating ?? NaN); - const [studioId, setStudioId] = useState( - image.studio?.id ?? undefined - ); - const [performerIds, setPerformerIds] = useState( - image.performers.map((p) => p.id) - ); - const [tagIds, setTagIds] = useState(image.tags.map((t) => t.id)); // Network state const [isLoading, setIsLoading] = useState(false); const [updateImage] = useImageUpdate(); + const schema = yup.object({ + title: yup.string().optional().nullable(), + rating: yup.number().optional().nullable(), + studio_id: yup.string().optional().nullable(), + performer_ids: yup.array(yup.string().required()).optional().nullable(), + tag_ids: yup.array(yup.string().required()).optional().nullable(), + }); + + const initialValues = { + title: image.title ?? "", + rating: image.rating ?? null, + studio_id: image.studio?.id, + performer_ids: (image.performers ?? []).map((p) => p.id), + tag_ids: (image.tags ?? []).map((t) => t.id), + }; + + type InputValues = typeof initialValues; + + const formik = useFormik({ + initialValues, + validationSchema: schema, + onSubmit: (values) => onSave(getImageInput(values)), + }); + + function setRating(v: number) { + formik.setFieldValue("rating", v); + } + useEffect(() => { if (isVisible) { Mousetrap.bind("s s", () => { - onSave(); + formik.handleSubmit(); }); Mousetrap.bind("d d", () => { onDelete(); @@ -84,23 +106,19 @@ export const ImageEditPanel: React.FC = ({ } }); - function getImageInput(): GQL.ImageUpdateInput { + function getImageInput(input: InputValues): GQL.ImageUpdateInput { return { id: image.id, - title, - rating: rating ?? null, - studio_id: studioId ?? null, - performer_ids: performerIds, - tag_ids: tagIds, + ...input, }; } - async function onSave() { + async function onSave(input: GQL.ImageUpdateInput) { setIsLoading(true); try { const result = await updateImage({ variables: { - input: getImageInput(), + input, }, }); if (result.data?.imageUpdate) { @@ -110,6 +128,7 @@ export const ImageEditPanel: React.FC = ({ { entity: intl.formatMessage({ id: "image" }).toLocaleLowerCase() } ), }); + formik.resetForm({ values: formik.values }); } } catch (e) { Toast.error(e); @@ -117,97 +136,138 @@ export const ImageEditPanel: React.FC = ({ setIsLoading(false); } + function renderTextField(field: string, title: string, placeholder?: string) { + return ( + + {FormUtils.renderLabel({ + title, + })} +
    + + + {formik.getFieldMeta(field).error} + + + + ); + } + if (isLoading) return ; return (
    -
    -
    - - + + + +
    +
    + + +
    -
    -
    -
    - {FormUtils.renderInputGroup({ - title: intl.formatMessage({ id: "title" }), - value: title, - onChange: setTitle, - isEditing: true, - })} - - {FormUtils.renderLabel({ - title: intl.formatMessage({ id: "rating" }), - })} -
    - setRating(value ?? NaN)} - /> - - +
    +
    + {renderTextField("title", intl.formatMessage({ id: "title" }))} + + {FormUtils.renderLabel({ + title: intl.formatMessage({ id: "rating" }), + })} +
    + + formik.setFieldValue("rating", value ?? null) + } + /> + + - - {FormUtils.renderLabel({ - title: intl.formatMessage({ id: "studio" }), - })} - - - setStudioId(items.length > 0 ? items[0]?.id : undefined) - } - ids={studioId ? [studioId] : []} - /> - - + + {FormUtils.renderLabel({ + title: intl.formatMessage({ id: "studio" }), + })} + + + formik.setFieldValue( + "studio_id", + items.length > 0 ? items[0]?.id : null + ) + } + ids={formik.values.studio_id ? [formik.values.studio_id] : []} + /> + + - - {FormUtils.renderLabel({ - title: intl.formatMessage({ id: "performers" }), - labelProps: { - column: true, - sm: 3, - xl: 12, - }, - })} - - - setPerformerIds(items.map((item) => item.id)) - } - ids={performerIds} - /> - - + + {FormUtils.renderLabel({ + title: intl.formatMessage({ id: "performers" }), + labelProps: { + column: true, + sm: 3, + xl: 12, + }, + })} + + + formik.setFieldValue( + "performer_ids", + items.map((item) => item.id) + ) + } + ids={formik.values.performer_ids} + /> + + - - {FormUtils.renderLabel({ - title: intl.formatMessage({ id: "tags" }), - labelProps: { - column: true, - sm: 3, - xl: 12, - }, - })} - - setTagIds(items.map((item) => item.id))} - ids={tagIds} - /> - - + + {FormUtils.renderLabel({ + title: intl.formatMessage({ id: "tags" }), + labelProps: { + column: true, + sm: 3, + xl: 12, + }, + })} + + + formik.setFieldValue( + "tag_ids", + items.map((item) => item.id) + ) + } + ids={formik.values.tag_ids} + /> + + + - + ); }; From 45a9aabdaf05b47edbd9fbadc5f81ef9c8b022f8 Mon Sep 17 00:00:00 2001 From: UnluckyChemical765 <83972682+UnluckyChemical765@users.noreply.github.com> Date: Wed, 25 Aug 2021 18:50:02 -0700 Subject: [PATCH 47/51] Add script offset / delay to Handy support. (#1573) * Add script offset / delay to Handy support. Further work on #1376. Offsets are added to the current video position, so a positive value leads to earlier motion. (The most common setting.) This is needed because most script times have a consistent delay when compared to the video. (Delay from the API calls to the server should be handled by the server offset calculation.) * Rename scriptOffset to funscriptOffset * Correct localisation keys Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com> --- graphql/documents/data/config.graphql | 1 + graphql/schema/types/config.graphql | 4 +++ pkg/api/resolver_mutation_configure.go | 4 +++ pkg/api/resolver_query_configuration.go | 2 ++ pkg/manager/config/config.go | 6 +++++ .../src/components/Changelog/versions/v090.md | 3 ++- .../components/ScenePlayer/ScenePlayer.tsx | 5 +++- .../SettingsInterfacePanel.tsx | 27 +++++++++++++++++-- ui/v2.5/src/locales/de-DE.json | 6 +++-- ui/v2.5/src/locales/en-GB.json | 10 +++++-- ui/v2.5/src/locales/pt-BR.json | 6 +++-- ui/v2.5/src/locales/zh-CN.json | 6 +++-- ui/v2.5/src/locales/zh-TW.json | 6 +++-- ui/v2.5/src/utils/interactive.ts | 6 +++-- 14 files changed, 76 insertions(+), 16 deletions(-) diff --git a/graphql/documents/data/config.graphql b/graphql/documents/data/config.graphql index 5511dc535..7912bee00 100644 --- a/graphql/documents/data/config.graphql +++ b/graphql/documents/data/config.graphql @@ -56,6 +56,7 @@ fragment ConfigInterfaceData on ConfigInterfaceResult { language slideshowDelay handyKey + funscriptOffset } fragment ConfigDLNAData on ConfigDLNAResult { diff --git a/graphql/schema/types/config.graphql b/graphql/schema/types/config.graphql index cec708d16..63fd730c5 100644 --- a/graphql/schema/types/config.graphql +++ b/graphql/schema/types/config.graphql @@ -200,6 +200,8 @@ input ConfigInterfaceInput { slideshowDelay: Int """Handy Connection Key""" handyKey: String + """Funscript Time Offset""" + funscriptOffset: Int } type ConfigInterfaceResult { @@ -226,6 +228,8 @@ type ConfigInterfaceResult { slideshowDelay: Int """Handy Connection Key""" handyKey: String + """Funscript Time Offset""" + funscriptOffset: Int } input ConfigDLNAInput { diff --git a/pkg/api/resolver_mutation_configure.go b/pkg/api/resolver_mutation_configure.go index a6083022f..4eb477731 100644 --- a/pkg/api/resolver_mutation_configure.go +++ b/pkg/api/resolver_mutation_configure.go @@ -260,6 +260,10 @@ func (r *mutationResolver) ConfigureInterface(ctx context.Context, input models. c.Set(config.HandyKey, *input.HandyKey) } + if input.FunscriptOffset != nil { + c.Set(config.FunscriptOffset, *input.FunscriptOffset) + } + if err := c.Write(); err != nil { return makeConfigInterfaceResult(), err } diff --git a/pkg/api/resolver_query_configuration.go b/pkg/api/resolver_query_configuration.go index c8897c882..27aaac925 100644 --- a/pkg/api/resolver_query_configuration.go +++ b/pkg/api/resolver_query_configuration.go @@ -109,6 +109,7 @@ func makeConfigInterfaceResult() *models.ConfigInterfaceResult { language := config.GetLanguage() slideshowDelay := config.GetSlideshowDelay() handyKey := config.GetHandyKey() + scriptOffset := config.GetFunscriptOffset() return &models.ConfigInterfaceResult{ MenuItems: menuItems, @@ -123,6 +124,7 @@ func makeConfigInterfaceResult() *models.ConfigInterfaceResult { Language: &language, SlideshowDelay: &slideshowDelay, HandyKey: &handyKey, + FunscriptOffset: &scriptOffset, } } diff --git a/pkg/manager/config/config.go b/pkg/manager/config/config.go index eb1db30dc..c97f5ec67 100644 --- a/pkg/manager/config/config.go +++ b/pkg/manager/config/config.go @@ -132,6 +132,7 @@ const CSSEnabled = "cssEnabled" const WallPlayback = "wall_playback" const SlideshowDelay = "slideshow_delay" const HandyKey = "handy_key" +const FunscriptOffset = "funscript_offset" // DLNA options const DLNAServerName = "dlna.server_name" @@ -798,6 +799,11 @@ func (i *Instance) GetHandyKey() string { return viper.GetString(HandyKey) } +func (i *Instance) GetFunscriptOffset() int { + viper.SetDefault(FunscriptOffset, 0) + return viper.GetInt(FunscriptOffset) +} + // GetDLNAServerName returns the visible name of the DLNA server. If empty, // "stash" will be used. func (i *Instance) GetDLNAServerName() string { diff --git a/ui/v2.5/src/components/Changelog/versions/v090.md b/ui/v2.5/src/components/Changelog/versions/v090.md index 62219fc91..dfda34f86 100644 --- a/ui/v2.5/src/components/Changelog/versions/v090.md +++ b/ui/v2.5/src/components/Changelog/versions/v090.md @@ -1,4 +1,5 @@ ### ✨ New Features +* Support setting a fixed funscript offset/delay. ([#1573](https://github.com/stashapp/stash/pull/1573)) * Added sort by options for image and gallery count for performers. ([#1671](https://github.com/stashapp/stash/pull/1671)) * Added sort by options for date, duration and rating for movies. ([#1663](https://github.com/stashapp/stash/pull/1663)) * Allow saving query page zoom level in saved and default filters. ([#1636](https://github.com/stashapp/stash/pull/1636)) @@ -12,7 +13,7 @@ ### 🎨 Improvements * Move Play Selected Scenes, and Add/Remove Gallery Image buttons to button toolbar. ([#1673](https://github.com/stashapp/stash/pull/1673)) -* Add image and gallery counts to tag list view. ([#1672](https://github.com/stashapp/stash/pull/1672)) +* Added image and gallery counts to tag list view. ([#1672](https://github.com/stashapp/stash/pull/1672)) * Prompt when leaving gallery and image edit pages with unsaved changes. ([#1654](https://github.com/stashapp/stash/pull/1654), [#1669](https://github.com/stashapp/stash/pull/1669)) * Show largest duplicates first in scene duplicate checker. ([#1639](https://github.com/stashapp/stash/pull/1639)) * Added checkboxes to scene list view. ([#1642](https://github.com/stashapp/stash/pull/1642)) diff --git a/ui/v2.5/src/components/ScenePlayer/ScenePlayer.tsx b/ui/v2.5/src/components/ScenePlayer/ScenePlayer.tsx index 62460add5..77ef81552 100644 --- a/ui/v2.5/src/components/ScenePlayer/ScenePlayer.tsx +++ b/ui/v2.5/src/components/ScenePlayer/ScenePlayer.tsx @@ -54,7 +54,10 @@ export class ScenePlayerImpl extends React.Component< this.state = { scrubberPosition: 0, config: this.makeJWPlayerConfig(props.scene), - interactiveClient: new Interactive(this.props.config?.handyKey || ""), + interactiveClient: new Interactive( + this.props.config?.handyKey || "", + this.props.config?.funscriptOffset || 0 + ), }; // Default back to Direct Streaming diff --git a/ui/v2.5/src/components/Settings/SettingsInterfacePanel/SettingsInterfacePanel.tsx b/ui/v2.5/src/components/Settings/SettingsInterfacePanel/SettingsInterfacePanel.tsx index 779a748f7..e464ae610 100644 --- a/ui/v2.5/src/components/Settings/SettingsInterfacePanel/SettingsInterfacePanel.tsx +++ b/ui/v2.5/src/components/Settings/SettingsInterfacePanel/SettingsInterfacePanel.tsx @@ -37,6 +37,7 @@ export const SettingsInterfacePanel: React.FC = () => { const [cssEnabled, setCSSEnabled] = useState(false); const [language, setLanguage] = useState("en"); const [handyKey, setHandyKey] = useState(); + const [funscriptOffset, setFunscriptOffset] = useState(0); const [updateInterfaceConfig] = useConfigureInterface({ menuItems: menuItemIds, @@ -51,6 +52,7 @@ export const SettingsInterfacePanel: React.FC = () => { language, slideshowDelay, handyKey, + funscriptOffset, }); useEffect(() => { @@ -67,6 +69,7 @@ export const SettingsInterfacePanel: React.FC = () => { setLanguage(iCfg?.language ?? "en-US"); setSlideshowDelay(iCfg?.slideshowDelay ?? 5000); setHandyKey(iCfg?.handyKey ?? ""); + setFunscriptOffset(iCfg?.funscriptOffset ?? 0); }, [config]); async function onSave() { @@ -281,7 +284,9 @@ export const SettingsInterfacePanel: React.FC = () => { -
    {intl.formatMessage({ id: "config.ui.handy_connection_key" })}
    +
    + {intl.formatMessage({ id: "config.ui.handy_connection_key.heading" })} +
    { }} /> - {intl.formatMessage({ id: "config.ui.handy_connection_key_desc" })} + {intl.formatMessage({ + id: "config.ui.handy_connection_key.description", + })} + +
    + +
    + {intl.formatMessage({ id: "config.ui.funscript_offset.heading" })} +
    + ) => { + setFunscriptOffset(Number.parseInt(e.currentTarget.value, 10)); + }} + /> + + {intl.formatMessage({ id: "config.ui.funscript_offset.description" })}
    diff --git a/ui/v2.5/src/locales/de-DE.json b/ui/v2.5/src/locales/de-DE.json index e22e410cf..32bd74623 100644 --- a/ui/v2.5/src/locales/de-DE.json +++ b/ui/v2.5/src/locales/de-DE.json @@ -308,8 +308,10 @@ "heading": "Benutzerdefinierte CSS", "option_label": "Benutzerdefiniertes CSS aktiviert" }, - "handy_connection_key": "Handy Verbindungsschlüssel", - "handy_connection_key_desc": "Handy Verbindungsschlüssel für interaktive Szenen.", + "handy_connection_key": { + "description": "Handy Verbindungsschlüssel für interaktive Szenen.", + "heading": "Handy Verbindungsschlüssel" + }, "language": { "heading": "Sprache" }, diff --git a/ui/v2.5/src/locales/en-GB.json b/ui/v2.5/src/locales/en-GB.json index 2ffd8cc45..34b58e700 100644 --- a/ui/v2.5/src/locales/en-GB.json +++ b/ui/v2.5/src/locales/en-GB.json @@ -315,8 +315,14 @@ "heading": "Custom CSS", "option_label": "Custom CSS enabled" }, - "handy_connection_key": "Handy Connection Key", - "handy_connection_key_desc": "Handy connection key to use for interactive scenes.", + "handy_connection_key": { + "description": "Handy connection key to use for interactive scenes.", + "heading": "Handy Connection Key" + }, + "funscript_offset": { + "description": "Time offset in milliseconds for interactive scripts playback.", + "heading": "Funscript Offset (ms)" + }, "language": { "heading": "Language" }, diff --git a/ui/v2.5/src/locales/pt-BR.json b/ui/v2.5/src/locales/pt-BR.json index c56139dcd..64ce8e204 100644 --- a/ui/v2.5/src/locales/pt-BR.json +++ b/ui/v2.5/src/locales/pt-BR.json @@ -308,8 +308,10 @@ "heading": "CSS customizado", "option_label": "CSS customizado habilitado" }, - "handy_connection_key": "Chave de conexão", - "handy_connection_key_desc": "Chave de conexão para usar em cenas interativas.", + "handy_connection_key": { + "description": "Chave de conexão para usar em cenas interativas.", + "heading": "Chave de conexão" + }, "language": { "heading": "Idioma" }, diff --git a/ui/v2.5/src/locales/zh-CN.json b/ui/v2.5/src/locales/zh-CN.json index 5182f4b81..c65d6810e 100644 --- a/ui/v2.5/src/locales/zh-CN.json +++ b/ui/v2.5/src/locales/zh-CN.json @@ -308,8 +308,10 @@ "heading": "自定义样式", "option_label": "自定义样式已启用" }, - "handy_connection_key": "快速连接密钥", - "handy_connection_key_desc": "用于互动场景的快速连接密钥", + "handy_connection_key": { + "description": "用于互动场景的快速连接密钥", + "heading": "快速连接密钥" + }, "language": { "heading": "语言" }, diff --git a/ui/v2.5/src/locales/zh-TW.json b/ui/v2.5/src/locales/zh-TW.json index 24add9259..07f443c52 100644 --- a/ui/v2.5/src/locales/zh-TW.json +++ b/ui/v2.5/src/locales/zh-TW.json @@ -310,8 +310,10 @@ "heading": "自定義 CSS", "option_label": "啟用自定義 CSS" }, - "handy_connection_key": "Handy 連線金鑰", - "handy_connection_key_desc": "播放支援互動性的短片時所用的 Handy 連線金鑰。", + "handy_connection_key": { + "description": "播放支援互動性的短片時所用的 Handy 連線金鑰。", + "heading": "Handy 連線金鑰" + }, "language": { "heading": "語言" }, diff --git a/ui/v2.5/src/utils/interactive.ts b/ui/v2.5/src/utils/interactive.ts index b6887e372..4dd01ec18 100644 --- a/ui/v2.5/src/utils/interactive.ts +++ b/ui/v2.5/src/utils/interactive.ts @@ -26,11 +26,13 @@ function convertFunscriptToCSV(funscript: IFunscript) { export class Interactive { private _connected: boolean; private _playing: boolean; + private _scriptOffset: number; private _handy: Handy; - constructor(handyKey: string) { + constructor(handyKey: string, scriptOffset: number) { this._handy = new Handy(); this._handy.connectionKey = handyKey; + this._scriptOffset = scriptOffset; this._connected = false; this._playing = false; } @@ -76,7 +78,7 @@ export class Interactive { return; } this._playing = await this._handy - .syncPlay(true, Math.round(position * 1000)) + .syncPlay(true, Math.round(position * 1000 + this._scriptOffset)) .then(() => true); } From 50cb6a9c7924ab96600f627062b9e245a9257e39 Mon Sep 17 00:00:00 2001 From: FleetingOrchard <55274008+FleetingOrchard@users.noreply.github.com> Date: Thu, 26 Aug 2021 13:37:08 +1000 Subject: [PATCH 48/51] Add duration statistics to stats page (#1626) --- graphql/documents/queries/misc.graphql | 1 + graphql/schema/types/stats.graphql | 1 + pkg/api/resolver.go | 2 + pkg/models/mocks/SceneReaderWriter.go | 21 ++++ pkg/models/scene.go | 1 + pkg/sqlite/scene.go | 4 + .../src/components/Changelog/versions/v090.md | 1 + ui/v2.5/src/components/Stats.tsx | 51 +++++---- ui/v2.5/src/locales/en-GB.json | 1 + ui/v2.5/src/utils/text.ts | 107 ++++++++++++++++++ 10 files changed, 170 insertions(+), 20 deletions(-) diff --git a/graphql/documents/queries/misc.graphql b/graphql/documents/queries/misc.graphql index 0816d39f5..b8b4871d1 100644 --- a/graphql/documents/queries/misc.graphql +++ b/graphql/documents/queries/misc.graphql @@ -41,6 +41,7 @@ query Stats { stats { scene_count, scenes_size, + scenes_duration, image_count, images_size, gallery_count, diff --git a/graphql/schema/types/stats.graphql b/graphql/schema/types/stats.graphql index d127871f2..fcadd54a7 100644 --- a/graphql/schema/types/stats.graphql +++ b/graphql/schema/types/stats.graphql @@ -1,6 +1,7 @@ type StatsResultType { scene_count: Int! scenes_size: Float! + scenes_duration: Float! image_count: Int! images_size: Float! gallery_count: Int! diff --git a/pkg/api/resolver.go b/pkg/api/resolver.go index 07534fc1e..ed15a1d21 100644 --- a/pkg/api/resolver.go +++ b/pkg/api/resolver.go @@ -138,6 +138,7 @@ func (r *queryResolver) Stats(ctx context.Context) (*models.StatsResultType, err tagsQB := repo.Tag() scenesCount, _ := scenesQB.Count() scenesSize, _ := scenesQB.Size() + scenesDuration, _ := scenesQB.Duration() imageCount, _ := imageQB.Count() imageSize, _ := imageQB.Size() galleryCount, _ := galleryQB.Count() @@ -149,6 +150,7 @@ func (r *queryResolver) Stats(ctx context.Context) (*models.StatsResultType, err ret = models.StatsResultType{ SceneCount: scenesCount, ScenesSize: scenesSize, + ScenesDuration: scenesDuration, ImageCount: imageCount, ImagesSize: imageSize, GalleryCount: galleryCount, diff --git a/pkg/models/mocks/SceneReaderWriter.go b/pkg/models/mocks/SceneReaderWriter.go index 796c23878..326999518 100644 --- a/pkg/models/mocks/SceneReaderWriter.go +++ b/pkg/models/mocks/SceneReaderWriter.go @@ -254,6 +254,27 @@ func (_m *SceneReaderWriter) DestroyCover(sceneID int) error { return r0 } +// Duration provides a mock function with given fields: +func (_m *SceneReaderWriter) Duration() (float64, error) { + ret := _m.Called() + + var r0 float64 + if rf, ok := ret.Get(0).(func() float64); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(float64) + } + + var r1 error + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + // Find provides a mock function with given fields: id func (_m *SceneReaderWriter) Find(id int) (*models.Scene, error) { ret := _m.Called(id) diff --git a/pkg/models/scene.go b/pkg/models/scene.go index 8e77b2497..60345fce9 100644 --- a/pkg/models/scene.go +++ b/pkg/models/scene.go @@ -15,6 +15,7 @@ type SceneReader interface { CountByMovieID(movieID int) (int, error) Count() (int, error) Size() (float64, error) + Duration() (float64, error) // SizeCount() (string, error) CountByStudioID(studioID int) (int, error) CountByTagID(tagID int) (int, error) diff --git a/pkg/sqlite/scene.go b/pkg/sqlite/scene.go index cd56e9db2..92cdd5c2c 100644 --- a/pkg/sqlite/scene.go +++ b/pkg/sqlite/scene.go @@ -274,6 +274,10 @@ func (qb *sceneQueryBuilder) Size() (float64, error) { return qb.runSumQuery("SELECT SUM(cast(size as double)) as sum FROM scenes", nil) } +func (qb *sceneQueryBuilder) Duration() (float64, error) { + return qb.runSumQuery("SELECT SUM(cast(duration as double)) as sum FROM scenes", nil) +} + func (qb *sceneQueryBuilder) CountByStudioID(studioID int) (int, error) { args := []interface{}{studioID} return qb.runCountQuery(qb.buildCountQuery(scenesForStudioQuery), args) diff --git a/ui/v2.5/src/components/Changelog/versions/v090.md b/ui/v2.5/src/components/Changelog/versions/v090.md index dfda34f86..2b69e11af 100644 --- a/ui/v2.5/src/components/Changelog/versions/v090.md +++ b/ui/v2.5/src/components/Changelog/versions/v090.md @@ -12,6 +12,7 @@ * Added not equals/greater than/less than modifiers for resolution criteria. ([#1568](https://github.com/stashapp/stash/pull/1568)) ### 🎨 Improvements +* Added total scenes duration to Stats page. ([#1626](https://github.com/stashapp/stash/pull/1626)) * Move Play Selected Scenes, and Add/Remove Gallery Image buttons to button toolbar. ([#1673](https://github.com/stashapp/stash/pull/1673)) * Added image and gallery counts to tag list view. ([#1672](https://github.com/stashapp/stash/pull/1672)) * Prompt when leaving gallery and image edit pages with unsaved changes. ([#1654](https://github.com/stashapp/stash/pull/1654), [#1669](https://github.com/stashapp/stash/pull/1669)) diff --git a/ui/v2.5/src/components/Stats.tsx b/ui/v2.5/src/components/Stats.tsx index dffcc1b9d..f672b8b52 100644 --- a/ui/v2.5/src/components/Stats.tsx +++ b/ui/v2.5/src/components/Stats.tsx @@ -39,6 +39,35 @@ export const Stats: React.FC = () => {

    +
    +

    + +

    +

    + +

    +
    +
    +

    + {` ${TextUtils.secondsAsTimeString(data.stats.scenes_duration, 3)}`} +

    +

    + +

    +
    +
    +

    + +

    +

    + +

    +
    + +

    {

    -
    -

    - -

    -

    - -

    -
    -
    -
    -
    -

    - -

    -

    - -

    -

    @@ -81,10 +92,10 @@ export const Stats: React.FC = () => {

    - +

    - +

    diff --git a/ui/v2.5/src/locales/en-GB.json b/ui/v2.5/src/locales/en-GB.json index 34b58e700..060032cdc 100644 --- a/ui/v2.5/src/locales/en-GB.json +++ b/ui/v2.5/src/locales/en-GB.json @@ -586,6 +586,7 @@ "scene_count": "Scene Count", "scene_id": "Scene ID", "scenes": "Scenes", + "scenes-duration": "Scenes duration", "scenes-size": "Scenes size", "scenes_updated_at": "Scene Updated At", "sceneTagger": "Scene Tagger", diff --git a/ui/v2.5/src/utils/text.ts b/ui/v2.5/src/utils/text.ts index aecac9f8e..e90de3cd1 100644 --- a/ui/v2.5/src/utils/text.ts +++ b/ui/v2.5/src/utils/text.ts @@ -35,6 +35,112 @@ const fileSize = (bytes: number = 0) => { }; }; +class DurationUnit { + static readonly SECOND: DurationUnit = new DurationUnit( + "second", + "seconds", + "s", + 1 + ); + static readonly MINUTE: DurationUnit = new DurationUnit( + "minute", + "minutes", + "m", + 60 + ); + static readonly HOUR: DurationUnit = new DurationUnit( + "hour", + "hours", + "h", + DurationUnit.MINUTE.secs * 60 + ); + static readonly DAY: DurationUnit = new DurationUnit( + "day", + "days", + "D", + DurationUnit.HOUR.secs * 24 + ); + static readonly WEEK: DurationUnit = new DurationUnit( + "week", + "weeks", + "W", + DurationUnit.DAY.secs * 7 + ); + static readonly MONTH: DurationUnit = new DurationUnit( + "month", + "months", + "M", + DurationUnit.DAY.secs * 30 + ); + static readonly YEAR: DurationUnit = new DurationUnit( + "year", + "years", + "Y", + DurationUnit.DAY.secs * 365 + ); + + static readonly DURATIONS: DurationUnit[] = [ + DurationUnit.SECOND, + DurationUnit.MINUTE, + DurationUnit.HOUR, + DurationUnit.DAY, + DurationUnit.WEEK, + DurationUnit.MONTH, + DurationUnit.YEAR, + ]; + + private constructor( + private readonly singular: string, + private readonly plural: string, + private readonly shortString: string, + public secs: number + ) {} + + toString() { + return this.shortString; + } +} + +class DurationCount { + public constructor( + public readonly count: number, + public readonly duration: DurationUnit + ) {} + + toString() { + return this.count.toString() + this.duration.toString(); + } +} + +const secondsAsTime = (seconds: number = 0): DurationCount[] => { + if (Number.isNaN(parseFloat(String(seconds))) || !Number.isFinite(seconds)) + return [new DurationCount(0, DurationUnit.DURATIONS[0])]; + + const result = []; + let remainingSeconds = seconds; + // Run down the possible durations and pull them out + for (let i = DurationUnit.DURATIONS.length - 1; i >= 0; i--) { + const q = Math.floor(remainingSeconds / DurationUnit.DURATIONS[i].secs); + if (q !== 0) { + remainingSeconds %= DurationUnit.DURATIONS[i].secs; + result.push(new DurationCount(q, DurationUnit.DURATIONS[i])); + } + } + return result; +}; + +const timeAsString = (time: DurationCount[]): string => { + return time.join(" "); +}; + +const secondsAsTimeString = ( + seconds: number = 0, + maxUnitCount: number = 2 +): string => { + const timeArray = secondsAsTime(seconds).slice(0, maxUnitCount); + return timeAsString(timeArray); +}; + const formatFileSizeUnit = (u: Unit) => { const i = Units.indexOf(u); return shortUnits[i]; @@ -206,6 +312,7 @@ const TextUtils = { instagramURL, formatDate, capitalize, + secondsAsTimeString, }; export default TextUtils; From 1774a3600cb07b1f8965b744483768838ab780c3 Mon Sep 17 00:00:00 2001 From: gitgiggety <79809426+gitgiggety@users.noreply.github.com> Date: Mon, 30 Aug 2021 03:46:41 +0200 Subject: [PATCH 49/51] Fix Performers Is Missing: stash ID filter (#1681) * Fix Performers Is Missing: stash ID filter. Fixes #1679 --- pkg/sqlite/performer.go | 3 +++ ui/v2.5/src/components/Changelog/versions/v090.md | 1 + 2 files changed, 4 insertions(+) diff --git a/pkg/sqlite/performer.go b/pkg/sqlite/performer.go index 0cba2dcfe..526a6e360 100644 --- a/pkg/sqlite/performer.go +++ b/pkg/sqlite/performer.go @@ -345,6 +345,9 @@ func performerIsMissingCriterionHandler(qb *performerQueryBuilder, isMissing *st case "image": f.addJoin(performersImageTable, "image_join", "image_join.performer_id = performers.id") f.addWhere("image_join.performer_id IS NULL") + case "stash_id": + qb.stashIDRepository().join(f, "performer_stash_ids", "performers.id") + f.addWhere("performer_stash_ids.performer_id IS NULL") default: f.addWhere("(performers." + *isMissing + " IS NULL OR TRIM(performers." + *isMissing + ") = '')") } diff --git a/ui/v2.5/src/components/Changelog/versions/v090.md b/ui/v2.5/src/components/Changelog/versions/v090.md index 2b69e11af..9ffbe3d98 100644 --- a/ui/v2.5/src/components/Changelog/versions/v090.md +++ b/ui/v2.5/src/components/Changelog/versions/v090.md @@ -30,6 +30,7 @@ * Added de-DE language option. ([#1578](https://github.com/stashapp/stash/pull/1578)) ### 🐛 Bug fixes +* Fix SQL error when filtering for Performers missing stash IDs. ([#1681](https://github.com/stashapp/stash/pull/1681)) * Fix Play Selected scene UI error when one scene is selected. ([#1674](https://github.com/stashapp/stash/pull/1674)) * Fix race condition panic when reading and writing config concurrently. ([#1645](https://github.com/stashapp/stash/issues/1343)) * Fix performance issue on Studios page getting studio image count. ([#1643](https://github.com/stashapp/stash/pull/1643)) From 709d7ce1cc1c8ed3fcc09efa2038fd53a32f6b59 Mon Sep 17 00:00:00 2001 From: WithoutPants <53250216+WithoutPants@users.noreply.github.com> Date: Tue, 31 Aug 2021 19:37:45 +1000 Subject: [PATCH 50/51] Load TLS config files from config path before stash home (#1678) * Load tls files from config or home directory * Update README * Require both ssl files if either present --- README.md | 2 +- pkg/api/server.go | 79 +++++++++++-------- pkg/ffmpeg/downloader.go | 15 +--- pkg/manager/config/config.go | 31 +++++--- pkg/manager/paths/paths.go | 8 -- pkg/plugin/plugins.go | 2 +- pkg/utils/file.go | 11 +++ .../src/components/Changelog/versions/v090.md | 1 + 8 files changed, 84 insertions(+), 65 deletions(-) diff --git a/README.md b/README.md index f601919f3..74ab1301c 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,7 @@ Stash can run over HTTPS with some additional work. First you must generate a S This command would need customizing for your environment. [This link](https://stackoverflow.com/questions/10175812/how-to-create-a-self-signed-certificate-with-openssl) might be useful. -Once you have a certificate and key file name them `stash.crt` and `stash.key` and place them in the `~/.stash` directory. Stash detects these and starts up using HTTPS rather than HTTP. +Once you have a certificate and key file name them `stash.crt` and `stash.key` and place them in the same directory as the `config.yml` file, or the `~/.stash` directory. Stash detects these and starts up using HTTPS rather than HTTP. # Customization diff --git a/pkg/api/server.go b/pkg/api/server.go index ee9063287..823dae457 100644 --- a/pkg/api/server.go +++ b/pkg/api/server.go @@ -27,7 +27,6 @@ import ( "github.com/stashapp/stash/pkg/logger" "github.com/stashapp/stash/pkg/manager" "github.com/stashapp/stash/pkg/manager/config" - "github.com/stashapp/stash/pkg/manager/paths" "github.com/stashapp/stash/pkg/models" "github.com/stashapp/stash/pkg/session" "github.com/stashapp/stash/pkg/utils" @@ -286,34 +285,31 @@ func Start() { displayAddress := displayHost + ":" + strconv.Itoa(c.GetPort()) address := c.GetHost() + ":" + strconv.Itoa(c.GetPort()) - if tlsConfig := makeTLSConfig(); tlsConfig != nil { - httpsServer := &http.Server{ - Addr: address, - Handler: r, - TLSConfig: tlsConfig, - } + tlsConfig, err := makeTLSConfig(c) + if err != nil { + // assume we don't want to start with a broken TLS configuration + panic(fmt.Errorf("error loading TLS config: %s", err.Error())) + } - go func() { - printVersion() - printLatestVersion() - logger.Infof("stash is listening on " + address) + server := &http.Server{ + Addr: address, + Handler: r, + TLSConfig: tlsConfig, + } + + go func() { + printVersion() + printLatestVersion() + logger.Infof("stash is listening on " + address) + + if tlsConfig != nil { logger.Infof("stash is running at https://" + displayAddress + "/") - logger.Error(httpsServer.ListenAndServeTLS("", "")) - }() - } else { - server := &http.Server{ - Addr: address, - Handler: r, - } - - go func() { - printVersion() - printLatestVersion() - logger.Infof("stash is listening on " + address) + logger.Error(server.ListenAndServeTLS("", "")) + } else { logger.Infof("stash is running at http://" + displayAddress + "/") logger.Error(server.ListenAndServe()) - }() - } + } + }() } func printVersion() { @@ -328,27 +324,44 @@ func GetVersion() (string, string, string) { return version, githash, buildstamp } -func makeTLSConfig() *tls.Config { - cert, err := ioutil.ReadFile(paths.GetSSLCert()) - if err != nil { - return nil +func makeTLSConfig(c *config.Instance) (*tls.Config, error) { + c.InitTLS() + certFile, keyFile := c.GetTLSFiles() + + if certFile == "" && keyFile == "" { + // assume http configuration + return nil, nil } - key, err := ioutil.ReadFile(paths.GetSSLKey()) + // ensure both files are present + if certFile == "" { + return nil, errors.New("SSL certificate file must be present if key file is present") + } + + if keyFile == "" { + return nil, errors.New("SSL key file must be present if certificate file is present") + } + + cert, err := ioutil.ReadFile(certFile) if err != nil { - return nil + return nil, fmt.Errorf("error reading SSL certificate file %s: %s", certFile, err.Error()) + } + + key, err := ioutil.ReadFile(keyFile) + if err != nil { + return nil, fmt.Errorf("error reading SSL key file %s: %s", keyFile, err.Error()) } certs := make([]tls.Certificate, 1) certs[0], err = tls.X509KeyPair(cert, key) if err != nil { - return nil + return nil, fmt.Errorf("error parsing key pair: %s", err.Error()) } tlsConfig := &tls.Config{ Certificates: certs, } - return tlsConfig + return tlsConfig, nil } type contextKey struct { diff --git a/pkg/ffmpeg/downloader.go b/pkg/ffmpeg/downloader.go index e99716cbf..da5b2dbaf 100644 --- a/pkg/ffmpeg/downloader.go +++ b/pkg/ffmpeg/downloader.go @@ -16,17 +16,6 @@ import ( "github.com/stashapp/stash/pkg/utils" ) -func findInPaths(paths []string, baseName string) string { - for _, p := range paths { - filePath := filepath.Join(p, baseName) - if exists, _ := utils.FileExists(filePath); exists { - return filePath - } - } - - return "" -} - func GetPaths(paths []string) (string, string) { var ffmpegPath, ffprobePath string @@ -38,10 +27,10 @@ func GetPaths(paths []string) (string, string) { // Check if ffmpeg exists in the config directory if ffmpegPath == "" { - ffmpegPath = findInPaths(paths, getFFMPEGFilename()) + ffmpegPath = utils.FindInPaths(paths, getFFMPEGFilename()) } if ffprobePath == "" { - ffprobePath = findInPaths(paths, getFFProbeFilename()) + ffprobePath = utils.FindInPaths(paths, getFFProbeFilename()) } return ffmpegPath, ffprobePath diff --git a/pkg/manager/config/config.go b/pkg/manager/config/config.go index c97f5ec67..c412880ca 100644 --- a/pkg/manager/config/config.go +++ b/pkg/manager/config/config.go @@ -157,18 +157,11 @@ func (e MissingConfigError) Error() string { return fmt.Sprintf("missing the following mandatory settings: %s", strings.Join(e.missingFields, ", ")) } -func HasTLSConfig() bool { - ret, _ := utils.FileExists(paths.GetSSLCert()) - if ret { - ret, _ = utils.FileExists(paths.GetSSLKey()) - } - - return ret -} - type Instance struct { cpuProfilePath string isNewSystem bool + certFile string + keyFile string sync.RWMutex //deadlock.RWMutex // for deadlock testing/issues } @@ -192,6 +185,26 @@ func (i *Instance) SetConfigFile(fn string) { viper.SetConfigFile(fn) } +func (i *Instance) InitTLS() { + configDirectory := i.GetConfigPath() + tlsPaths := []string{ + configDirectory, + paths.GetStashHomeDirectory(), + } + + i.certFile = utils.FindInPaths(tlsPaths, "stash.crt") + i.keyFile = utils.FindInPaths(tlsPaths, "stash.key") +} + +func (i *Instance) GetTLSFiles() (certFile, keyFile string) { + return i.certFile, i.keyFile +} + +func (i *Instance) HasTLSConfig() bool { + certFile, keyFile := i.GetTLSFiles() + return certFile != "" && keyFile != "" +} + // GetCPUProfilePath returns the path to the CPU profile file to output // profiling info to. This is set only via a commandline flag. Returns an // empty string if not set. diff --git a/pkg/manager/paths/paths.go b/pkg/manager/paths/paths.go index 0d06af2c0..d3216b6bc 100644 --- a/pkg/manager/paths/paths.go +++ b/pkg/manager/paths/paths.go @@ -29,11 +29,3 @@ func GetStashHomeDirectory() string { func GetDefaultDatabaseFilePath() string { return filepath.Join(GetStashHomeDirectory(), "stash-go.sqlite") } - -func GetSSLKey() string { - return filepath.Join(GetStashHomeDirectory(), "stash.key") -} - -func GetSSLCert() string { - return filepath.Join(GetStashHomeDirectory(), "stash.crt") -} diff --git a/pkg/plugin/plugins.go b/pkg/plugin/plugins.go index eff6d88ba..844834339 100644 --- a/pkg/plugin/plugins.go +++ b/pkg/plugin/plugins.go @@ -133,7 +133,7 @@ func (c Cache) makeServerConnection(ctx context.Context) common.StashServerConne Dir: c.config.GetConfigPath(), } - if config.HasTLSConfig() { + if c.config.HasTLSConfig() { serverConnection.Scheme = "https" } diff --git a/pkg/utils/file.go b/pkg/utils/file.go index 81cd75598..87f7538b3 100644 --- a/pkg/utils/file.go +++ b/pkg/utils/file.go @@ -346,3 +346,14 @@ func IsFsPathCaseSensitive(path string) (bool, error) { } return false, fmt.Errorf("can not determine case sensitivity of path %s", path) } + +func FindInPaths(paths []string, baseName string) string { + for _, p := range paths { + filePath := filepath.Join(p, baseName) + if exists, _ := FileExists(filePath); exists { + return filePath + } + } + + return "" +} diff --git a/ui/v2.5/src/components/Changelog/versions/v090.md b/ui/v2.5/src/components/Changelog/versions/v090.md index 9ffbe3d98..49be1d202 100644 --- a/ui/v2.5/src/components/Changelog/versions/v090.md +++ b/ui/v2.5/src/components/Changelog/versions/v090.md @@ -12,6 +12,7 @@ * Added not equals/greater than/less than modifiers for resolution criteria. ([#1568](https://github.com/stashapp/stash/pull/1568)) ### 🎨 Improvements +* Added support for loading TLS/SSL configuration files from the configuration directory. ([#1678](https://github.com/stashapp/stash/pull/1678)) * Added total scenes duration to Stats page. ([#1626](https://github.com/stashapp/stash/pull/1626)) * Move Play Selected Scenes, and Add/Remove Gallery Image buttons to button toolbar. ([#1673](https://github.com/stashapp/stash/pull/1673)) * Added image and gallery counts to tag list view. ([#1672](https://github.com/stashapp/stash/pull/1672)) From a73c99a61d3af6f30bb77f8651631b85f2c71ac2 Mon Sep 17 00:00:00 2001 From: Tweeticoats <60335703+Tweeticoats@users.noreply.github.com> Date: Tue, 31 Aug 2021 19:44:39 +0930 Subject: [PATCH 51/51] Update docker file to add mechanicalsoup python library (#1688) Add a new python library mechanicalsoup to the docker container. There is a pending pull request in the Community scrapers for the Ifeelmyself that uses this library so it might be worth including it in the container. This should add ~100k to the size of the container. --- docker/ci/x86_64/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/ci/x86_64/Dockerfile b/docker/ci/x86_64/Dockerfile index 3c6e79497..9eb5d57d4 100644 --- a/docker/ci/x86_64/Dockerfile +++ b/docker/ci/x86_64/Dockerfile @@ -11,7 +11,7 @@ RUN if [ "$TARGETPLATFORM" = "linux/arm/v6" ]; then BIN=stash-pi; \ ENV DEBIAN_FRONTEND=noninteractive RUN apt update && apt install -y python3 python-is-python3 python3-requests python3-requests-toolbelt python3-lxml python3-pip && pip3 install cloudscraper FROM ubuntu:20.04 as app -run apt update && apt install -y python3 python-is-python3 python3-requests python3-requests-toolbelt python3-lxml ffmpeg && rm -rf /var/lib/apt/lists/* +run apt update && apt install -y python3 python-is-python3 python3-requests python3-requests-toolbelt python3-lxml python3-mechanicalsoup ffmpeg && rm -rf /var/lib/apt/lists/* COPY --from=prep /stash /usr/bin/ COPY --from=prep /usr/local/lib/python3.8/dist-packages /usr/local/lib/python3.8/dist-packages
    From 7b3b2ae9ba3a68fede2ac6b3cbff21c91cfff7c7 Mon Sep 17 00:00:00 2001 From: kermieisinthehouse Date: Tue, 17 Aug 2021 20:11:57 -0700 Subject: [PATCH 34/51] Order sceneDuplicateChecker results by size (#1639) --- pkg/sqlite/scene.go | 4 +++- ui/v2.5/src/components/Changelog/versions/v090.md | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/sqlite/scene.go b/pkg/sqlite/scene.go index fbbaaeb3c..cd56e9db2 100644 --- a/pkg/sqlite/scene.go +++ b/pkg/sqlite/scene.go @@ -68,13 +68,15 @@ SELECT GROUP_CONCAT(id) as ids FROM scenes WHERE phash IS NOT NULL GROUP BY phash -HAVING COUNT(*) > 1; +HAVING COUNT(phash) > 1 +ORDER BY SUM(size) DESC; ` var findAllPhashesQuery = ` SELECT id, phash FROM scenes WHERE phash IS NOT NULL +ORDER BY size DESC ` type sceneQueryBuilder struct { diff --git a/ui/v2.5/src/components/Changelog/versions/v090.md b/ui/v2.5/src/components/Changelog/versions/v090.md index 22cb7935e..abbe3fe64 100644 --- a/ui/v2.5/src/components/Changelog/versions/v090.md +++ b/ui/v2.5/src/components/Changelog/versions/v090.md @@ -9,6 +9,7 @@ * Added not equals/greater than/less than modifiers for resolution criteria. ([#1568](https://github.com/stashapp/stash/pull/1568)) ### 🎨 Improvements +* Show largest duplicates first in scene duplicate checker. ([#1639](https://github.com/stashapp/stash/pull/1639)) * Added checkboxes to scene list view. ([#1642](https://github.com/stashapp/stash/pull/1642)) * Added keyboard shortcuts for scene queue navigation. ([#1635](https://github.com/stashapp/stash/pull/1635)) * Made performer scrape menu scrollable. ([#1634](https://github.com/stashapp/stash/pull/1634)) From 0d4ab7f6f3de92cd69ea0b8b38bd97f16af3d3ef Mon Sep 17 00:00:00 2001 From: InfiniteTF Date: Tue, 24 Aug 2021 03:23:25 +0200 Subject: [PATCH 35/51] Fix studio editing (#1668) --- .../Performers/PerformerDetails/PerformerEditPanel.tsx | 7 ++----- .../src/components/Scenes/SceneDetails/SceneEditPanel.tsx | 7 ++----- .../components/Studios/StudioDetails/StudioEditPanel.tsx | 3 ++- ui/v2.5/src/utils/index.ts | 1 + ui/v2.5/src/utils/stashIds.ts | 5 +++++ 5 files changed, 12 insertions(+), 11 deletions(-) create mode 100644 ui/v2.5/src/utils/stashIds.ts diff --git a/ui/v2.5/src/components/Performers/PerformerDetails/PerformerEditPanel.tsx b/ui/v2.5/src/components/Performers/PerformerDetails/PerformerEditPanel.tsx index 354143ff9..d62743307 100644 --- a/ui/v2.5/src/components/Performers/PerformerDetails/PerformerEditPanel.tsx +++ b/ui/v2.5/src/components/Performers/PerformerDetails/PerformerEditPanel.tsx @@ -30,7 +30,7 @@ import { Modal, TagSelect, } from "src/components/Shared"; -import { ImageUtils } from "src/utils"; +import { ImageUtils, getStashIDs } from "src/utils"; import { getCountryByISO } from "src/utils/country"; import { useToast } from "src/hooks"; import { Prompt, useHistory } from "react-router-dom"; @@ -380,10 +380,7 @@ export const PerformerEditPanel: React.FC = ({ variables: { input: { ...input, - stash_ids: performerInput?.stash_ids?.map((s) => ({ - endpoint: s.endpoint, - stash_id: s.stash_id, - })), + stash_ids: getStashIDs(performerInput?.stash_ids), }, }, }); diff --git a/ui/v2.5/src/components/Scenes/SceneDetails/SceneEditPanel.tsx b/ui/v2.5/src/components/Scenes/SceneDetails/SceneEditPanel.tsx index 0ffc16938..f38749729 100644 --- a/ui/v2.5/src/components/Scenes/SceneDetails/SceneEditPanel.tsx +++ b/ui/v2.5/src/components/Scenes/SceneDetails/SceneEditPanel.tsx @@ -30,7 +30,7 @@ import { ImageInput, } from "src/components/Shared"; import { useToast } from "src/hooks"; -import { ImageUtils, FormUtils, TextUtils } from "src/utils"; +import { ImageUtils, FormUtils, TextUtils, getStashIDs } from "src/utils"; import { MovieSelect } from "src/components/Shared/Select"; import { useFormik } from "formik"; import { Prompt } from "react-router"; @@ -110,10 +110,7 @@ export const SceneEditPanel: React.FC = ({ }), tag_ids: (scene.tags ?? []).map((t) => t.id), cover_image: undefined, - stash_ids: (scene.stash_ids ?? []).map((s) => ({ - stash_id: s.stash_id, - endpoint: s.endpoint, - })), + stash_ids: getStashIDs(scene.stash_ids), }; type InputValues = typeof initialValues; diff --git a/ui/v2.5/src/components/Studios/StudioDetails/StudioEditPanel.tsx b/ui/v2.5/src/components/Studios/StudioDetails/StudioEditPanel.tsx index e1222ac58..2304b2bcb 100644 --- a/ui/v2.5/src/components/Studios/StudioDetails/StudioEditPanel.tsx +++ b/ui/v2.5/src/components/Studios/StudioDetails/StudioEditPanel.tsx @@ -5,7 +5,7 @@ import * as yup from "yup"; import Mousetrap from "mousetrap"; import { Icon, StudioSelect, DetailsEditNavbar } from "src/components/Shared"; import { Button, Form, Col, Row } from "react-bootstrap"; -import { FormUtils, ImageUtils } from "src/utils"; +import { FormUtils, ImageUtils, getStashIDs } from "src/utils"; import { RatingStars } from "src/components/Scenes/SceneDetails/RatingStars"; import { useFormik } from "formik"; import { Prompt } from "react-router-dom"; @@ -74,6 +74,7 @@ export const StudioEditPanel: React.FC = ({ function getStudioInput(values: InputValues) { const input: Partial = { ...values, + stash_ids: getStashIDs(values.stash_ids), }; if (studio && studio.id) { diff --git a/ui/v2.5/src/utils/index.ts b/ui/v2.5/src/utils/index.ts index 102c092dd..d3d64f447 100644 --- a/ui/v2.5/src/utils/index.ts +++ b/ui/v2.5/src/utils/index.ts @@ -12,3 +12,4 @@ export { default as getISOCountry } from "./country"; export { default as useFocus } from "./focus"; export { default as downloadFile } from "./download"; export * from "./data"; +export { getStashIDs } from "./stashIds"; diff --git a/ui/v2.5/src/utils/stashIds.ts b/ui/v2.5/src/utils/stashIds.ts new file mode 100644 index 000000000..3240b2a0f --- /dev/null +++ b/ui/v2.5/src/utils/stashIds.ts @@ -0,0 +1,5 @@ +export const getStashIDs = (ids?: { stash_id: string; endpoint: string }[]) => + (ids ?? []).map(({ stash_id, endpoint }) => ({ + stash_id, + endpoint, + })); From ac72d4db2b9aaf4d9b615b917c83e303305f9197 Mon Sep 17 00:00:00 2001 From: peolic <66393006+peolic@users.noreply.github.com> Date: Tue, 24 Aug 2021 04:33:46 +0300 Subject: [PATCH 36/51] Fix scene bitrate unit (#1650) --- .../SceneDetails/SceneFileInfoPanel.tsx | 24 ++++++++++++------- ui/v2.5/src/locales/en-GB.json | 2 ++ 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/ui/v2.5/src/components/Scenes/SceneDetails/SceneFileInfoPanel.tsx b/ui/v2.5/src/components/Scenes/SceneDetails/SceneFileInfoPanel.tsx index 31b3ab384..23ef06e5b 100644 --- a/ui/v2.5/src/components/Scenes/SceneDetails/SceneFileInfoPanel.tsx +++ b/ui/v2.5/src/components/Scenes/SceneDetails/SceneFileInfoPanel.tsx @@ -1,5 +1,5 @@ import React from "react"; -import { FormattedNumber } from "react-intl"; +import { FormattedMessage, FormattedNumber, useIntl } from "react-intl"; import * as GQL from "src/core/generated-graphql"; import { TextUtils } from "src/utils"; import { TextField, URLField } from "src/utils/field"; @@ -11,6 +11,8 @@ interface ISceneFileInfoPanelProps { export const SceneFileInfoPanel: React.FC = ( props: ISceneFileInfoPanelProps ) => { + const intl = useIntl(); + function renderFileSize() { if (props.scene.file.size === undefined) { return; @@ -123,15 +125,21 @@ export const SceneFileInfoPanel: React.FC = ( truncate /> - frames per - second + - {" "} - frames per second + Date: Tue, 24 Aug 2021 04:01:05 +0200 Subject: [PATCH 37/51] Rebuild gallery edit using formik (#1654) * Rebuild gallery edit using formik * Prompt on page leave when changes are not saved * Fixes missing required validation * Only enables save when changes are made * Wrap in
    (not sure if this does anything) --- .../src/components/Changelog/versions/v090.md | 1 + .../GalleryDetails/GalleryEditPanel.tsx | 444 ++++++++++-------- 2 files changed, 261 insertions(+), 184 deletions(-) diff --git a/ui/v2.5/src/components/Changelog/versions/v090.md b/ui/v2.5/src/components/Changelog/versions/v090.md index abbe3fe64..8855adad5 100644 --- a/ui/v2.5/src/components/Changelog/versions/v090.md +++ b/ui/v2.5/src/components/Changelog/versions/v090.md @@ -9,6 +9,7 @@ * Added not equals/greater than/less than modifiers for resolution criteria. ([#1568](https://github.com/stashapp/stash/pull/1568)) ### 🎨 Improvements +* Prompt when leaving gallery edit page with unsaved changes. ([#1654](https://github.com/stashapp/stash/pull/1654)) * Show largest duplicates first in scene duplicate checker. ([#1639](https://github.com/stashapp/stash/pull/1639)) * Added checkboxes to scene list view. ([#1642](https://github.com/stashapp/stash/pull/1642)) * Added keyboard shortcuts for scene queue navigation. ([#1635](https://github.com/stashapp/stash/pull/1635)) diff --git a/ui/v2.5/src/components/Galleries/GalleryDetails/GalleryEditPanel.tsx b/ui/v2.5/src/components/Galleries/GalleryDetails/GalleryEditPanel.tsx index b2e8092f4..c83b94bc7 100644 --- a/ui/v2.5/src/components/Galleries/GalleryDetails/GalleryEditPanel.tsx +++ b/ui/v2.5/src/components/Galleries/GalleryDetails/GalleryEditPanel.tsx @@ -11,6 +11,7 @@ import { } from "react-bootstrap"; import Mousetrap from "mousetrap"; import * as GQL from "src/core/generated-graphql"; +import * as yup from "yup"; import { queryScrapeGallery, queryScrapeGalleryURL, @@ -28,7 +29,9 @@ import { LoadingIndicator, } from "src/components/Shared"; import { useToast } from "src/hooks"; -import { FormUtils, EditableTextUtils, TextUtils } from "src/utils"; +import { useFormik } from "formik"; +import { Prompt } from "react-router"; +import { FormUtils, TextUtils } from "src/utils"; import { RatingStars } from "src/components/Scenes/SceneDetails/RatingStars"; import { GalleryScrapeDialog } from "./GalleryScrapeDialog"; @@ -53,25 +56,11 @@ export const GalleryEditPanel: React.FC< const intl = useIntl(); const Toast = useToast(); const history = useHistory(); - const [title, setTitle] = useState(gallery?.title ?? ""); - const [details, setDetails] = useState(gallery?.details ?? ""); - const [url, setUrl] = useState(gallery?.url ?? ""); - const [date, setDate] = useState(gallery?.date ?? ""); - const [rating, setRating] = useState(gallery?.rating ?? NaN); - const [studioId, setStudioId] = useState( - gallery?.studio?.id ?? undefined - ); - const [performerIds, setPerformerIds] = useState( - gallery?.performers.map((p) => p.id) ?? [] - ); - const [tagIds, setTagIds] = useState( - gallery?.tags.map((t) => t.id) ?? [] - ); const [scenes, setScenes] = useState<{ id: string; title: string }[]>( - gallery?.scenes.map((s) => ({ + (gallery?.scenes ?? []).map((s) => ({ id: s.id, title: s.title ?? TextUtils.fileNameFromPath(s.path ?? ""), - })) ?? [] + })) ); const Scrapers = useListGalleryScrapers(); @@ -88,10 +77,59 @@ export const GalleryEditPanel: React.FC< const [createGallery] = useGalleryCreate(); const [updateGallery] = useGalleryUpdate(); + const schema = yup.object({ + title: yup.string().required(), + details: yup.string().optional().nullable(), + url: yup.string().optional().nullable(), + date: yup.string().optional().nullable(), + rating: yup.number().optional().nullable(), + studio_id: yup.string().optional().nullable(), + performer_ids: yup.array(yup.string().required()).optional().nullable(), + tag_ids: yup.array(yup.string().required()).optional().nullable(), + scene_ids: yup.array(yup.string().required()).optional().nullable(), + }); + + const initialValues = { + title: gallery?.title ?? "", + details: gallery?.details ?? "", + url: gallery?.url ?? "", + date: gallery?.date ?? "", + rating: gallery?.rating ?? null, + studio_id: gallery?.studio?.id, + performer_ids: (gallery?.performers ?? []).map((p) => p.id), + tag_ids: (gallery?.tags ?? []).map((t) => t.id), + scene_ids: (gallery?.scenes ?? []).map((s) => s.id), + }; + + type InputValues = typeof initialValues; + + const formik = useFormik({ + initialValues, + validationSchema: schema, + onSubmit: (values) => onSave(getGalleryInput(values)), + }); + + function setRating(v: number) { + formik.setFieldValue("rating", v); + } + + interface ISceneSelectValue { + id: string; + title: string; + } + + function onSetScenes(items: ISceneSelectValue[]) { + setScenes(items); + formik.setFieldValue( + "scene_ids", + items.map((i) => i.id) + ); + } + useEffect(() => { if (isVisible) { Mousetrap.bind("s s", () => { - onSave(); + formik.handleSubmit(); }); Mousetrap.bind("d d", () => { onDelete(); @@ -140,28 +178,24 @@ export const GalleryEditPanel: React.FC< setQueryableScrapers(newQueryableScrapers); }, [Scrapers]); - function getGalleryInput() { + function getGalleryInput( + input: InputValues + ): GQL.GalleryCreateInput | GQL.GalleryUpdateInput { return { id: isNew ? undefined : gallery?.id ?? "", - title: title ?? "", - details, - url, - date, - rating: rating ?? null, - studio_id: studioId ?? null, - performer_ids: performerIds, - tag_ids: tagIds, - scene_ids: scenes.map((s) => s.id), + ...input, }; } - async function onSave() { + async function onSave( + input: GQL.GalleryCreateInput | GQL.GalleryUpdateInput + ) { setIsLoading(true); try { if (isNew) { const result = await createGallery({ variables: { - input: getGalleryInput(), + input: input as GQL.GalleryCreateInput, }, }); if (result.data?.galleryCreate) { @@ -171,7 +205,7 @@ export const GalleryEditPanel: React.FC< } else { const result = await updateGallery({ variables: { - input: getGalleryInput() as GQL.GalleryUpdateInput, + input: input as GQL.GalleryUpdateInput, }, }); if (result.data?.galleryUpdate) { @@ -185,6 +219,7 @@ export const GalleryEditPanel: React.FC< } ), }); + formik.resetForm({ values: formik.values }); } } } catch (e) { @@ -196,7 +231,9 @@ export const GalleryEditPanel: React.FC< async function onScrapeClicked(scraper: GQL.Scraper) { setIsLoading(true); try { - const galleryInput = getGalleryInput() as GQL.GalleryUpdateInput; + const galleryInput = getGalleryInput( + formik.values + ) as GQL.GalleryUpdateInput; const result = await queryScrapeGallery(scraper.id, galleryInput); if (!result.data || !result.data.scrapeGallery) { Toast.success({ @@ -238,7 +275,7 @@ export const GalleryEditPanel: React.FC< return; } - const currentGallery = getGalleryInput(); + const currentGallery = getGalleryInput(formik.values); return ( 0) { const newIds = idPerfs.map((p) => p.stored_id); - setPerformerIds(newIds as string[]); + formik.setFieldValue("performer_ids", newIds as string[]); } } @@ -326,18 +363,18 @@ export const GalleryEditPanel: React.FC< if (idTags.length > 0) { const newIds = idTags.map((t) => t.stored_id); - setTagIds(newIds as string[]); + formik.setFieldValue("tag_ids", newIds as string[]); } } } async function onScrapeGalleryURL() { - if (!url) { + if (!formik.values.url) { return; } setIsLoading(true); try { - const result = await queryScrapeGalleryURL(url); + const result = await queryScrapeGalleryURL(formik.values.url); if (!result || !result.data || !result.data.scrapeGalleryURL) { return; } @@ -350,7 +387,7 @@ export const GalleryEditPanel: React.FC< } function maybeRenderScrapeButton() { - if (!url || !urlScrapable(url)) { + if (!formik.values.url || !urlScrapable(formik.values.url)) { return undefined; } return ( @@ -364,158 +401,197 @@ export const GalleryEditPanel: React.FC< ); } + function renderTextField(field: string, title: string, placeholder?: string) { + return ( + + {FormUtils.renderLabel({ + title, + })} +
    @@ -27,9 +30,7 @@ export const PerformerListTable: React.FC = ( -
    - -
    +
    {performer.name}
    {performer.aliases ? performer.aliases : ""} + +
    {performer.image_count}
    + +
    + +
    {performer.gallery_count}
    + +
    {performer.birthdate} {performer.height}
    - NameAliasesFavouriteScene CountBirthdateHeight{intl.formatMessage({ id: "name" })}{intl.formatMessage({ id: "aliases" })}{intl.formatMessage({ id: "favourite" })}{intl.formatMessage({ id: "scene_count" })}{intl.formatMessage({ id: "image_count" })}{intl.formatMessage({ id: "gallery_count" })}{intl.formatMessage({ id: "birthdate" })}{intl.formatMessage({ id: "height" })}
    -
    - -
    +
    {scene.title ?? TextUtils.fileNameFromPath(scene.path)}
    {scene.rating ? scene.rating : ""}