Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: go test

on:
push:
branches: ["master"]

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ '1.25' ]

steps:
- uses: actions/checkout@v6
- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v6
with:
go-version: ${{ matrix.go-version }}
- name: go test
run: go test ./... -v
15 changes: 0 additions & 15 deletions .travis.yml

This file was deleted.

8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
[![Build Status](https://travis-ci.org/dave/dst.svg?branch=master)](https://travis-ci.org/dave/dst)
[![Documentation](https://img.shields.io/badge/godoc-documentation-brightgreen.svg)](https://godoc.org/github.com/dave/dst/decorator)
[![codecov](https://img.shields.io/badge/codecov-92%25-brightgreen.svg)](https://codecov.io/gh/dave/dst)
![stability-stable](https://img.shields.io/badge/stability-stable-brightgreen.svg)
[![Sourcegraph](https://sourcegraph.com/github.com/dave/dst/-/badge.svg)](https://sourcegraph.com/github.com/dave/dst?badge)
[![go test](https://github.com/SamuelMarks/dst/actions/workflows/ci.yml/badge.svg)](https://github.com/SamuelMarks/dst/actions/workflows/ci.yml)

# Decorated Syntax Tree

Expand Down Expand Up @@ -703,4 +699,4 @@ For further developing or contributing to `dst`, check out [these notes](https:/

## Special thanks

Thanks very much to [hawkinsw](https://github.com/hawkinsw) for taking on the task of adding generics compatibility to `dst`.
Thanks very much to [hawkinsw](https://github.com/hawkinsw) for taking on the task of adding generics compatibility to `dst`.
8 changes: 2 additions & 6 deletions README.md.tpl
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
[![Build Status](https://travis-ci.org/dave/dst.svg?branch=master)](https://travis-ci.org/dave/dst)
[![Documentation](https://img.shields.io/badge/godoc-documentation-brightgreen.svg)](https://godoc.org/github.com/dave/dst/decorator)
[![codecov](https://img.shields.io/badge/codecov-92%25-brightgreen.svg)](https://codecov.io/gh/dave/dst)
![stability-stable](https://img.shields.io/badge/stability-stable-brightgreen.svg)
[![Sourcegraph](https://sourcegraph.com/github.com/dave/dst/-/badge.svg)](https://sourcegraph.com/github.com/dave/dst?badge)
[![go test](https://github.com/SamuelMarks/dst/actions/workflows/ci.yml/badge.svg)](https://github.com/SamuelMarks/dst/actions/workflows/ci.yml)

# Decorated Syntax Tree

Expand Down Expand Up @@ -236,4 +232,4 @@ For further developing or contributing to `dst`, check out [these notes](https:/

## Special thanks

Thanks very much to [hawkinsw](https://github.com/hawkinsw) for taking on the task of adding generics compatibility to `dst`.
Thanks very much to [hawkinsw](https://github.com/hawkinsw) for taking on the task of adding generics compatibility to `dst`.
12 changes: 9 additions & 3 deletions clone-generated.go
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,9 @@ func Clone(n Node) Node {
out.Imports = append(out.Imports, Clone(v).(*ImportSpec))
}

// Value: GoVersion
out.GoVersion = n.GoVersion

out.Decs.After = n.Decs.After

return out
Expand Down Expand Up @@ -1502,9 +1505,6 @@ func Clone(n Node) Node {
out.Name = Clone(n.Name).(*Ident)
}

// Token: Assign
out.Assign = n.Assign

// Decoration: Name
out.Decs.Name = append(out.Decs.Name, n.Decs.Name...)

Expand All @@ -1516,6 +1516,12 @@ func Clone(n Node) Node {
// Decoration: TypeParams
out.Decs.TypeParams = append(out.Decs.TypeParams, n.Decs.TypeParams...)

// Token: Assign
out.Assign = n.Assign

// Decoration: Assign
out.Decs.Assign = append(out.Decs.Assign, n.Decs.Assign...)

// Node: Type
if n.Type != nil {
out.Type = Clone(n.Type).(Expr)
Expand Down
Loading