Skip to content
This repository has been archived by the owner on Jun 5, 2021. It is now read-only.

Commit

Permalink
Allow panic for library
Browse files Browse the repository at this point in the history
Will fix it if needed. gortc/stun used it in safe places.
  • Loading branch information
ernado committed May 21, 2019
1 parent 1d6158f commit 6d42c41
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/lint-disallowed-functions-in-library.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ set -e
# Disallow usages of functions that cause the program to exit in the library code
SCRIPT_PATH=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )
EXCLUDE_DIRECTORIES="--exclude-dir=examples --exclude-dir=cmd --exclude-dir=.git --exclude-dir=.github --exclude-dir=test"
DISALLOWED_FUNCTIONS=('os.Exit(' 'panic(' 'Fatal(' 'Fatalf(' 'Fatalln(' 'fmt.Println(' 'fmt.Printf(' 'log.Print(' 'log.Println(' 'log.Printf(')
# TODO(ar): Add back panic
DISALLOWED_FUNCTIONS=('os.Exit(' 'Fatal(' 'Fatalf(' 'Fatalln(' 'fmt.Println(' 'fmt.Printf(' 'log.Print(' 'log.Println(' 'log.Printf(')


for disallowedFunction in "${DISALLOWED_FUNCTIONS[@]}"
Expand Down

0 comments on commit 6d42c41

Please sign in to comment.