Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
addedVars=$(git diff ORIG_HEAD HEAD --exit-code -- .env.example | tail -n +6 | grep '^\+' | sed '/^\+/ s/^\+//' | sed '/^[[:space:]]*$/d') | |
new=$(echo "$addedVars" | while read v; do | |
if [[ !$(cat .env | grep ^$v=) ]]; then | |
echo $v | |
fi | |
done) | |
if [[ "$new" ]]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Set is a collection of unique values. | |
type Set[T comparable] struct { | |
elements map[T]bool | |
} | |
// NewSet creates a new empty set. | |
func NewSet[T comparable]() *Set[T] { | |
return &Set[T]{elements: map[T]bool{}} | |
} |