criteo / haproxy-spoe-go

An implementation of the SPOP protocol in Go. https://www.haproxy.org/download/2.0/doc/SPOE.txt
Apache License 2.0
28 stars 14 forks source link

Expose variable scope as public type #36

Closed jan-dubsky closed 2 years ago

jan-dubsky commented 2 years ago

I wanted to write a logic determining the scope of a variable. Preudocode below:

import spoe "github.com/criteo/haproxy-spoe-go"

func varScope(params...) spoe.varScope {
    ...
}

This code cannot compile as the varScope type is not exported.

This PR exposes the the type which allows everyone outside of the package to operate with variable scopes.