From abc364e21298c63ed3e51de355b9b9039dc8c6b2 Mon Sep 17 00:00:00 2001 From: Luka Vandervelden Date: Mon, 24 Sep 2018 22:10:24 +0200 Subject: [PATCH] chomp() used instead of gsub where possible. --- src/main.cr | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.cr b/src/main.cr index 8c54cbe..1e3b388 100644 --- a/src/main.cr +++ b/src/main.cr @@ -28,11 +28,11 @@ Kemal.config.extra_options do |parser| end parser.on "-P file", "--password-file file", "Password file." do |file_name| - authd_db_password = File.read(file_name).gsub /\n$/, "" + authd_db_password = File.read(file_name).chomp end parser.on "-K file", "--key-file file", "JWT key file" do |file_name| - authd_jwt_key = File.read(file_name).gsub /\n$/, "" + authd_jwt_key = File.read(file_name).chomp end end