Skip to content

Common go packages used by OPG: Managed by opg-org-infra & Terraform

License

Notifications You must be signed in to change notification settings

ministryofjustice/opg-go-common

Repository files navigation

opg-go-common

codecov PkgGoDev

Common go packages used by OPG: Managed by opg-org-infra & Terraform

Using common UI components

Components that include a template element make this available to the consuming service with Golang's embed directive. This initialises the content of a file or directory to a variable (string or embed.FS), which can then be accessed in the usual manner. The consuming service can import and parse this variable into the template map.

Pagination

Typical use of the pagination component is as follows, with the position of the component in the id and aria label updated accordingly:

<div class="govuk-grid-row">
  <nav id="bottom-pagination" aria-label="Bottom pagination">
    {{ template "pagination" .Pagination }}
  </nav>
</div>

About

Common go packages used by OPG: Managed by opg-org-infra & Terraform

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages