Go文档支持

Go文档查看帮助很方便,主要可以通过以下两种方式查看

第一种,Go本地运行(参考:#Go语言安装#)起来后,References下面:

  • Package

    Go标准函数库说明。

  • Command

    Go工具说明。

  • Language Specification

    Go官方语言规范说明。

第二种,命令行中执行查看,如

  • godoc image NewRGBA

    文档说明 image.NewRGBA()函数功能,输出结果如下:

    PACKAGE

    package image
        import "image"

    TYPES

    type RGBA struct {
        // Pix holds the image's pixels, in R, G, B, A order. The pixel at
        // (x, y) starts at Pix[(y-Rect.Min.Y)*Stride + (x-Rect.Min.X)*4].
        Pix []uint8
        // Stride is the Pix stride (in bytes) between vertically adjacent pixels.
        Stride int
        // Rect is the image's bounds.
        Rect Rectangle
    }
        RGBA is an in-memory image whose At method returns color.RGBA values.

    func NewRGBA(r Rectangle) *RGBA
        NewRGBA returns a new RGBA with the given bounds.

    SUBDIRECTORIES

            color
            draw
            gif
            jpeg
            png

  • godoc image/png

    输出整个 image/png包,输出结果如下:

    PACKAGE

    package png
        import "image/png"

        Package png implements a PNG image decoder and encoder.

        The PNG specification is at http://www.w3.org/TR/PNG/.

    FUNCTIONS

    func Decode(r io.Reader) (image.Image, error)
        Decode reads a PNG image from r and returns it as an image.Image. The
        type of Image returned depends on the PNG contents.

    func DecodeConfig(r io.Reader) (image.Config, error)
        DecodeConfig returns the color model and dimensions of a PNG image
        without decoding the entire image.

    func Encode(w io.Writer, m image.Image) error
        Encode writes the Image m to w in PNG format. Any Image may be encoded,
        but images that are not image.NRGBA might be encoded lossily.

    TYPES

    type FormatError string
        A FormatError reports that the input is not a valid PNG.

    func (e FormatError) Error() string

    type UnsupportedError string
        An UnsupportedError reports that the input uses a valid but
        unimplemented PNG feature.

    func (e UnsupportedError) Error() string

点赞
收藏

评论区

加载中...

相关推荐

MySQL:[Err] 1292 - Incorrect datetime value: ‘0000-00-00 00:00:00‘ for column ‘CREATE_TIME‘ at row 1

文章目录问题用navicat导入数据时,报错:原因这是因为当前的MySQL不支持datetime为0的情况。解决修改sql\mode:sql\mode:SQLMode定义了MySQL应支持的SQL语法、数据校验等,这样可以更容易地在不同的环境中使用MySQL。全局s

Oracle 分组与拼接字符串同时使用

SELECTT.,ROWNUMIDFROM(SELECTT.EMPLID,T.NAME,T.BU,T.REALDEPART,T.FORMATDATE,SUM(T.S0)S0,MAX(UPDATETIME)CREATETIME,LISTAGG(TOCHAR(

MySQL部分从库上面因为大量的临时表tmp_table造成慢查询

背景描述Time:20190124T00:08:14.70572408:00User@Host:@Id:Schema:sentrymetaLast_errno:0Killed:0Query_time:0.315758Lock_

皕杰报表之UUID

​在我们用皕杰报表工具设计填报报表时,如何在新增行里自动增加id呢?能新增整数排序id吗?目前可以在新增行里自动增加id,但只能用uuid函数增加UUID编码,不能新增整数排序id。uuid函数说明:获取一个UUID,可以在填报表中用来创建数据ID语法:uuid()或uuid(sep)参数说明:sep布尔值,生成的uuid中是否包含分隔符'',缺省为

手写Java HashMap源码

HashMap的使用教程HashMap的使用教程HashMap的使用教程HashMap的使用教程HashMap的使用教程22

Golang 开发环境搭建

Golang是Google发布的开发语言,Go编译的程序速度可以媲美C/C。安装sudoaptgetinstallgolangsudoaptgetinstallgolanggo.tools使用编译运行程序gorunmain.go查看命令文

Go文档支持 - HelloWorld