secret-santa-allocator

command module
v0.0.0-...-1ea0709 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 14, 2023 License: MIT Imports: 5 Imported by: 0

README

Secret Santa Allocator

A stupidly over engineered secret santa allocator.

Simple binary to create a secret santa allocation of santas to santees. Loads two text files and creates a derangement of names to names with a password so users can input the password and find who their match is.

Usage

Default usage is providing a config file which defines the names and constraints of the allocation

secret-santa --configFile config.yaml

The config file is a yaml file with these fields

# must provide either `file` or `data` field. If both then they are unioned and deduped
names: 
  file: "names.txt" # name of file that contains a list of names
  data: ["sam", "tom", "jim", "grace", "bill"] # array of names that is unioned with the above file

# same as above but for passwords
passwords: 
  file: "passwords.txt"
  data: ["password1", "password2", "password3"]

canAllocateSelf: false # can you be allocated yourself
timeout: 5s # timeout of finding a suitable allocation

# rules per name
rules: 
  - name: "sam" 
    cannotGet:  # will not be allocated
      - "matt"
      - "grace"
  - name: "grace"
    cannotGet:
      - "sam"
      - "olivia c."

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg
allocator
Package allocator implements santa allocations
Package allocator implements santa allocations

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL