PageSourceSearch

https://openfeature.netlify.app/assets/js/b06c6a74.c7d876f2.js

js openfeature.netlify.app collected 2026-10-03 11:15:11 UTC 2,915 bytes, 1 lines download raw bytes

1"use strict";(globalThis.webpackChunkdocs||=[]).push([[2662],{20952(e,t,o){o.r(t),o.d(t,{default:()=>g,metadata:()=>a});var a=o(75689),n=o(74848),r=o(28453);const s={slug:"creating-a-hook-for-the-go-sdk",title:"Creating a Hook for the go-sdk",authors:["skyerus"],date:new Date("2022-08-26T00:00:00.000Z"),tags:["golang","blog","tutorial","go-sdk","hooks"],unlisted:!1},i={authorsImageUrls:[void 0]};function l(e){const t={a:"a",p:"p",...(0,r.R)(),...e.components};return(0,n.jsxs)(t.p,{children:["A ",(0,n.jsx)(t.a,{href:"/specification/sections/hooks",children:"Hook"})," taps into one or more of the flag evaluation's\nlifecycle events (before/after/error/finally) to perform the same action at that point for every evaluation.\nIn this blog post, we'll look into what it takes to create an OpenFeature hook in Go that verifies that the return value is a valid hex color."]})}function g(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(l,{...e})}):l(e)}o.d(t,["assets",0,i,"contentTitle",0,void 0,"frontMatter",0,s,"toc",0,[]])},28453(e,t,o){o.d(t,{R:()=>s,x:()=>i});var a=o(96540);const n={},r=a.createContext(n);function s(e){const t=a.useContext(r);return a.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:s(e.components),a.createElement(r.Provider,{value:t},e.children)}},75689(e){e.exports=JSON.parse('{"permalink":"/blog/creating-a-hook-for-the-go-sdk","editUrl":"https://github.com/open-feature/openfeature.dev/edit/main/blog/2022-08-26-creating-a-hook-for-the-go-sdk.md","source":"@site/blog/2022-08-26-creating-a-hook-for-the-go-sdk.md","title":"Creating a Hook for the go-sdk","description":"A Hook taps into one or more of the flag evaluation\'s","date":"2022-08-26T00:00:00.000Z","tags":[{"inline":true,"label":"golang","permalink":"/blog/tags/golang"},{"inline":true,"label":"blog","permalink":"/blog/tags/blog"},{"inline":true,"label":"tutorial","permalink":"/blog/tags/tutorial"},{"inline":true,"label":"go-sdk","permalink":"/blog/tags/go-sdk"},{"inline":true,"label":"hooks","permalink":"/blog/tags/hooks"}],"readingTime":3.2,"hasTruncateMarker":true,"authors":[{"name":"Skye Gill","title":"Software Engineer at NET Reply, OpenFeature contributor","url":"https://github.com/skyerus","imageURL":"https://github.com/skyerus.png","key":"skyerus","page":null}],"frontMatter":{"slug":"creating-a-hook-for-the-go-sdk","title":"Creating a Hook for the go-sdk","authors":["skyerus"],"date":"2022-08-26T00:00:00.000Z","tags":["golang","blog","tutorial","go-sdk","hooks"],"unlisted":false},"unlisted":false,"prevItem":{"title":"Creating a Provider for the go-sdk","permalink":"/blog/creating-a-provider-for-the-go-sdk"},"nextItem":{"title":"Collection of external articles","permalink":"/blog/external-posts"}}')}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.