Skip to content

Commit

Permalink
Use Quick Start instead of Quickstart
Browse files Browse the repository at this point in the history
Signed-off-by: Baiju Muthukadan <[email protected]>
  • Loading branch information
baijum committed Jun 8, 2023
1 parent 5cac520 commit 8b92707
Show file tree
Hide file tree
Showing 14 changed files with 88 additions and 89 deletions.
2 changes: 1 addition & 1 deletion amazon/product-description.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ <h4>Key Features of the Book</h4>
<h4>Table of Contents</h4>
<ul>
<li>1. Introduction</li>
<li>2. Quickstart</li>
<li>2. Quick Start</li>
<li>3. Control Structures</li>
<li>4. Data Structures</li>
<li>5. Functions</li>
Expand Down
2 changes: 1 addition & 1 deletion answers.tex
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ \chapter*{Appendix A: Answers}
\addcontentsline{toc}{chapter}{Appendix A: Answers}
\markboth{Appendix A: Answers}{Appendix A: Answers}

\section*{Chapter 2: Quickstart}
\section*{Chapter 2: Quick Start}

\textbf{Problem 1:} Write a function to check whether the first letter
in a given string is capital letters in English (A,B,C,D etc).
Expand Down
35 changes: 16 additions & 19 deletions control-structures.tex
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,12 @@ \chapter{Control Structures}
computer. Art is everything else we do.} --- Donald E. Knuth
\end{quote}

Control structure determines how the code block will get executed for
the given conditional expressions and parameters. Go provides a
number of control structures
including \textit{for}, \textit{if}, \textit{switch}, \textit{defer},
and \textit{goto}. The quickstart chapter has already introduced
control structures like \textit{if} and \textit{for}. This chapter
will elaborate more about these topics and introduce some other
related topics.
Control structure determines how the code block will get executed for the given
conditional expressions and parameters. Go provides a number of control
structures including \textit{for}, \textit{if}, \textit{switch}, \textit{defer},
and \textit{goto}. The Quick Start chapter has already introduced control
structures like \textit{if} and \textit{for}. This chapter will elaborate more
about these topics and introduce some other related topics.

\section{If}

Expand Down Expand Up @@ -105,14 +103,13 @@ \subsection{Example}
}
\end{lstlisting}

The \texttt{os} package has an attribute named \texttt{Args}. The
value of \texttt{Args} will be a slice of strings which contains all
command line arguments passed while running the program. As we have
learned from the Quickstart chapter, the values can be accessed using
the index syntax. The value at zero index will be the program name
itself and the value at 1st index the first argument and the value at
2nd index the second argument and so on. Since we are expecting only
one argument, you can access it using the 1st index
The \texttt{os} package has an attribute named \texttt{Args}. The value
of \texttt{Args} will be a slice of strings which contains all command line
arguments passed while running the program. As we have learned from the Quick
Start chapter, the values can be accessed using the index syntax. The value at
zero index will be the program name itself and the value at 1st index the first
argument and the value at 2nd index the second argument and so on. Since we are
expecting only one argument, you can access it using the 1st index
(\texttt{os.Args[1]}).

The \texttt{strconv} package provides a function named \texttt{Atoi}
Expand Down Expand Up @@ -218,9 +215,9 @@ \section{For}

\subsection{Basic For}

As we have seen briefly in the Quickstart, the For\index{for} control
structure helps to create loops to repeat certain actions. The For
control structure has few syntax variants.
As we have seen briefly in the Quick Start, the For\index{for} control structure
helps to create loops to repeat certain actions. The For control structure has
few syntax variants.

Consider a program to print few names.

Expand Down
4 changes: 2 additions & 2 deletions data-structures.tex
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ \section{Primitive Data Types}

\subsection{Zero Value}

In the Quickstart chapter, you have learned various ways to declare a variable.
In the Quick Start chapter, you have learned various ways to declare a variable.
When you declare a variable using the \texttt{var}
\index{var keyword} statement without assigning a value, a default Zero value
\index{zero value} will be assigned for certain types. The Zero value is 0 for
Expand Down Expand Up @@ -653,7 +653,7 @@ \subsection{Slice Append Optimization}
\section{Maps}

Map\index{map} is another important data structure in Go. We have
briefly discussed about maps in the Quickstart chapter. As you know,
briefly discussed about maps in the Quick Start chapter. As you know,
map is an implementation of hash table. The hash table is available
in many very high level languages. The data in map is organized like
key value pairs.
Expand Down
2 changes: 1 addition & 1 deletion functions.tex
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ \chapter{Functions \& Methods}

Mathematical function would be a good analogy to understand the
concept of functions in programming. We have seen this mathematical
function in the Quickstart chapter.
function in the Quick Start chapter.

\begin{figure}[h!]
\centering
Expand Down
51 changes: 26 additions & 25 deletions introduction.tex
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ \section{Preparations}

Text editors like Notepad, Notepad++, Gedit, and Vim can be used to write Go
programs. The file that you create using the text file is called source file.
The source file text is UTF-8 encoded. The Go compiler creates executable
programs from the source file. You can run the executable program and get the
output. So, you need a text editor and Go compiler installed in your system.
The Go compiler creates executable programs from the source file. You can run
the executable program and get the output. So, you need a text editor and Go
compiler installed in your system.

Depending on your operating system, follow the instruction given below to
install the Go compiler. If you have difficulty following this, you may get some
Expand All @@ -77,7 +77,7 @@ \section{Preparations}

You can use any text editor to write code. If you are not familiar with any text
editor, consider using Vim. You can bootstrap Vim configuration for Go
programming language from this webste: \url{https://vim-bootstrap.com}.
programming language from this website: \url{https://vim-bootstrap.com}.

Using a source code management system like Git would be helpful. Keeping all
your code under version control is highly recommended. You can use a public code
Expand All @@ -91,7 +91,7 @@ \subsection{Linux Installation}
The following commands will download and install\index{install!linux} Go
compiler in a 64 bit GNU/Linux system. Before performing these steps, ensure Go
compiler is not installed by running \texttt{go} command. If it
prints \textit{command not found...}, you can proceed with these steps.
prints \texttt{command not found...}, you can proceed with these steps.

These commands must be run as \textit{root} or through \textit{sudo}. If you do
not know how to do it, you can get help from somebody else.
Expand All @@ -105,10 +105,11 @@ \subsection{Linux Installation}
The first line ensure that current working directory is the \texttt{/tmp}
directory.

You should change the version number in the second line and it's going to
download the 64 bit binary for GNU/Linux. The \texttt{wget} is a command line
download manager. Alternatively you can use \texttt{curl} or any other download
manager to download the tar ball.
In the second line, replace the version number from
the \href{https://go.dev/dl}{Go downloads} website. It's going to download the
64 bit binary for GNU/Linux. The \texttt{wget} is a command line download
manager. Alternatively you can use \texttt{curl} or any other download manager
to download the tar ball.

The third line extract the downloaded tar ball into \texttt{/usr/local/go}
directory.
Expand All @@ -117,8 +118,8 @@ \subsection{Linux Installation}

By default Go packages are installed under \texttt{\$HOME/go} directory. This
directory can be overridden using \texttt{GOPATH} environment variable. Any
binaries installed using \texttt{go install} and \texttt{go get} commands goes
into \texttt{\$GOPATH/bin} directory.
binaries installed using \texttt{go install} goes into \texttt{\$GOPATH/bin}
directory.

You can also update PATH environment variable to include new binary locations.
Open the \texttt{\$HOME/.bashrc} file in a text editor and enter this lines at
Expand Down Expand Up @@ -206,9 +207,9 @@ \subsection{Hello World!}
\subsection{Using Git}

You should be comfortable using a source code management system. As mentioned
above Git\index{git} would be a good choice. You can create an account in GitHub
and publish your example code there. If you do not have any prior experience,
you can spend 2 to 3 days to learn Git.
before, Git\index{git} would be a good choice. You can create an account in
GitHub and publish your example code there. If you do not have any prior
experience, you can spend 2 to 3 days to learn Git.

\subsection{Using Command Line}

Expand Down Expand Up @@ -305,12 +306,12 @@ \subsection{Using Command Line}

\section{Organization of Chapters}

The rest of the book is organized into the following chapters. It is recommended
to read the first six chapters in order -- that's until the chapter on
interfaces. The remaining chapters can be read in any order.
The rest of the book is organized into the following chapters. You can read the
first six chapters in the given order. The remaining chapters can be read in any
order.

\begin{description}
\item[Chapter 2: Quickstart] \hfill \\
\item[Chapter 2: Quick Start] \hfill \\
This chapter provides a tutorial introduction to the language. It introduce few
basic topics in Go programming language. The topics include Data Types,
Variables, Comments, For Loop, Range Clause, If, Function, Operators, Slices,
Expand Down Expand Up @@ -378,20 +379,20 @@ \section{Suggestions to Use this Book}
Git to manage your code. You can write exercises and solve additional problems
and keep it under version control.

I would suggest not to copy \& paste code from the E-book. Rather you can type
every examples in this book. This will help you to familiarize the syntax much
I would suggest not to copy \& paste code from the book. Rather, you can type
every example in this book. This will help you to familiarize the syntax much
quickly.

The first 6 chapters, that is from Introduction to Interfaces should be read in
order. The remaining chapters are based on the first 6 chapters. So, the chapter
7 onward can be read in any order.
order. The remaining chapters are based on the first 6 chapters. And chapters 7
onward can be read in any order.

\section*{Summary}

This chapter provided an introduction to Go programming language. We briefly
discussed about topics required to become a good programmer.
%% Later we covered source code organization in the workspace.

Then we covered chapter organization in this book. And finally few suggestions
for readers are given. The next chapter provides a quickstart to programming
with Go language.
Then we covered chapter organization in this book. And finally, I offer a few
suggestions for how to use this book. The next chapter provides a quick start to
programming with Go language.
2 changes: 1 addition & 1 deletion quickstart.tex
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
\cleardoublepage
\phantomsection
\chapter{Quickstart}
\chapter{Quick Start}

\begin{quote}
\textit{Software engineering is what happens to programming when you add time,
Expand Down
2 changes: 1 addition & 1 deletion scripts/code_block.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
],
},
"sphinx/functions.rst": {
"the Quickstart chapter.": [
"the Quick Start chapter.": [
"\n.. figure:: _static/function/formula.png\n",
"\n Figure 5.1: Mathematical function for area of a circle\n",
],
Expand Down
4 changes: 2 additions & 2 deletions sphinx/answers.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Appendix A: Answers
===================

Chapter 2: Quickstart
---------------------
Chapter 2: Quick Start
----------------------

**Problem 1:** Write a function to check whether the first letter in a
given string is capital letters in English (A,B,C,D etc).
Expand Down
10 changes: 5 additions & 5 deletions sphinx/control-structures.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ Control Structures
Control structure determines how the code block will get executed for
the given conditional expressions and parameters. Go provides a number
of control structures including *for*, *if*, *switch*, *defer*, and
*goto*. The quickstart chapter has already introduced control structures
like *if* and *for*. This chapter will elaborate more about these topics
and introduce some other related topics.
*goto*. The Quick Start chapter has already introduced control
structures like *if* and *for*. This chapter will elaborate more about
these topics and introduce some other related topics.

If
--
Expand Down Expand Up @@ -106,7 +106,7 @@ argument.
The ``os`` package has an attribute named ``Args``. The value of
``Args`` will be a slice of strings which contains all command line
arguments passed while running the program. As we have learned from the
Quickstart chapter, the values can be accessed using the index syntax.
Quick Start chapter, the values can be accessed using the index syntax.
The value at zero index will be the program name itself and the value at
1st index the first argument and the value at 2nd index the second
argument and so on. Since we are expecting only one argument, you can
Expand Down Expand Up @@ -214,7 +214,7 @@ For
Basic For
~~~~~~~~~

As we have seen briefly in the Quickstart, the For control structure
As we have seen briefly in the Quick Start, the For control structure
helps to create loops to repeat certain actions. The For control
structure has few syntax variants.

Expand Down
4 changes: 2 additions & 2 deletions sphinx/data-structures.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ section is going to cover the primitive data types in Go.
Zero Value
~~~~~~~~~~

In the Quickstart chapter, you have learned various ways to declare a
In the Quick Start chapter, you have learned various ways to declare a
variable. When you declare a variable using the ``var`` statement
without assigning a value, a default Zero value will be assigned for
certain types. The Zero value is 0 for integers and floats, empty string
Expand Down Expand Up @@ -750,7 +750,7 @@ Maps
----

Map is another important data structure in Go. We have briefly discussed
about maps in the Quickstart chapter. As you know, map is an
about maps in the Quick Start chapter. As you know, map is an
implementation of hash table. The hash table is available in many very
high level languages. The data in map is organized like key value pairs.

Expand Down
2 changes: 1 addition & 1 deletion sphinx/functions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ and optionally return values.

Mathematical function would be a good analogy to understand the concept
of functions in programming. We have seen this mathematical function in
the Quickstart chapter.
the Quick Start chapter.

.. figure:: _static/function/formula.png

Expand Down
Loading

0 comments on commit 8b92707

Please sign in to comment.