Documentation
¶
Overview ¶
Package utils is a package that contains all the utility functions
Copyright © 2021 Tonye Jack <jtonye@ymail.com>
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Package utils is a package that contains all the utility functions ¶
Copyright © 2021 Tonye Jack <jtonye@ymail.com>
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Package utils is a package that contains all the utility functions ¶
Copyright © 2021 Tonye Jack <jtonye@ymail.com>
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Package utils is a package that contains all the utility functions ¶
Copyright © 2021 Tonye Jack <jtonye@ymail.com>
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Package utils is a package that contains all the utility functions ¶
Copyright © 2021 Tonye Jack <jtonye@ymail.com>
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- func FormatValue(v string, escape bool, lineSeparator string) string
- func GetLatestRepositoryTag(repository, token string, useMajorVersion bool, useTagCommitHash bool) (string, error)
- func GetTagCommitHash(repository, tag, token string) (string, error)
- func HasBytesInBetween(value, start, end []byte) (found bool, indices [][]int)
- func MarkdownLink(s string, t string) string
- func ReplaceBytesInBetween(value []byte, indices [][]int, new []byte) []byte
- func WordWrap(s string, limit int, lineSeparator string) string
- type Release
- type Tag
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatValue ¶
FormatValue formats a string that would be output as markdown
func GetLatestRepositoryTag ¶ added in v3.2.0
func GetLatestRepositoryTag(repository, token string, useMajorVersion bool, useTagCommitHash bool) (string, error)
GetLatestRepositoryTag returns the latest tag of a repository
func GetTagCommitHash ¶ added in v3.6.0
GetTagCommitHash returns the commit hash of a tag
func HasBytesInBetween ¶
HasBytesInBetween checks if a byte array has a start and end byte array and returns true if and all occurrences of start and end
func MarkdownLink ¶
MarkdownLink formats input, output and secret name to Markdown link (named anchor) and return the link
func ReplaceBytesInBetween ¶
ReplaceBytesInBetween replaces a byte array between an array of start and end indices with a new byte array