Sha256: 60a1038b97ed2f67741736fe3fd9765df7be2522e8574b1f5690870d50fb4ad5
Contents?: true
Size: 384 Bytes
Versions: 16
Compression:
Stored size: 384 Bytes
Contents
<%- err_type_name = "InvalidEnumName" err_type = packages.type_for(err_type_name) if err_type import err_type.package -%> func StringTo<%= type.name %>(s string) (<%= type.name %>, error) { val, ok := <%= type.name %>NameToValue[s] if ok { return val, nil } else { err := &<%= err_type.qualified_name %>{Name: s} return <%= type.name %>(0), err } } <%- end -%>
Version data entries
16 entries across 16 versions & 1 rubygems