# Exported/Unexported Identifiers In Go

DevFeed: [Exported/Unexported Identifiers In Go](<https://devfeed.tech/articles/exported-unexported-identifiers-in-go-22097.md>)

Original publisher: [Read original article](<https://www.ardanlabs.com/blog/2014/03/exportedunexported-identifiers-in-go.html>)

Published: 2014-03-15T00:00:00Z

Content type: tutorial

Language: en

Sources: [William Kennedy](<https://devfeed.tech/sources/william-kennedy.md>)

Topics: [Go Language](<https://devfeed.tech/topics/go-language.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [ardan-labs](<https://devfeed.tech/tags/ardan-labs.md>), [blog](<https://devfeed.tech/tags/blog.md>), [code](<https://devfeed.tech/tags/code.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [go](<https://devfeed.tech/tags/go.md>), [go-programming](<https://devfeed.tech/tags/go-programming.md>), [golang](<https://devfeed.tech/tags/golang.md>), [identifier](<https://devfeed.tech/tags/identifier.md>), [programming](<https://devfeed.tech/tags/programming.md>), [variable](<https://devfeed.tech/tags/variable.md>)

## AI overview

This tutorial explains how Go determines whether types, variables, and functions are exported or unexported based on the capitalization of their names. It shows that unexported identifiers cannot be accessed directly from another package, but can still be used through an exported function such as NewAlertCounter.

## Source excerpt

Introduction One of the first things I learned about in Go was using an uppercase or lowercase letter as the first letter when naming a type, variable or function. It was explained that when the first letter was capitalized, the identifier was public to any piece of code that wanted to use it. When the first letter was lowercase, the identifier was private and could only be accessed within the package it was declared.