Package testpkg

import "gitlab.com/zoralab/godocgen/internal/testpkg"

Package testpkg is a test package for godocgen to test on.

It is a simple package holding all known permutations and combinations of Go documentation styles. Then, godocgen will generate an output using this testpkg package.

Testpkg is an internal package which is exclusive only for Godocgen to import from. External third-party importing is prohibited by Go build system.

Example

How to demonstrate package first example.

fmt.Println("This is the package main example")


// Output:
// This is the package main example

Fourth Example:

fmt.Println("Fourth Package Example")


// Output:
// Fourth Package Example

Second Example: Second Package Example

fmt.Println("Second Package Example")


// Output:
// Second Package Example

Constants

Greeting sentences

const (
	// HelloWorld is to greet the world!
	HelloWorld = "Hello World!"


	MissingLabel = "Constant without label"


	// NormalText is another text
	NormalText = "Normal!"
)
const (
	// No1 is inside a constant group forgotten to be described!
	No1 = "Number 1!"
)

Functions

Func Greet(name string) string

Greet is to greet a specific person and initiate a conversation with him/her.

This function is specifically used for interacting with an individual to query and conversate.

Func SayHello() string

SayHello is to greet the world and initiate a conversation.

This function is generally used across everyone who is curious to know another.

`Func WhatIs(this interface

Person

type Person struct {
	// holds the name of the person
	Name string

	// holds the date of birth
	DOB string

	Phone string
}

Person is a structure holding a person's details

This structure is safe to create using the conventional &Person{} method. Alternatively, you may use NewPerson() function.

First Example: This example demonstrates how to use Person Type

fmt.Printf("This is A Person Type Example\n")


// Output:
// This is A Person Type Example

Fourth Person Example:

fmt.Printf("This is A Person fourth example\n")


// Output:
// This is A Person fourth example

Second Person Example: This example demonstrates Person Type’ Special Usage

fmt.Printf("This is A Person second example\n")


// Output:
// This is A Person second example

Func NewPerson() *Person

NewPerson is to create a new Person object.

It returns the object pointer as a result.

First Example: Example of demonstrating the use of NewPerson()

fmt.Printf("This is newPerson\n")


// Output:
// This is newPerson

Fourth NewPerson Example:

fmt.Printf("This is newPerson IV\n")


// Output:
// This is newPerson IV

Second NewPerson Example: Example of demonstrating the use of NewPerson() II

fmt.Printf("This is newPerson II\n")


// Output:
// This is newPerson II

Func (p *Person) Greet(name string) string

Greet is to make the person to greet someone else.

This is to initiate conversation with an individual.

First Example: Demonstrate how to use Person.Greet(“Name”) I

fmt.Printf("This is Person Greet I\n")


// Output:
// This is Person Greet I

Fourth Person.Greet Example:

fmt.Printf("This is Person Greet IV\n")


// Output:
// This is Person Greet IV

Second Person.Greet Example: Demonstrate how to use Person.Greet(“Name”) II

fmt.Printf("This is Person Greet II\n")


// Output:
// This is Person Greet II

Func (p *Person) SayGoodbye(name string) string