Skip to content

Cannot define time.Duration global variables #37

@BrownNPC

Description

@BrownNPC

Currently you cannot define a global variable like

var Timeout = time.Second * 2
// or
const Timeoutconst = time.Second * 2

Because we get a compiler error:

 initializer element is not constant
   12 | time_Duration net_TCPConnectTimeout = time_Second * 5;
      |                                       ^~~~~~~~~~~

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions