Skip to content

Number string is converted to int #50

@brabanod

Description

@brabanod

When I define a variable in my .env file like this:

MyVar = "0001"

This will be translated by arkana into an integer with the trailing zeros being removed.

@inline(__always)
public let myVar: Int = {
    let encoded: [UInt8] = [
        0xa8, 0x5, 0x7, 0xf1
    ]
    return ArkanaKeys.decode(encoded: encoded, cipher: ArkanaKeys.salt)
}()

What I need however is to have the exact same string "0001" when I access myVar in the code. Is this a bug or is there a way to force parsing as string?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions