@@ -191,14 +191,14 @@ func readKeySecret() (string, string) {
191191key := os .Getenv ("LIVEKIT_KEY" )
192192secret := os .Getenv ("LIVEKIT_SECRET" )
193193// We initialize potential key & secret path from environment variables
194- key_path := os .Getenv ("LIVEKIT_KEY_FROM_FILE" )
195- secret_path := os .Getenv ("LIVEKIT_SECRET_FROM_FILE" )
196- key_secret_path := os .Getenv ("LIVEKIT_KEY_FILE" )
194+ keyPath := os .Getenv ("LIVEKIT_KEY_FROM_FILE" )
195+ secretPath := os .Getenv ("LIVEKIT_SECRET_FROM_FILE" )
196+ keySecretPath := os .Getenv ("LIVEKIT_KEY_FILE" )
197197
198- // If key_secret_path is set we read the file and split it into two parts
198+ // If keySecretPath is set we read the file and split it into two parts
199199// It takes over any other initialization
200- if key_secret_path != "" {
201- if keySecretBytes , err := os .ReadFile (key_secret_path ); err != nil {
200+ if keySecretPath != "" {
201+ if keySecretBytes , err := os .ReadFile (keySecretPath ); err != nil {
202202log .Fatal (err )
203203} else {
204204key_secrets := strings .Split (string (keySecretBytes ), ":" )
@@ -209,18 +209,18 @@ func readKeySecret() (string, string) {
209209secret = key_secrets [1 ]
210210}
211211} else {
212- // If key_secret_path , we try to read the key and secret from files
212+ // If keySecretPath is not set , we try to read the key and secret from files
213213// If those files are not set, we return the key & secret from the environment variables
214- if key_path != "" {
215- if keyBytes , err := os .ReadFile (key_path ); err != nil {
214+ if keyPath != "" {
215+ if keyBytes , err := os .ReadFile (keyPath ); err != nil {
216216log .Fatal (err )
217217} else {
218218key = string (keyBytes )
219219}
220220}
221221
222- if secret_path != "" {
223- if secretBytes , err := os .ReadFile (secret_path ); err != nil {
222+ if secretPath != "" {
223+ if secretBytes , err := os .ReadFile (secretPath ); err != nil {
224224log .Fatal (err )
225225} else {
226226secret = string (secretBytes )
0 commit comments